Skip to content
easeweb
Search topics

Maps that are the only way to find a location

A café finder's three cafés exist only as pins on a map that moves by dragging, so their addresses appear only after a click on a pin.

WCAG 2.2
SC 1.1.1ASC 2.1.1ASC 2.5.7AA· new in 2.2
Required by
Section 508 · EN 301 549 (EU)
Broken <div class="pin" data-shop="mill"></div>
The accessibility problem illustrated: No vision:Where are the cafés?
01

The problem

Screen reader users never hear where the cafés are, and people who use a keyboard or can't drag can't reach the pins or move the map to find them.

02

Try it

Find the address of the Old Mill café, then put the mouse aside and try again with Tab.

Drag the map to the left to bring the third pin into view, and click it for its card. Then press Tab: focus goes from the top straight to Holiday opening hours, and the panel below never names a café.

Apply a fix, and try it with Tab, then with single clicks only.

Broken Can you fix this?

BrokenA map that is the only place the cafés are

Find a café

Three cafés in town.

Holiday opening hours

Screen reader says:

(Tab through the page)

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

List every place in text, and make the map need no drag.

Before
BrokenA map that is the only place the cafés are
<section class="find-us" aria-labelledby="find-title">  <h2 id="find-title">Find a café</h2>  <p>Three cafés in town.</p>  <div class="map" id="map">    <div class="map-view">      <img class="map-tiles" src="/maps/town.png" alt="">      <div class="pin" data-shop="harbour" style="left: 20%; top: 50%"></div>      <div class="pin" data-shop="market" style="left: 42%; top: 58%"></div>      <div class="pin" data-shop="mill" style="left: 84%; top: 30%"></div>    </div>    <div class="map-card" id="map-card" hidden></div>  </div>  <a href="/holiday-hours">Holiday opening hours</a></section>
What is wrong5 points
  • The image is marked as decoration.
  • The pins are empty.
  • The addresses are in the script until a click puts one in the card, so the cafés are written nowhere on the page.
  • The pins take no focus and no keys.
  • The map moves only while a pointer drags it, so the Old Mill can't be found without a drag.
After

A list of the cafés, pins as buttons, and buttons to move the map

<section class="find-us" aria-labelledby="find-title">  <h2 id="find-title">Find a café</h2>  <p>Three cafés in town.</p>  <div class="map" id="map">    <div class="map-view">      <img class="map-tiles" src="/maps/town.png" alt="">      <button type="button" class="pin" data-shop="harbour" style="left: 20%; top: 50%" aria-label="Harbour Street"></button>      <button type="button" class="pin" data-shop="market" style="left: 42%; top: 58%" aria-label="Market Square"></button>      <button type="button" class="pin" data-shop="mill" style="left: 84%; top: 30%" aria-label="Old Mill"></button>    </div>    <div class="map-card" id="map-card" hidden></div>    <div class="map-pan" role="group" aria-label="Move the map">      <button type="button" data-pan="up" aria-label="Up">↑</button>      <button type="button" data-pan="left" aria-label="Left">←</button>      <button type="button" data-pan="right" aria-label="Right">→</button>      <button type="button" data-pan="down" aria-label="Down">↓</button>    </div>  </div>  <ul class="cafes">    <li>      <h3>Harbour Street</h3>      <p>12 Harbour Street, by the ferry terminal. Daily 7:00–18:00.</p>      <a href="https://maps.example/?q=12+Harbour+Street">Directions to Harbour Street</a>    </li>    <li>      <h3>Market Square</h3>      <p>3 Market Square, opposite the town hall. Daily 8:00–17:00.</p>      <a href="https://maps.example/?q=3+Market+Square">Directions to Market Square</a>    </li>    <li>      <h3>Old Mill</h3>      <p>The Old Mill, Mill Lane, beside the river. Weekends 9:00–16:00.</p>      <a href="https://maps.example/?q=The+Old+Mill+Mill+Lane">Directions to Old Mill</a>    </li>  </ul>  <a href="/holiday-hours">Holiday opening hours</a></section>
How it is fixed6 steps
  1. Write a list of the cafés under the map, as its text alternative: each café's name as a heading, its address, the landmark that says where it is on the map ("by the ferry terminal"), its hours and a directions link. An address alone doesn't say what the map shows to someone who doesn't know the town, so the landmark is part of the alternative.
  2. Keep alt="" on the map image: what it shows is now written right under it.
  3. Make the pins native buttons named after their cafés, so Tab reaches each one, Enter and Space open its card, and voice control users can say "Click Old Mill".
  4. Add Up, Down, Left and Right buttons, in a group named "Move the map", each named by the way the view goes. Each click or tap moves the view by 100 pixels, the step a short drag would make, so a few presses of Right bring the Old Mill into view.
  5. Send the buttons and the drag through the same moveTo(). The drag stays as a shortcut.
  6. When Tab reaches a pin, move the map to put it in the middle of the view, so Tab never leaves the focus ring off the edge. Without that, the browser scrolls the map's frame itself to the pin, and the map is no longer where the script thinks it is.

