Skip to content

add aria-label to map canvas - #3782

Merged
mourner merged 1 commit into
mapbox:masterfrom
andrewharvey:canvas-aria-label
Dec 12, 2016
Merged

mourner merged 1 commit into
mapbox:masterfrom
andrewharvey:canvas-aria-label

Conversation

@andrewharvey

@andrewharvey andrewharvey commented Dec 12, 2016 •

Copy link
Copy Markdown
Collaborator

When Assistive Technology such as ChromeVox reads aloud a GL JS map it will announce the navigation controls and the attribution but not the map itself even though it gets focus. In this PR I propose to add aria-label to the map canvas so that when it has focus AT will announce it to users (keeping in mind that when focused users can use the keyboard to navigate).

Specifically ChromeVox and possible other AT skips aria-label's on the map element .mapboxgl-map and the canvas container .mapboxgl-canvas-container, so aria-label needs to be on the canvas element.

Launch Checklist

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • document any changes to public APIs
  • post benchmark scores
  • manually test the debug page

I think "Map" is the most appropriate value as it succinctly names what the element is, given that aria-label isn't meant to contain a description (see instead aria-describedby) I think it's rare that a different name would be needed, so I haven't exposed this as a Map option. Anyone who needs that could also modify the DOM directly themselves.

@mourner
mourner merged commit fc912c0 into mapbox:master Dec 12, 2016
@mourner

mourner commented Dec 12, 2016

Copy link
Copy Markdown
Member

Not sure why the PR didn't trigger a Circle build, but merging anyway since it's a trivial change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants