HTML / Image maps / Partial observation

Image maps: map, area, and usemap

Status: Specification reviewed; selected implementation checks run Scope: HTML Living Standard, HTML-AAM, and WPT Reviewed: 2026-09-27

Technical summary

An image map links one or more geometric areas of an img to destinations. The image's usemap points to a map; descendant area elements describe each area's shape, coordinates, and optional link.

The specification treats the image's meaning, area selection, and link purpose as separate requirements. Browser clicks, keyboard use, and accessibility-tree output are recorded as implementation observations, not inferred from the specification mapping.

Elements and association

PartRole and conditions
img usemapThe usemap value is parsed as a hash-name reference. If it does not resolve to a map, the image is not associated with that map.
mapA named container for image-map areas. Its name must be non-empty and unique among maps in the same DOM tree. If an id is also present, it must match name.
areaA void element placed inside a map. shape and coords describe the region. With href, it is a hyperlink and needs alt. Without href, it is an unselectable dead area and must not have alt.
DOM APIHTMLMapElement.name, HTMLMapElement.areas (an HTMLCollection of descendant areas), and HTMLAreaElement.shape, coords, and alt.

Use the same name after the # in usemap and in the map's name:

<img src="island.png" width="480" height="240"
     alt="An island drawing with a mountain, station, and coast"
     usemap="#island-map">
<map name="island-map" id="island-map">
  <area shape="rect" coords="0,0,160,240"
        href="mountain.html" alt="Go to mountain information">
  <area shape="rect" coords="160,0,320,240"
        href="station.html" alt="Go to station information">
</map>

The image's alt says what the whole picture shows. Each linked area's alt names its destination or action. Keep the wording clear in the page's context.

Shapes, coordinates, and hit testing

StateConforming valuesCoordinate meaning
rectFour integers; x1 < x2 and y1 < y2.Top-left (x1, y1) and bottom-right (x2, y2), measured in CSS pixels from the image's top-left.
circleThree integers; radius is zero or greater.Center (x, y) and radius r, measured from the image's top-left.
polyAt least six integers, with an even count; every pair is one (x, y) point.Vertices measured from the image's top-left. The inside is determined by the even-odd rule.
defaultDo not provide coords.A rectangle covering the whole image.

If shape is missing or unrecognized, its missing/invalid-value default is the rectangle state. circ, rectangle, and polygon are not conforming keywords. Authoring requirements and the browser's processing of invalid coordinate input are different questions.

The HTML Standard hit-testing model accounts for stretching caused by CSS width and height. Browser zoom and CSS/SVG transforms do not transform the image-map coordinates. If the image is cropped or replaced with a different composition, check whether each link still covers the intended place.

When areas overlap, the first shape in tree order is on top. A pointing-device event goes to the topmost shape at that point, or to the img if no shape covers it. One map may be associated with more than one image. Image maps are live: after DOM changes, the browser processes them as if the relevant image-map processing steps ran again.

Accessible names and HTML-AAM

In the HTML Standard, the alt of a linked area supplies link text. The image's alt describes the picture; an area's alt describes the destination or action for that link. W3C WAI image-map guidance also calls for text alternatives for both the image and its linked areas.

The HTML-AAM 1.0 Editor's Draft (2026-07-29) maps an area with href to the link role, and an area without href to the generic role. This is a specification mapping. A browser's accessibility tree, an OS accessibility API, and a screen reader's speech are separate observation targets.

The HTML Standard says user agents may allow individual area links to be selected and activated with a keyboard or other means. The Chrome run below observed Tab and Enter in one setup; it does not establish behavior in every browser. For an important choice, provide regular text links nearby as another route.

DOM API and changes

HTMLMapElement.areas returns an HTMLCollection of descendant areas. An area exposes shape, coords, and alt IDL attributes. These reflected values are distinct from parsed geometry and from the content-attribute text.

const image = document.querySelector("img[usemap]");
const map = document.querySelector("map[name='island-map']");

image.useMap;         // "#island-map"
map.name;             // "island-map"
map.areas.length;     // number of areas in the map
map.areas[0].shape;   // "rect"
map.areas[0].coords;  // "0,0,160,240"

If one map is shared by multiple images, an area may correspond to more than one focusable area. When code changes the image, map association, area, or name/id, check the final DOM and the visible link regions again.

Fact and evidence