This fixes the Before and passes 1.1.1, 2.1.1 and 2.5.7.

04

Design ideas

A map can stay the centrepiece and still not be the only place the cafés are.

Three ways to draw a café finder. Try each with Tab, then with single clicks only: two give every café in words and need no drag, and one moves only under a held pointer.

In the design file

  • Write each place beside the map with its name, address, a landmark and hours, not only in a pin’s pop-up.
  • Draw the buttons that move the map, and Zoom in and Zoom out if it zooms, in a corner of the map at rest.
  • Draw each pin and map button with its focus ring, at 3:1 against the map behind it.
  • Phone layout: the list of places first, and the map under it, with a margin to scroll the page on.

Passes

    1. 1 Harbour Street · 12 Harbour Street, by the ferry terminal
    2. 2 Market Square · 3 Market Square, opposite the town hall
    3. 3 Old Mill · The Old Mill, Mill Lane, beside the river
    Numbered pins over numbered cards Each pin carries a number in white on the café’s brown (8.50:1), and the card for that café under the map starts with the same number, so the eye goes straight from a pin to its address. Press a pin and its card is marked; the arrows in the map’s corner move it a step at a time.
    • Harbour Street 12 Harbour Street, by the ferry terminal Directions
    • Market Square 3 Market Square, opposite the town hall Directions
    • Old Mill The Old Mill, Mill Lane, beside the river Directions
    A small map on each café’s card No big map at all: each café is a card with a small still map centred on it, the pin in the middle, beside its name, address and landmark. Nothing moves, so nothing needs a drag or a key, and the Directions link hands the route to a map app.

Fails

  • A full-width map that asks for two fingersWCAG 2.5.7 The calm, modern finder: the map runs edge to edge, and a one-finger swipe scrolls the page while a message asks for two fingers to move the map. The page scrolls freely, but the map still moves only by dragging, with nothing to press, and Tab passes it by.
05

Verify the fix

5 checks.

Test with: Keyboard, Screen reader, Mouse, Touch, Zoom

0 of 5 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the map library or its settings change.

Limits

This is a starting pattern, not a guarantee for every application. The addresses, landmarks and URLs are placeholders. This guide covers a map that is the only way to find a place; the title of a map's iframe is covered in iframes with a missing or generic title, alt text for a map that is only an image in missing alt text on images that carry information, and pinching in general in pinch, drag and tilt gestures with no button. Routes, turn-by-turn directions, floor plans and maps that people draw on have needs of their own, and are not covered here. A map service's own embed or app is beyond your control; test what visitors meet when a directions link takes them there, with your target assistive technology.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

EaseWeb service

Fixed it? Keep it from coming back.

I turn guides like this one into rules your coding agents follow and checks your CI runs. Then I retest by hand with a keyboard and screen readers, periodically.

See the service