[whatwg] Definition of alt= attribute

Henri Sivonen hsivonen at iki.fi
Fri Jan 20 07:13:40 PST 2006

On Jan 19, 2006, at 14:05, Anne van Kesteren wrote:

> Without the "alt" attribute <img> becomes meaningless for devices
> (and people) who can not interpreted images.

Good intention, yes, but let's consider the practice:

Suppose there is an authoring tool that has a design goal of always  
outputting conforming (to the extent conformance is machine- 
assessable) documents. This tool allows the user to insert images.

Allowing images to be inserted without prompting for more information  
and also enforcing the presence of a human-supplied alt attribute  
would mean that the tool would have to refuse to save the document  
until the alt texts have been supplied. Refusing to save is not good.  
Therefore, the tool would have to present a document-modal dialog  
prompting for the alt text upon inserting the image.

Sure, some people might even enter some text, but people who just  
want to get on with it would hit return with an empty text box.  
Alternatively, the tool makers could give up the requirement of human- 
supplied alt text and just generate an empty alt text by default  
without asking. (Considering that the tool itself--not just the  
author using it--will be judged by seeing if the output passes an  
automated conformance check, it is likely that the requirement of  
correct output will not be dropped because of the alt issue.)

The bottom line is that requiring the presence of the alt attribute  
leads to a situation where UAs cannot tell whether the alt text is  
empty because the image is purely decorative or because the author  
did not bother to think about it.

IMO, this leaves the people who don't see the images worse off  
compared to a scenario where an empty alt text signified a purely  
decorative image and a missing alt attribute signified that the  
author did not bother to provide a textual alternative.

Henri Sivonen
hsivonen at iki.fi

More information about the whatwg mailing list