-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve the default navigation flow for keyboard and screen reader users #7479
Comments
While I think this would be an improvement (especially when there are a lot of markers), the problem with this approach is that it causes disruptive tab stops between panning and interacting with the markers. Below are descriptions of 3 different methods that I think should be considered. For each method, the scenario is a map with 100 markers. 🔗 A. Current situation
In this situation, it would take more than 100 tab presses to reach the controls, to go into fullscreen for example. It's also difficult for users relying on screen readers to detect the available controls. 🔗 B. Changing DOM order (#7796)If the DOM order of the map pane and controls is changed:
Now it's easy for keyboard users to use the controls but will have to Tab between map -> controls -> markers and Shift + Tab between markers -> controls -> map when they only want to pan and interact with markers. I.e. they're forced to tab past the controls each time. 🔗 C. Arrow key navigation for focusable elements in
|
I think solution "C" would be good. But I don't think that the other maintainers allows the polyfill for So we need to use the ARIA Grid pattern. |
Just noting that arrow key navigation for markers would resolve a concern described in #3472 (comment):
|
Motivation
The DOM order of elements affects the order in which screen readers announce content, and also the focus order.
I believe that the map controls should be available/presented to the user before other author provided content such as markers and popups.
This would reduce confusion and allow non-visual users to form a consistent mental model of the content. It also creates a more consistent and logical focus order even across different maps (perhaps by different authors) with varying content.
Relates to WCAG 2.1 Success Criterion 2.4.3 Focus Order and 3.2.3 Consistent Navigation.
Proposed solution
Changeleaflet-control-container
to come beforeleaflet-map-pane
in the DOM order.Arrow key navigation for focusable elements in
leaflet-map-pane
.Additional context
@stevevance raised a similar concern in #3210 (quoting the relevant parts):
The text was updated successfully, but these errors were encountered: