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 should be programmatically determinable #354

Open
Malvoz opened this issue Mar 16, 2021 · 3 comments
Open

Popups should be programmatically determinable #354

Malvoz opened this issue Mar 16, 2021 · 3 comments

Comments

@Malvoz
Copy link
Member

Malvoz commented Mar 16, 2021

The leaflet-popup is a plain <div> (click any marker to view a popup here: https://maps4html.org/experiments/index.html). I believe it is a failure of SC 1.3.1 Info and Relationships to not convey its structure (as visually presented) to ATs. This issue is on the list of upstream accessibility issues (for popups).

I'd like to think that role="dialog" is appropriate for the element, but I'm not sure (we can hopefully get some feedback on this per w3c/aria#1421 (comment)). WDYT? Is dialog appropriate for popups?

/cc @shepazu and @nchan0154, in case you have any opinions on this. 🤗

@Malvoz
Copy link
Member Author

Malvoz commented Apr 22, 2021

Accessibility expert Scott O'Hara stated in w3c/aria#1421 (comment):

per the provided example, i could see that as a non-modal dialog.

(the example provided was https://maps4html.org/experiments/index.html)

With that response I do think we should use role="dialog" and aria-modal="false" for popups. I'm assuming we'll continue to use popups to some extent despite #403.

@nchan0154
Copy link

Apologies for missing this earlier. I agree that role="dialog" and aria-modal="false" are most appropriate here (feeling validated by this as I had decided this in my head before I saw Scott's comment 😂) In the specific case here I do think the appropriate accessible name is the name as the content of the tooltip, and it would also be great if Leaflet let you pass this in as an option.

I'm also noticing this very interesting bug on NVDA + Chrome/Firefox where opening a popup with the keyboard causes the popup to open very left and very up of the actual point, so much so that the map scrolls. I'm not sure how much of this is MapML and how much of it is Leaflet since last I checked, Leafalet didn't even have popups that were keyboard accessible, but possibly worth noting.

@Malvoz
Copy link
Member Author

Malvoz commented Apr 22, 2021

Thanks Nic.

I do think the appropriate accessible name is the name as the content of the tooltip

I agree, and it'd indeed be great if Leaflet provided that as an option. I'll file an issue on that with them.

I'm also noticing this very interesting bug on NVDA + Chrome/Firefox where opening a popup with the keyboard causes the popup to open very left and very up of the actual point, so much so that the map scrolls. I'm not sure how much of this is MapML and how much of it is Leaflet since last I checked, Leafalet didn't even have popups that were keyboard accessible, but possibly worth noting.

The bug you're seeing with misplaced popups has been noted in comments before, but it deserves its own issue: filed #423. And it's true Leaflet markers aren't operable using screen readers, setting role="button" on markers fixes the issue (upstream issue has been filed as noted in #247 (comment)). It has been fixed in this component however.

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

2 participants