Re: advice on alt text for image maps

2013-12-09 13:36, Steve Faulkner wrote:
> HI all, have added some advice to html 5.1 text alternatives for <img> 
> elements when they are used as image maps
> At your leisure, feedback welcome and appreciated.

The addition seems to be a copy of the example at
except that alt="Four shapes are available: a red hollow box, a green 
circle, a blue triangle, and a yellow four-pointed star" has been 
replaced by the shorter alt="Four shapes are available:". This is an 
improvement, since color is not part of shape. But wouldn't it be better 
to improve the example where it is now and just link to from the lengthy 
discussion of the alt attribute?

Besides, the example would still be odd. The alt attributes of the area 
elements mention colors, and the first one does not really describe the 
pattern: alt="Red box." should be alt="Square with a square hollow in 
its center", if the intent is to specify the shapes. (I don't see any 
good reason for the periods at the ends of alt attributes here. They 
don't cause harm I suppose, except that they make the reader wonder 
whether I should really use periods there, and why.)

The example as a whole is rather artificial. It is difficult to imagine 
a meaningful context where you would present such a choice of shapes. 
And it would be more accessible (and simpler to code, hence safer 
against authoring mistakes) if presented simply as four image links. 
But, admittedly, it is difficult to find good examples of image maps. 
How about a geographic map? Say, a map of Australia (relatively simple, 
with not too many states), acting simply as an "active map" where you 
can click on any state to visit a page about that state.  The coords 
attributes would have many numbers, but that would not really add much 
to the structural complexity.

The added text before the copy of the example says: "If an|img 
has a|usemap|attribute which references a|map 
that have|href|attributes, the|img 
considered to be interactive content. In such cases, provide a text 
alternative that acts as a group label for the linked regions of the 
image." The end of the sentence is then repeated after the image, 
followed by the text "The|alt|attribute on each of the|area 
provides a label for each linked region". The formulation could probably 
be made simpler (more accessible), e.g.:

If an img element has a usemap attribute and is thus associated with an 
image map, the alt attribute value describes the image as a whole in the 
context. This means that it acts as a caption for the collection of the 
alt attributes of the area elements, so that all these attributes 
together can be used as a captioned menu of choices, in a situation 
where the image is not seen.

(I would prefer "caption", or maybe "heading", to "label" here, to avoid 
confusion with labels of controls defined via <label> markup.)


Received on Monday, 9 December 2013 12:24:14 UTC