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

[accessibility] Convey context menu items as buttons #136

Open
Malvoz opened this issue Dec 9, 2020 · 1 comment
Open

[accessibility] Convey context menu items as buttons #136

Malvoz opened this issue Dec 9, 2020 · 1 comment

Comments

@Malvoz
Copy link

Malvoz commented Dec 9, 2020

Assistive technology such as screenreaders convey the context menu items (<a>) as a "link". I believe in more cases than not the context menu items behave more like buttons than links. Therefore I suggest using role=button for the context menu items.

Notes:

The W3C Maps for HTML Community Group implemented this for a custom element here.

This would also align with Leaflet controls:
https://github.com/Leaflet/Leaflet/blob/bdd7ebf836201550f6d173943b728098b83f40d5/src/control/Control.Zoom.js#L89-L91

(alternatively, use <button> instead.)

@Malvoz
Copy link
Author

Malvoz commented Jan 12, 2021

Also see the WAI-ARIA Authoring Practices recommended keyboard interactions for buttons.

Other potentially helpful resources:

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

No branches or pull requests

1 participant