Key facts, conditions, and sources
TypeClaimConditions and scopeStatusSource
SPECimg usemap resolves a map from a hash-name reference, and descendant areas define image regions.If the reference cannot be resolved, there is no map association.ReviewedHTML Standard: Image maps
SPECArea shape states, coordinate requirements, and map/area DOM APIs are defined by the HTML Standard.rect, circle, poly, default; name, areas, href, and alt. Authoring requirements are separate from invalid-input processing.Reviewedmap · area
AAMAn area with href maps to link; without href, it maps to generic. Name computation includes ARIA naming, alt, and title.HTML-AAM 1.0 Editor's Draft. Actual browser trees and platform APIs need separate observation.Specification reviewedHTML Accessibility API Mappings 1.0
WPTSelected area coordinate, processing, shape, and box-model tests were run in Chrome.Files, pass counts, harness status, and environment are limited to the implementation evidence below.Selected tests runWPT: the-area-element

Evidence

  1. HTML Living Standard: Image maps — map/area elements, reference, shape, coordinates, processing, and live updates
  2. HTML Accessibility API Mappings 1.0 — area link/generic roles and accessible-name computation
  3. W3C WAI: Image maps — text alternatives for the image and linked regions
  4. Web Platform Tests: the-area-element — tests for area attributes, coordinates, and display boxes

Implementation evidence

The IMPL, WPT, and AAM rows below record only the checks made under their stated conditions. Partial means other browsers, tests, or platform accessibility APIs remain untested.

Image-map implementation evidence registry
TypeObserved scopeConditions and recordStatus
IMPL img usemap association, HTMLMapElement.areas, mouse hit testing, Tab order, and Enter activation 2026-09-27 / Chrome UA 154.0.0.0 / Windows NT 10.0.26200.0 / DPR 1.25 / viewport 870×716 / local image-map-v1 fixture. The 480×240 image resolved useMap="#atlas-map"; map.areas.length was 3 and all entries were HTMLAreaElement rectangles with coordinates 0,0,160,240, 160,0,320,240, and 320,0,480,240. Mouse clicks in the first and third areas targeted the matching areas. Tab focused Mountain, Station, and Coast in order; Enter on Mountain fired its click handler. The fixture prevented navigation. Other browsers and input configurations were not observed. Partial observation (Chrome 154 / one environment)
WPT Selected the-area-element processing, shape, offset, and coordinate test files 2026-09-27 / Chrome UA 154.0.0.0 / Windows NT 10.0.26200.0 / public wpt.live runner; upstream commit not pinned. All four Harness results were OK: area-processing.html 14/14, area-shape.html 17/17, area-offsets.html 3/3, and area-coords.html 32/32; 66 selected tests passed, zero failed. The full directory and other browsers were not run.

The test version used was not recorded. The linked test may change, so this result cannot be repeated with certainty against the same version.

Partial run (66 selected tests passed)
AAM Chrome accessibility-tree exposure, image description, linked-area names, and fragment destinations 2026-09-27 / Chrome UA 154.0.0.0 / Windows NT 10.0.26200.0 / local image-map-v1 fixture. Chrome Accessibility Tree exposed the image as a container with its description and three descendant links named “Mountain information”, “Station information”, and “Coast information”, with matching fragment URLs. The HTML-AAM 1.0 Editor’s Draft (2026-07-29) maps area[href] to link and an area without href to generic. Windows platform accessibility APIs, Narrator/NVDA, and other browsers were not observed; a Chrome tree snapshot is not a platform API result. After page generation, at viewport 1280×720 CSS px / DPR 1.25, the Chrome Accessibility Tree for the final Japanese Yugien article showed the image and its three nearby text links, but did not show the three area names as separate link nodes. A comparison fixture with the same figure / img usemap / map / area structure and nearby text links exposed both link sets. The difference remains unexplained. Partial observation (Chrome Accessibility Tree)

Coverage and open issues

  • ReviewedImage/map association, name and id requirements, area shape/coordinate authoring rules, tree-order hit testing, and DOM APIs
  • ReviewedHTML-AAM area roles and name computation; separate text alternatives for the image and its linked areas
  • Partly observedOne Chrome 154 environment: image association, map.areas, mouse area selection, Tab order, and Enter activation. Firefox, Safari, and mobile browsers were not observed
  • Selected tests onlyFour WPT files, 66 tests passed. The full area suite, other browsers, and related embedded-content tests were not run
  • Partly observedChrome accessibility-tree image/link nodes and area names. Windows UI Automation, Narrator/NVDA, and other assistive technologies were not observed
  • Not runCross-browser combinations of image resizing, CSS transforms, overlap, shared maps, and dynamic DOM changes

These browser, WPT, and accessibility-tree results do not prove full image-map conformance or the experience of every assistive-technology user. Treat the observed conditions and untested areas separately.

Related topics

For a beginner-friendly example, see image maps in Yugien. Image meaning, alt, and image fetching are covered by img and picture. Shared hyperlink behavior is covered by a. Image-map coordinates and overlap order have their own processing model.