5.3.1. Enter the alt attribute to each image map and corresponding <area /> tags

Whenever an image map is included in the HTML code:

  • An alt attribute must be added to the <img /> tag, as well as to each <area /> tag.
  • The alt attribute of the <img /> tag must state the purpose of the image map.
  • The alt attribute of each <area /> tag must state the purpose of the link.

For example, imagine a map of the United States in which you can click on each state to obtain more information about the state:

<img src="images/us-map.png" alt="Map of the United States" usemap="#us-map" />
<map name="us-map">
    <area shape="poly" coords="[…]" href="alabama.html" alt="Alabama (AL)" />
    <area shape="poly" coords="[…]" href="alaska.html" alt="Alaska (AK)" />
    <area shape="poly" coords="[…]" href="arizona.html" alt="Arizona (AZ)" />
notices/html-css/renseigner-l-attribut-alt-de-chaque-image-mappee-et-de-ses-balises-area.txt · Last modified: 11 September 2013 at 16:49 by jramon

Project coordinated by Atalan.

In partnership with: