WebAIM - Web Accessibility In Mind

E-mail List Archives

Title Attribute (was Re: IMG with a caption?)

for

From: John Foliot - WATS.ca
Date: Mar 9, 2005 8:21AM


webmaster29 wrote:
> Thanks Joelle! Great article. As for the ALT, it also shows the short
> text for the sighted readers when the pointer is over an image. I know
> it works on IE, but on Firefox ALT does not show anything.
>
> So I add TITLE. For example <img src="someimage.png" ALT="some image
> short description" TITLE="some image short description"> Then the
> description appears both on IE and Firefox. I do not know if
> it is right
> or wrong way to do it (any idea?), but at least the text
> appears on both
> IE and Firefox.
>
> brgds A.
>


Sorry for the delay in responding, but this should not go as is..

There are a few issues here, which should be clarified.

First, using the Title attribute exclusively to produce a "tool tip" is both
a misuse of the Title attribute, and a dangerous way of thinking, as it
leaves me with the impression that it is being done to convey information
that would not be present any other way - and that's even "wronger".

The W3C states:

"This attribute offers advisory information about the element for which it
is set.

Values of the title attribute may be rendered by user agents in a variety of
ways. For instance, visual browsers frequently [but are not obligated to...
- JF] display the title as a "tool tip" (a short message that appears when
the pointing device pauses over an object). Audio user agents may speak the
title information in a similar context. For example, setting the attribute
on a link allows user agents (visual and non-visual) to tell users about the
nature of the linked resource."
(http://www.w3.org/TR/html4/struct/global.html#adef-title)

Meaning that while it can be a good idea to add the Title attribute, we
shouldn't "rely" on it to do "anything", except provide advisory information
to the user agent (leaving the "method" of providing that advise to the user
agent...). Also, relying on "the pointing device" exclusively (see above)
goes against universal accessibility guidelines, which suggest we should be
building device independent content (right?).

Second item is "how" screen readers handle the Title attribute. This is
really dependant on how the end user has configured their screen reader; and
from my experience most daily screen reader users *do* tweak their tool to
their personal preferences - be it speed of delivery (voice), verbosity
settings, grammar settings, etc. For example (depending on which screen
reader being used), in the verbosity settings, users can choose to have
*just* the ALT attribute read, *just* the Title attribute read (when
present), or both/neither. In the grammar settings, they can choose to have
all, some or none of certain grammatical elements read, for example the
square brackets - [] - can be announced or ignored; it depends on the user.

Finally, I am troubled by the line, "...but at least the text appears on
both IE and Firefox." List members should be reminded that there *are* more
than 2 browsers on the market today, and developing web content for specific
browser behaviour is a slippery slope and should be strongly discouraged.

Cheers!

JF
--
John Foliot <EMAIL REMOVED>
Web Accessibility Specialist / Co-founder of WATS.ca
Web Accessibility Testing and Services
http://www.wats.ca 1.866.932.4878 (North America)