What should be in the alt attribute?

greenspun.com : LUSENET : MCU - Accessible Web Design : One Thread

I've been trying to catch up with my backlog of e-mail this morning. Several weeks ago David Poehlman wrote to me with some insightful suggestions about the use of alt attributes for images, e.g. when an image is used as a section break the image is actually acting like a horizontal rule - this is it's function and this can tell us something about what should be in the alt attribute,

"... we'll make believe this is a rule.In this case, make the alt the words that define this. you could use alt="start of section2" or some variant there of. my screen reader would say: "graphic start of section2."

Thanks David.

On a general note, it turns out that the value of an alt attribute for a non-text element is one of the most contentious issues in the area of accessible Web design. My take on it is that many of the disagreements spring from the following premise:

The problem is that implementation of alt attributes will be different for each of these groups. Let's take the example of this Website. If you have looked at any other page on this site you will see that I have used photographs at the top of many of the pages. Sometimes these photographs will add to the understanding and meaning of the page, and sometime they are merely decorative, or acting as section breaks.

For those images that do not directly add to the meaning of the page, the consensus seems to be that the first group above, will best be served by making the image invisible, by putting a space character in the alt attribute. That way the irritation of out of context phrases like, 'picture of a flower' will not suddenly spring up as the page is being read out by a screen reader such as Jaws. This approach does of course take away the choice to know about all the images available on the page.

The above problem does not occur for those surfing with images off, because the text label occupies it's own physical space on the page, and will generally be ignored by a user reading the main text - the text label will not get 'in the way'. So, for the visual user gets the benefit of knowing what the image is, even if it is only decorative, and has the choice to view the image.

The ideal situation may be one where information about decorative images is always given - after all, even decoration is a function - but users can choose to make the text descriptions of decorative images invisible or visible. This implies that we need to be able to provide more 'meta' information about the images that appear on Web pages - how-else would the client know what is a decorative and what is not a decorative image?



-- Anonymous, August 01, 2002

Answers

Jim,

It seems to me that one solution in manufacturing this distinction is the availability of the LONGDESC attribute. A decorative image could be identified briefly by way of the ALT attribute, and further information describing the image would be supplied in the LONGDESC, as was originally intended. Whether screen reading software currently supports this, I'm not aware.

In a way, this could be applicable to both of the above ideals - designers could leave the ALT attribute blank if the image was non- essential, but provide a LONGDESC if a user was interested to find out more about the photos used (an example of this would be a photo gallery where the ALT attribute "picture of a hill" lacks any qualitative input, but where the photographer's LONGDESC would be full of explosive adjectives!).

-- Anonymous, March 13, 2003


Thanks Alistair, I agree with what you are saying - unfortunately LONGDESC is not supported by most browsers at the moment.

All the best, Jim

-- Anonymous, March 14, 2003


In which case, it would seem all the more important to use LONGDESC and D-links from this moment onwards, while at the same time encouraging assistive technology manufacturers to implement this feature in a usable way. I'm not up on different screen reader abilities though, are there some pieces of software in particular which make no attempt at understanding LONGDESC?

-- Anonymous, March 19, 2003

Moderation questions? read the FAQ