WebAIM - Web Accessibility In Mind

E-mail List Archives

RE: alt and title attributes


From: Jukka Korpela
Date: Dec 17, 2001 5:50AM

Racheli Magen < <EMAIL REMOVED> > wrote:

> The 508 standards require the use of "alt" for images and links

Links themselves cannot have alt attributes, by HTML syntax. If an image is
a link, then the alt text for the image might be seen as alt text for link,
but syntactally it's an <img> element attribute. And <area> elements are
links in a sense, and need to have alt attributes, but this is basically
because <area> elements are sort-of images too.

> but Netscape 6.1+ doesn't support the "alt attribute.

Actually, Netscape 6 has _adequate_ support to alt attributes. Netscape 4
didn't have.

I guess you may have fallen into the trap of thinking that "tooltip
behavior" in some browsers is what alt attributes are really for. Some notes
on this common confusion:

Netscape 6 uses the alt attribute in its defined meaning, as a replacement
for the image when the image is not displayed. It does not show it as a
"tooltip" on mouseover, as earlier versions did. But this is an improvement,
not a problem. And when the image is not shown, Netscape 6 treats the alt
text as if it were normal document content, instead of showing it in tiny
text in a box representing a broken image. So, for example, if you have
<h1><img alt="FooBar Inc." src="logo.png"></h1>
and image display is off or logo.png is unavailable, then Netscape 6 shows
the text "FooBar Inc." in 1st level heading style, as if the document
<h1>FooBar Inc.</h1>
And nothing especial happens on mouseover, whether the image is shown or the
alt text is used instead. This is how things were _meant_ to work (and
corresponds to how things have worked on Opera for some browser

> Does anyone know if I can use the "title" attribute
> instead, which is supported by Netscape as well as
> Internet Explorer?

You can use the title attribute _in addition to_ an alt attribute. It has a
different meaning and purpose. And although title attributes are often
useful, they are not an accessibility issue proper but a matter of enhanced
useability, as explained e.g. in
(The title attribute is supported by sufficiently new versions of visual
browsers like Netscape, IE, and Opera. It could conceivably be used in
non-visual presentation as well.)

- --
Jukka Korpela
TIEKE Tietoyhteiskunnan kehittamiskeskus ry
Finnish Information Society Development Centre
Salomonkatu 17 A, 10th floor, FIN - 00100 HELSINKI, FINLAND
Phone: +358 9 4763 0397 Fax: +358 9 4763 0399
http://www.tieke.fi <EMAIL REMOVED>