W3C home > Mailing lists > Public > public-html@w3.org > December 2013

Re: advice on alt text for image maps

From: Leif Halvard Silli <xn--mlform-iua@xn--mlform-iua.no>
Date: Sat, 28 Dec 2013 06:29:16 +0100
To: "Jukka K. Korpela" <jukka.k.korpela@kolumbus.fi>
Cc: Steve Faulkner <faulkner.steve@gmail.com>, HTMLWG WG <public-html@w3.org>, HTML Accessibility Task Force <public-html-a11y@w3.org>
Message-ID: <20131228062916097398.bee40374@xn--mlform-iua.no>
Jukka K. Korpela, Thu, 26 Dec 2013 23:34:57 +0200:
> 2013-12-24 19:26, Steve Faulkner wrote:

>> I have made some modifications to the example:
>> 
>> 
http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#image-maps-0


> There's no general guideline for writing the alt attribute,
> though. [...]

Great stuff, Jukka. You’ve gotten me to think. I hope Steve considers 
your ideas, which I hereby wish to expand on a little.

  [ Snipping to the general guideline you propose: ]

>> If an img element has a usemap attribute  [ … ] it acts as a
>> caption for the collection of the alt attributes of the area elements 

Put that in the spec! To view the alternative text of the usemap image 
as a caption for the line of area elements, is a good, general 
authoring guideline.

> How does the text "Map of Katoomba" help [...]
> In this case, alt="" would seem to be the appropriate 

That the alternative text can be set to empty whenever a caption for 
the area element links is unnecessary, is an intriguing part of your 
proposal. Some supportive observations: 

A) Two, slightly different, presentation modes appear to exist:
   1. Image-map-mode is triggered by alt-text presence. Image-map-
      mode is characterized by an ”Image map!” + alt-text
      announcement that precedes presentation of the <area> links.
   2. Line-of-links-mode is triggered by empty as well as omitted
      alt-text. Line-of-links-mode is characterized by the lack
      of any Image Map announcment (e.g. check VoiceOver+Safari)
      Unique for this mode, Lynx generates its own text ([USEMAP])
      regardless of whether the alt-text is empty or omitted.

B) HTML5’s WAI-ARIA section specifies that empty @alt triggers
   presentation role. Use of @usemap attribute does not matter.

C) Use cases for not announcing a usemap image as an image
   map do exist. E.g. image maps used for site navigation as
   well as the example Jukka described.

D) An image-map image may be as varied as a non-image-map image -
   it could be a logo, text, portrait - even decorative. One might
   as well use <figure> with image maps, and supposedly omit @alt.
   Which justifies more than just a ”always use alt-text” advice.

E) WAI-ARIA gives us a third mode - image mode:
     *  <img role="img" src="file" alt="Text" usemap=#map />
   Here, the area elements get presented as a line of consecutive
   links without preceding image-map announcement. But, instead of
   being silent about the image, role="img" causes the image to be
   announced as an image (vs announced as image map or not at all).

F) It seems that image-map images could be viewed as having their
   own, non-ARIA defined ”role”, much like e.g. <table> have no
   corresponding ARIA role. By setting the alternative text to
   empty, the role is changed to role="presentation". By setting
   role="img", the image-map image is set to image. Again, much
   like the <table> may be changed from its native, non-ARIA-
   defined role to e.g. presentation role (via role=presentation)
   as well as to other, specific roles (like grid).
   
As a conclusion, the advice on how to author alt text for usemap images 
could be split in 3 parts based on whether the usemap image should have 
native role (when alternative text is present), presentation role (when 
the native role is overruled by empty or omitted alternative text or 
role="presentation") or image role (when the native role is overruled 
via role="img").
-- 
leif halvard silli
Received on Saturday, 28 December 2013 05:29:46 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:16:36 UTC