Coder Social home page Coder Social logo

Comments (2)

andrewharvey avatar andrewharvey commented on May 30, 2024 9

I've never had someone put their Mapbox map through a compliance test, and it's never been a strict compliance issue so far. That said WCAG 2.0 compliance is in theory something that for a lot of customers need to meet. Only usually to AA (the three levels are A, AA, and AAA).

The focus is usually around ensuring the content typically shown on top of the map (like markers, symbols etc) is accessible rather than the actual "basemap" map.

At a high level the focus is usually

  • text alternatives for non-text content / screen reader support
  • interaction without a mouse
  • map style/visual (use of colour, contrast, symbol size...)

This is typically achieved with:

  • aria-label, alt, title provide a text alternative, GL JS does have these set for the controls
  • depending on how your map appears inside a page, you can use a figure with figcaption to provide a text based alternative of what the map is of, eg. "Map of Washington DC showing bike rental locations"
  • list of markers outside the map, eg.
    selection_999 036
  • giving an address as an alternative to showing the location on a map with the reverse geocoder
  • markers can have an text alternative set, and symbols can with mapbox-gl-accessibility (draws invisible markers on top of the symbols)
  • providing an alternate map style that uses shape or texture instead of colour to distinguish different elements (whether that's markers, symbols, lines or fills on the map)
  • providing an alternate high contrast map style
  • text resizing (although a map at 200% browser zoom is okay, it might be better to have an option to dynamically upsize all text/icons on the map)
  • making everything keyboard accessible-
  • all the mouse interactions to pan, zoom, rotate, pitch are by default possible with the keyboard in GL JS
  • any on('click') interaction can use mapbox-gl-accessibility to provide a DOM element which can be clicked with the keyboard
  • mapbox-gl-accessibility sets the tabindex so you can tab through elements to click, but you may need to ensure you do this on your own if you use a normal Marker
  • no flashes (a bug which caused flashes was recently fixed in GL JS, but I'm not sure if tiles loading into view are considered a flash
  • the keyboard focus indicator should be visible (you'll likely need to set your own :focus css)
  • use the lang tag if the language for the text differs from the lang set for the page, I think this is something mapbox-gl-accessibility could do
  • abbreviations, mapbox-gl-accessibility could expand out "Main St" to "Main Street" for the text alternative

from mapbox-gl-accessibility.

mikelmaron avatar mikelmaron commented on May 30, 2024

@andrewharvey what is your take on how WCAG applies for interactive maps?

from mapbox-gl-accessibility.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.