rangeslider.js
rangeslider.js copied to clipboard
Removes keyboard support
The slider control has keyboard arrow-key support, probably some other keys and input events too. The plugin removes that support, making it kinda hard for people who are handicapped and not nearly as fast with a mouse.
What I'm observing (at least in Firefox; haven't tested other browsers) is that rangeslider__handle can receive focus, and while it is focused the arrow keys do change the value of the slider. But the range slider only changes visually after rangeslider__handle loses focus (and then, in the demo, both the number and slider position change). So perhaps we could bind a function to the .focus() event for the rangeslider__handle that would watch for changes and update the slider accordingly (and use debounce to keep the function from becoming inefficient from firing constantly while the element has focus)?
Just brainstorming. :)
I would also like to see support for allowing the user to type a number and have the slider match the keypresses. Other than usability and accessibility, this is also good for UI automation.
Thanks @brunoais for the PR to fix this. This is surely critical functionality for every use case (for accessibility, if nothing else).
@andreruffert - thanks for your great work on this project - is there any reason not to accept the PR to fix this?