WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: When alt=""


From: Jukka K. Korpela
Date: Mar 23, 2009 11:45AM

Cliff Tyllick wrote:

> Lots of people had good reasons for wanting the photo next
> to a name or an image added to provide a splash of color to have an
> alt tag. In particular, I was struck by the responses along the lines
> of, "I have partial vision, so I can tell that *something* is there.
> Why can't I tell what it is on my own?"

That's a very good point. There is a wide range of variation in vision, from
absolute blindness to abnormally sharp vision. We should not assume that
seeing an image is an on/off issue.

Yet, "the alt attribute specifies alternate text that is rendered when the
image cannot be displayed", as the HTML 4.01 specification puts it. The
formulation is loose, but the point is that it's really an alternative to
the image. Thus, it should not be used to convey information needed for
understanding the image, as the two normally shouldn't both be presented to
the user at the same time.

> Out of the blue, a possible solution hit me: What if we always
> populate longdesc when alt is empty?

The approach, though interesting, doesn't work, as the longdesc attribute
was poorly designed and has mostly not been implemented.

A more practical approach would be to use the title="..." attribute, but it
is much of a hack. There is no clear definition of the meaning of this
attribute, beyond the vague expression "advisory title". In practice, it is
mostly used to specify a tooltip. This might be tolerably compatible with
your intended usage.

But most importantly, if an image needs a textual explanation, why not
present it in a manner that is accessible to all? That is, in normal textual
content, e.g. as a caption or as an explanatory paragraph. The only drawback
is that such text is mostly noise to people who have no way of seeing the
image or just don't want to see it.

So if you think an image really needs a longish explanation (e.g. to people
who don't see the image sharply enough), you might consider putting it
behind a link.

Yucca, http://www.cs.tut.fi/~jkorpela/