Skip to content
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

Opening a marker's pop-up should set focus to the pop-up's content #9662

Closed
skorasaurus opened this issue May 6, 2020 · 3 comments
Closed

Comments

@skorasaurus
Copy link

skorasaurus commented May 6, 2020

mapbox-gl-js version:
confirmed on 1.10.0

browser:
confirmed with firefox 75 on ubuntu and chrome on windows

Steps to Trigger Behavior

  1. Open demonstration page
  2. press tab several times so a marker a has focus
  3. press enter to open its pop-up
  4. Press tab again

Link to Demonstration

Demonstration source
https://gist.github.com/skorasaurus/40d6f977d2db8038b99ed6aca5354f73

Viewable demonstration
http://bl.ocks.org/skorasaurus/40d6f977d2db8038b99ed6aca5354f73

Expected Behavior

the keyboard focus should change to the pop-up's contents of the marker
whether through a designated keydown event (pressing enter on the keyboard while focus is on the marker) or the click event.

In other words, a user who is only able to use a keyboard will tab through
each tabbable element, reach a marker that they would like to access, press enter to open, and expects that during their next tab, the focus would be on the first
tabbable element (the link, a heading, or a close button for the pop-up)
in that pop-up.

Actual Behavior

After a user opens the pop-up, and presses tab, the focus changes to the next
item in the source.

In the test case that loads a geojson array of 27 elements, if a user tabs after opening, the focus changes to the next point in the source data. As a result, if the user opens up a pop-up for a point that was 4th in the source data, they'll have to tab through the remaining 23 entries, plus any other elements on the page.

This is a bug because users who are only able to use a keyboard to navigate have to go through significant more work in order to access the content of a pop-up (which may contain a link).

@ryanhamley
Copy link
Contributor

Thanks for the thorough report @skorasaurus! We welcome contributions, if you're interested in supplying a pull request to fix this issue. Our contributor guidelines can get you started.

@avpeery
Copy link
Contributor

avpeery commented Aug 9, 2021

Hi @ryanhamley it looks like this issue was addressed in the merged PR #9774. Should this issue be closed? Thanks!

@ryanhamley
Copy link
Contributor

Yep looks like an oversight. Thanks for checking @avpeery

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

No branches or pull requests

3 participants