remonkal — 2013-02-03T04:00:46-05:00 — #1
let's say I have an <A> tag:
<a href="mysite.com/blue-pens.html title="blue pens">Blue Pens</a>
is it ok that the "blue pens" text of link (not inside the <A> tag) is the same as the "title" property of the <A> tag ?
is that what I'm suppose to use the "title" property or is there a better use for it ?
ralphm — 2013-02-03T04:34:21-05:00 — #2
You don't need a title there at all. The text explains what the link is for, so the title text is nothing more than an annoyance.
xhtmlcoder — 2013-02-03T06:02:50-05:00 — #3
In post #1 that is an example of duplicated text content (not wise) and thus using the 'title' attribute is redundant and counter-productive in this case having: 'blue pens, blue pens' makes no sense; the link already says "blue pens" . The 'title' attribute can be used to briefly describe the contents of the link much like an annotation.
remonkal — 2013-02-03T06:07:37-05:00 — #4
can you please give an example of a text that will make good use of the "title" in this case ?
xhtmlcoder — 2013-02-03T09:19:09-05:00 — #5
You'd most likely see title attributes applied to abbreviations, if they weren't written out in full, i.e. WWW: <abbr title="World Wide Web">WWW</abbr> regarding links usually they shouldn't be needed as the link usually should be self-explanatory.
Though sometimes where space is limited in a navigation bar; <a href="mailto:firstname.lastname@example.org" title="Contact the XYZZY Manager via E-mail">Contact</a> might be easier to understand than just the link that may trigger an email client, etc. That wasn't a good example though should give an idea. Recently we had a thread with how some AT devices handle the attribute: Too Much Accessibility: titles titles titles everywhere.