Repository navigation
add aria-label to map canvas - #3782
Merged
Merged
Conversation
mourner
approved these changes
Dec 12, 2016
Member
|
Not sure why the PR didn't trigger a Circle build, but merging anyway since it's a trivial change. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-labelto 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-mapand the canvas container.mapboxgl-canvas-container, soaria-labelneeds to be on the canvas element.Launch Checklist
I think "Map" is the most appropriate value as it succinctly names what the element is, given that
aria-labelisn'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.