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

Popups are misplaced when using a screen reader #423

Closed
Malvoz opened this issue Apr 22, 2021 · 8 comments · Fixed by #467
Closed

Popups are misplaced when using a screen reader #423

Malvoz opened this issue Apr 22, 2021 · 8 comments · Fixed by #467

Comments

@Malvoz
Copy link
Member

Malvoz commented Apr 22, 2021

I'm getting a strange bug where the popup is misplaced when opening it by pressing Enter, only when using a screen reader (NVDA in this case):

Keyboard.Interaction.Test.-.Google.Chrome.2021-02-03.21-01-.mp4

Originally posted by @Malvoz in #270 (comment)

@Malvoz
Copy link
Member Author

Malvoz commented Apr 22, 2021

The video is a bit out of date and popups look a bit different now, but the bug is the same.

After a popup has been opened in a Leaflet map (Leaflet markers aren't yet keyboard accessible using a screen reader, requires setting role="button") the popups are not misplaced, so this seems to be a bug only in this custom element.

@prushforth
Copy link
Member

I am certain that this is a regression, as I did listen to this map when we first published it. But I confirm the bug. :-(

@prushforth
Copy link
Member

OK I can't confirm that it's a regression; perhaps I'm misremembering. In any case, this event handler correctly executes when NVDA is not running, but it doesn't execute when NVDA is running; a Leaflet handler deals with the event. As a result the, the popup opens with its pointer at approximately 0,0 in the upper left hand corner of the map, which may be the popup div location or the map div location, who knows.

@prushforth
Copy link
Member

Also notice that when NVDA is not running, the event is listed as a keyboard event, whereas when NVDA is running, the event is "click". In the latter case, the popup opens in the default location for the map (0,0), upper left.

@prushforth
Copy link
Member

I discovered / re-discovered that there are two modes for NVDA: browse mode, for reading documents, and focus mode, I think for things like forms. I believe this bug appears in browse mode and disappears in focus mode (you can switch between the two modes with Ins+Spacebar - I couldn't figure out the indicator to tell you what mode you're in, but if you can read a page by cursoring through it, I think that means you're in browse mode).

@Malvoz Is there a way to force a map via markup to be in 'focus mode', or is that stupid?

@Malvoz
Copy link
Member Author

Malvoz commented May 18, 2021

Is there a way to force a map via markup to be in 'focus mode'

Yes there is one way, that is #274.

I should've cross-referenced that issue from here, that might've saved you some time. Sorry about that!

@prushforth
Copy link
Member

I should've cross-referenced that issue from here, that might've saved you some time. Sorry about that!

No worries, sometimes I have to experience it to learn it!

@Malvoz
Copy link
Member Author

Malvoz commented May 19, 2021

Closed by #467.

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

Successfully merging a pull request may close this issue.

2 participants