Jump to content

Title for anchor tags


Wickham

Recommended Posts

I've seen several topics about whether to use the title="..." in anchor tags and people have different views.

 

If I exclude the title like this:-

Contents

 

I presume that a screen reader for a blind person will read out "Contents", is that correct?

 

If I include title like this:-

Contents

 

all browsers show a tooltip which I find ugly, but does a screen reader read out both "Contents" and "Main contents of this website"? How can I include extra information for a disabled person without showing the ugly tooltip?

 

Is the best way to avoid using title but to increase the description between the and tags? That is also ugly because you get more words with the hover style which may be a different color and underlined.

 

There was a discussion here http://forums.site-reference.com/topic/8601/How-much-Weight-does-title-anchor-carries/ where people couldn't make up their minds whether it is a good idea to have the title or not and some were thinking of SEO while others were thinking of accessibility.

Edited by Wickham
Link to comment
Share on other sites

  • 4 weeks later...
  • 2 years later...

Using link title element has become more popular since the rise of such widely used scripts as WordPress which by default duplicates the post title link in its title element. Still, despite being the common behavior, this method of using title element is both not right and annoying.

Example:

<a href=”/smater/” title=”Author’s biography”> Smarty</a>

OR

<a href=”/smater/” title=”More posts by Ann Smarty”> Smarty</a>

Link to comment
Share on other sites

I'm in my first web development class and our instructor taught us to use titles in all of our anchor tags.

 

 

Well remember Rule # 1 - When in doubt do whatever LSW tells you to do, he is the best thing since sliced bread.

 

First a reply to:

...our instructor taught us to use titles in all of our anchor tags. - SunnyOne99

Why does that not surprise me? I have yet to deal with a class that actually teaches you good coding habits, by school taught the same mistakes.

 

Simply ask yourself Why? Why would I want to repeat what I already have?

 

<a href=”whatever” title=”Cause LSW says so”>Cause LSW says so</a>

 

What possible argument can there be for repeating?

 

As for the screen readers, yes... It will read out "Cause LSW says so Cause LSW says so". Now if that would not get redundant for vision impaired users on each and every one on each and every page. So for SunnyOne, you can see the issue with adding a title to every anchor. If you are still in the class, you should point this out to the instructor and the school needs to consider covering web accessibility issues. There is no requirement for titles, they are only to be used when they have value for the user.

 

In the example above, is their other content than the Main Content or would not Content imply the main content? If there is another secondary content, it would likely be in side bar or sub-box in which I would still expect Content to be main content and something else would be Box content or side content etc.

 

Of course the best thing in this case is simply to say what it is, rather than "Content", why not simply state "Main Content"? Now I assume this is just for example, but the question is what is keeping me from stating what I want to say? Can't I say it clearly so I do not need to explain it further?

 

The issue I have with the forum comment you made is that people once again do not understand that there is no SEO vs Accessibility, they are the same thing. SEO is optimizing for a SE spider, a "machine" that records pages and contents. It is as blind as many disabled users. If you optimize a site for special needs users, especially the vision impaired, then at the same time you are optimizing for the blind machine you want to make life easy for. Just remember folks that you are building web sites for the user, the human. They have to be able to use it. No. 1 ranking is of no use of the user arrives and can't easily find what they want. People are the priority and not machines. But anything done to make the site easier to use for humans will make it better for the machines and up your ranking.

 

So no, you should never use the title attribute unless it is NEEDED to better clarify a target that you cannot clarify in the actual anchor text.

 

As a side note to it's cousin alt=" ", the alt attribute should always be present for every image, but left empty if just for decoration. This will indicate to the screen reader user that there is an image but it is of no importance. If you do not use the alt attribute the screen reader may (depends on age and user preference) read the name of the image "ksikodjsk.jpg" which is as irritating as anything. So always use the alt attribute, even when empty & at least use decent names for images so they get "image topLeftCorner JPG" rather than "image ksikodjsk jpg".

 

The alt attribute is for passing along information the user cannot get visually. So "image LSW recieving the 'What a good guy' award from President Obama" instead of "image ksikodjsk jpg" or "image Bar chart showing 56% increase this year compared to 43% increase last year for this quarter" instead of "image ksikodjsk jpg"

 

Both the alt and the title attributes are really simple to use once one considers what they are for and who they are for. Once again a spider will get more out of an alt attribute than an image file name, so accessibility for the impaired user is accessibility for the spider hence SEO.

 

So to finish off my usual seminar length post: Titles. If you have an :image title" under (or wherever) the image that says "LSW recieving the 'What a good guy' award from President Obama", you do not need to use it in an alt attribute or the user will here "LSW recieving the 'What a good guy' award from President Obama image LSW recieving the 'What a good guy' award from President Obama." If your content is rather clear that I received and award from President Obama, you can cut the alt or image title back to "LSW recieves award".

 

So I strayed a bit off, but only because title and alt are much the same and both can result in irritating repeats for screen reader users or repetitive tool tips. Understanding one helps understanding the other.

 

rolleyes.gif Disclaimer: If you do not know me, this was with humor and not arrogance.

  • Like 1
Link to comment
Share on other sites

Defective my dear, I am Mentally Defective... Damaged would suggest I was "Normal" at one time (as if I could ever pass for normal ROFL). Mentally Defective would suggest we are all defective at birth.

 

If we are to be stigmatized, then you should at least use the politically incorrect correct stigmatizing terminology as put forth by the Federal Government.

 

I would like to be disrespected with respect please.... blink.gif

 

Now if you will excuse me those nice fellows with the coat are waiting for me, talk about defective, they keep bringing me jackets with sleeves tat are far to long and tell me not to quit my day job for a comedian career.

 

I just bust my-selves up.

 

Good morning Luv!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...