CliffCloud / Leaflet.EasyButton

leaflet control buttons with icons and callbacks
http://cliffcloud.github.io/Leaflet.EasyButton/v1/
MIT License
520 stars 124 forks source link

[accessibility] Activating a button using a keyboard should not set focus to the map element #100

Open Malvoz opened 3 years ago

Malvoz commented 3 years ago

When a button is activated using keyboard, the focus is set to the map element:

https://github.com/CliffCloud/Leaflet.EasyButton/blob/cd53db586a10d5a9c4efed003327cad29f4760bf/src/easy-button.js#L193

This is not the standard behavior of activating buttons, and is problematic because a keyboard-only user will have to tab through all the content to get back to the previously focused element if they wish to continue to explore the user interface.

Malvoz commented 2 years ago

Other potentially helpful resources: