> From: Joey

> I am curious as to why Firefox only understands the title
> attribute when creating tool tips, why cant we just use ALT?
> Cause if we want tool tips on our sites to work on all browsers
> this means we have to enter an ALT & TITLE attribute which doubles
> the code for the same thing? Not very nice code in my opinion
> (necessary but i don't see why) then if we just use TITLE attribute
> we get Web Standards errors when validating our code? Yet if we
> just use ALT we don't get tool tips in Firefox ???? Whats the deal
> with this? I have always wondered i hope someone can enlighten me!

ALT stands for ALTernate. It should only be shown when the primary
content (i.e. the image) can't be displayed (e.g. browsing with
images off, or in a text browser, screenreader, etc). In the spec
it says nothing about browsers needing to expose ALT as a tooltip
http://www.w3.org/TR/html401/struct/objects.html#h-13.8

The TITLE attribute is the more correct attribute to use for tooltips
http://www.w3.org/TR/html401/struct/global.html#h-7.4.3
"This attribute offers advisory information about the element for
which it is set."

Now, you *must* provide ALT for every image (even if it's only alt=""
for decorative images). You *may* use TITLE to create tooltips, but again
be advised that nowhere in the spec does it say how browsers should
present TITLE...so it's something that (unlikely, but still possible) 
could change in any future browser.

In essence, it comes down to: don't use ALT and TITLE to create tooltips,
use them for what their intended purpose is (providing alternate text
and additional advisory information).

Patrick
________________________________
Patrick H. Lauke
Webmaster / University of Salford
http://www.salford.ac.uk
******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

Reply via email to