Skip to main content

The <map> Element

As defined in the HTML Living Standard, the <map> element, in conjunction with any <area> element descendants, defines a client-side image map. It is used to define multiple clickable areas on a single image.

Conceptual Visualization:
<map name="nav-map">
  <area shape="rect" coords="..." href="..." alt="...">
</map>

<img src="header.png" usemap="#nav-map" alt="...">

The <map> element requires a name attribute, which must match the usemap attribute on the image it is describing.

View HTML Living Standard: The map element

Programmatic Requirements

WCAG Requirement: Non-text Content

Success Criterion 1.1.1 (Level A): All non-text content that is presented to the user has a text alternative that serves the equivalent purpose.

When using <map>, accessibility depends on the alt text of the <area> children. Sighted users see an image and know where to click. Blind users rely on the accessibility tree to list the interactive regions of that image. Without descriptive alt text on the areas, the "map" is invisible and unusable for assistive technology.

Understand SC 1.1.1: Non-text Content

Best Practices

A11y Tip: Visible Landmarks

Because clickable regions in a <map> are invisible until focused, they can be difficult for keyboard users to find. Always ensure that the browser's default focus ring is not suppressed, or use CSS to highlight the active area.