-
-
Notifications
You must be signed in to change notification settings - Fork 660
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
How to add aria-label to noUiHandler #1019
Comments
Sorry, what are you asking? |
I ended up adding the aria-label attribute via javascript, sorry thanks. in case someone else needs to resolve axe violation for that |
I'm also doing accessibility testing with axe accessibility testing tool and came across this same problem. Basically it would be nice if there was an option to give the slider handle "aria-label" attribute. Currently screen readers read out only the "aria-valuetext" when handle is focused, which by itself might be confusing for some users. Other options could be giving the handle either "id" or "aria-labelledby" attribute, but these would require always having either label or some other element containing description text. MDN examples This is not that big a deal though, since like akinhwan said the attribute(s) can be added after slider initialization using some JS. Just thought I'd clarify what is asked here :) |
I'm open for suggestions on this feature. It could look something like this: noUiSlider.create(slider, {
start: [20, 80],
handleAttributes: [
{ 'aria-label': 'lower' },
{ 'aria-label': 'upper' },
],
range: {
'min': 0,
'max': 100
}
}); |
@leongersen your solution seems good to me, are you thinking implementing this ? |
The Thank you for contributing, everybody! |
Thank you @leongersen, I just wanted to see if i could implement this and possibly open a PR only to find out you already did this. Much appreciated! |
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. |
How can i add an aria-label attribute to this dynamic div?
The text was updated successfully, but these errors were encountered: