--- name: maps description: > Load this skill whenever the project contains static or interactive maps, embedded map widgets (Google Maps, Leaflet, Mapbox, OpenStreetMap), or any geographic visualizations. Under no circumstances embed a map without a text-based alternative conveying the same information. Absolutely always ensure map controls are keyboard-accessible and that all meaningful map content is available without the visual map. --- # Maps Accessibility Skill > **Canonical source**: `examples/MAPS_ACCESSIBILITY_BEST_PRACTICES.md` in `mgifford/ACCESSIBILITY.md` > This skill is derived from that file. When in doubt, the example is authoritative. Apply these rules when implementing or reviewing any static or interactive map. **Only load this skill if the project contains maps.** --- ## Core Mandate No single text description works for every map. Start with the map's purpose and the tasks it supports, then provide accessible content and controls that preserve that purpose for people who cannot see, distinguish, point at, drag, zoom, or interpret the visual map. Keep the map and its structured alternative synchronized from the same data source. --- ## Severity Scale (this skill) | Level | Meaning | |---|---| | **Critical** | Essential location data has no accessible alternative | | **Serious** | Interactive map unreachable by keyboard; `role="application"` misused | | **Moderate** | Skip link missing; colour independence gap; popup focus not managed | | **Minor** | Missing `prefers-reduced-motion` for animations; legend incomplete | --- ## Classify the Map's Purpose First | Map purpose | Essential task | Common accessible presentation | |---|---|---| | Simple locator | Where one place is and how to reach it | Concise alt, address, landmark, directions, contact info | | Location directory | Find and compare services | Searchable list/table with names, addresses, distances, categories | | Route/wayfinding | Travel from A to B | Ordered directions with distances, turns, landmarks, conditions | | Thematic/quantitative | Compare values across areas | Summary + data table with region names, values, units, period | | Boundary/zoning | Understand containment/adjacency | Named boundary descriptions, affected locations, downloadable data | | Indoor/multi-floor | Navigate a building | Floor selector, accessible route instructions, entrances/lifts/stairs | | Exploratory | Investigate spatial relationships | Synchronized filters, structured results, accessible query tools | A map can serve more than one purpose — provide the alternatives needed for every essential task rather than assuming one short `alt`, table, or direction set is universally equivalent. WCAG 1.1.1's "equivalent purpose" does not mean reproducing every pixel or street label — it means preserving the information and tasks that matter in context. Research (the Map Equivalent-Purpose Framework) found tables and turn-by-turn directions can be insufficient when the purpose includes broad spatial understanding or exploration — treat this as guidance, not a separate WCAG criterion, but recognize when a table alone won't do. --- ## Critical: Text Alternatives for Static Maps ```html
The clinic is on the north side of King Street, immediately east of the Central Station entrance.
Northside Clinic, 200 King Street. The step-free entrance is on King Street. Read accessible travel directions.
``` Do not fill `alt` with turn-by-turn instructions or every road label — keep it concise and put detail nearby. For complex maps, provide both a short alternative AND a visible structured long description or clearly associated link: ```html
Map of step-free transit routes in the downtown area. Detailed route information follows.
Step-free transit routes, updated 15 July 2026. View route details and connections.
``` Prefer visible structured content over `aria-describedby` for complex descriptions — AT generally flattens referenced headings/lists/tables into one string, losing navigable structure. `alt=""` is appropriate only when purely decorative or the same info is already fully available nearby — never call a meaningful or interactive map decorative to hide accessibility problems. --- ## Critical: Structured Alternatives Matching the Task **Location list/table** (for directories): ```html
Library branches matching the current filters
BranchAddressDistanceAccessibility information
Central Library 100 Main Street600 metres Step-free entrance, lift, accessible washroom, hearing loop
``` Explain how distance was calculated; include units; preserve filters/sort order; let users open the same details and perform the same actions from both the map and the list view. **Route directions:** ```html

Step-free route from Central Station

Distance: 350 metres. Typical travel time: 6 to 10 minutes.

  1. Leave Central Station through the King Street step-free exit.
  2. Turn left and continue east for approximately 250 metres.

Route data checked 15 July 2026. Call 555-0100 to confirm temporary closures.

``` Include as applicable: distances/travel time; street names/landmarks/turns; curb cuts/crossings/gradients/surfaces/steps; accessible entrances/lifts/ washrooms; known construction/closures; transit stop/platform info; an alternative route when the shortest isn't accessible. Don't rely only on cardinal directions — combine with street names, distance, and landmarks. **Thematic/quantitative maps:** provide a plain-language summary, a data table with every value needed for comparison, region names/categories/units/ missing-data indicators, and the time period/source. Do not replace a choropleth map with a list of color names. **Legends are content, not decoration** — put legend text in HTML, describe colors/symbols/patterns/line styles/sizes, keep changes synchronized with active layers, and never make the legend the only structured alternative. --- ## Serious: Interactive Map Page Structure and Skip Link ```html

Find an accessible service location

Skip the interactive map and view locations

Interactive map

Use the named map controls to move or zoom.

Location results

``` **Missing skip link on an interactive map is Serious.** The visible link to results is useful to screen reader, keyboard, switch, speech-input, mobile, low-bandwidth, and cognitively disabled users — don't reveal it only on keyboard focus. --- ## Serious: Third-Party Map Embeds ```html

View service locations as a list or download the location data.

``` An `