[whatwg] Proposal for an addition to the authoring guidance regarding the alt attribute

Markus Ernst derernst at gmx.ch
Tue Aug 3 03:55:06 PDT 2010


Section 4.8.1.1.9 describes how alternative text for content images 
should be written: 
http://www.w3.org/TR/html5/embedded-content-1.html#a-key-part-of-the-content

Then, there is a general guideline about writing alternative texts in 
section 4.8.1.1.12: "A corollary to this is that the alt attribute's 
value should never contain text that could be considered the image's 
caption, title, or legend. It is supposed to contain replacement text 
that could be used by users instead of the image; it is not meant to 
supplement the image. The title attribute can be used for supplemental 
information."

IMO the wording of 4.8.1.1.9 is somehow contradictive to the general 
guidance in two cases:

1. The image is the information itself, it does not convey any 
information beyond it's visuals. This is a very common case, for example 
in photo galleries. Unlike the examples given under "The general case" 
(where lack of the image is lack of information), the images in a 
wedding photo gallery cannot be described in a way that matches 
4.8.1.1.12 and provides any useful information for e.g. a blind user. 
The information "Me, Gary, and his parents eating the cake" is rather 
useful for those who actually see the image, and should go to the 
caption, as correctly stated in 4.8.1.1.12.

2. The image illustrates what is discussed in the surrounding text, or 
has a caption describing it. Inserting alt text would actually duplicate 
the information, but not convey anything useful for those who don't see 
the image. IMO alternative text should be omitted in this case (as e.g. 
Wikipedia does: http://en.wikipedia.org/wiki/Squirrel - the alt 
attribute values of all content images are empty).

So I propose to:
- Explicitly treat these two cases in 4.8.1.1.9, requiring to insert no 
alt text there
- In the part "Images whose contents are not known", remove the word 
"unfortunate" at the beginning ("In some cases"), and the first note.

(Apparently, the W3C itself is not so sure about alt text in content 
images; http://www.w3.org/Consortium/mission illustrates this: There is 
a picture of Tim Berners-Lee, with no direct reference in the text. It 
does not seem to be decorative, as according to 4.8.1.1.6 the alt 
attribute should be empty in this case; but the alt text says: "Tim 
Berners-Lee speaking at W3C10", which is not an information conveyed by 
the image itself if you don't know how Tim Berners-Lee looks like. Thus, 
according to 4.8.1.1.9, this information should be displayed in a 
caption, and the alt attribute should say something like "A male speaker 
in front of a display containing the text 'W3C10 Tenth Anniversary' and 
some sponsor logos" - which is of course stupid. The empty string would 
IMO be the appropriate value for the alt attribute here.)



More information about the whatwg mailing list