svg-pan-zoom
svg-pan-zoom copied to clipboard
Add keyboard accessibility to zoom controls
Currently, the zoom feature in this library appears to only be usable by mouse or touchpad devices.
Because the
I would recommend adding keyboard event listeners wherever click/touchstart events are. Keyboard event listeners can look for whether the Enter or Space key is entered, and on keypress, zoom in or out accordingly depending on which button the keyboard pressed.
Additionally, the user should be able to use the arrow keys to navigate throughout the SVG and focus on certain areas, similar to the way a mouse user can drag the SVG to focus on certain areas.
This shouldn't take away from any other features, and only add more accessibility to the library.
Thanks for the feedback. I definitely support this and have added the "help wanted" label to encourage anyone from the community to make a pull request.