-
-
Notifications
You must be signed in to change notification settings - Fork 659
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
Keyboard support for nouislider #724
Comments
If it is a testable solution, I'd absolutely be willing to work on integrating it with you! My main concerns would be:
|
Focus-able handles (and prevent focus stealing) Accessibility (there's another issue about ARIA integration, I'd think these features have some overlap) According to our accessibility guys, it is workable solution. I will work on the reference implementation in my forked repo and then share it. It is my first time contributing to OS project, so it is all new to me. |
I'd love to see keyboard access, and good screenreader access, for this excellent slider and was going to add it myself when I saw this issue. Has there been any further progress on this? chabbrik, is your forked version usable as it is for keyboard access as it stands now? I'd be happy to contribute where I can if that helped. |
I'd be very happy to see this added. Here's how you can help:
|
I just shipped Aria support in #685. Keyboard support is a little more complicated, and I haven't gotten around to it yet. A pull request would be very welcome. There already is an API for determining the previous and next steps for a handle, see this example. |
Hey there. I'll be glad to see this implemented. Yes keyboard should be configurable. Agreed. Eventlisteners for keys have to be registered and unregistered with focus/blur. But it looks like this should be doable. |
Adding keyboard support for a linear slider is trivial, see this example. For non-linear sliders there'd a least need to be a setting for what step to use in sub-ranges that do not have a step defined, e.g. |
It took a (long!) time, but noUiSlider 13.0.0 now comes with keyboard support build in. Thanks, everybody, for contributing! |
As an other nouislider user wrote in an other forum, I also can work smoothly with nouisliders with screenreader (thank you for your work). As suggested by the user, it would be great if beneath the arrow up / down keys for stepwiseslider value changes, it would be great if it is possible to slide with pageup / pagedown in larger steps and also with home / end to move slider to top / bottom or left / right end of sliders. since many years this is established in mac osx and windows range / slider controls and widely well implemented in nearly any application ( sadly not in libraries like jquery, ...). So: I am working as blind screenreader user by defelop a audio mixer app by using nouisliders as faders. Nouislider is a perfect possibility also because when entering with keyboard focus, your slider stay at current value, most other evaluated sliders and range controls jump to bottom or left end while entering. Now, I have successfully edited the relevant function in your nouislider library source code. with this additional lines of code, it is possible to navigate with pageup / pagedown keys in a screenreader / with keyboard:
|
Addendum:
Also, I renamed within the eventKeydown function the variable names in context of the keyboard shortcuts [pageUp] and [pageDown]. So it is now more clear what the code does and is same logical concept as up/down and left/right. // you can add simply a default value to the NoUiSlider.create() option parameter list like this:// ... // To do once: within nouislider.js library file: // and within the test object structure
// declare the option name, set default as optional and declare the test function name: // and here, the whole updated eventKeydown function:
|
@michaelvogt33 Would you consider opening a PR with your suggested changes? |
Support for PageUp/PageDown and Home/End is now in noUiSlider 14.1.0. Thanks, @michaelvogt33! |
Is there keyboard support for two-ended range sliders? It's not working for me out-of-the-box. const sliderEl = document.querySelector('#slider');
const options = {
behaviour: 'drag-tap',
connect: true,
range: { min: 0, max: 299 },
step: 1,
start: [0]
};
const sliderInstance = noUiSlider.create(sliderEl, options); I'm using |
@hyvyys Yes, keyboard support works for sliders with any number of handles. What do you mean by two-ended? |
Hi I have version 10.0.0 of nouislider and would like to upgrade to have keyboard and aria support. Are there any people in the community that could give me some paid for support to do the upgrade? I tried swapping out the js and lost the handles so I figure I could use some expert support. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hello,
As part of accessibility work, we implemented support for keyboard to manipulate slider handles. I would love to see it integrated into the core code base, if it seems useful.
Let me know, if that is something you want me to work on.
The text was updated successfully, but these errors were encountered: