-
Notifications
You must be signed in to change notification settings - Fork 535
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
Added ability to scroll with keyboard #587
Conversation
Great stuff! Thanks! |
@Grsmto this should be configurable since it breaks existing keyboard navigation in existing products. According to your previous comment:
Which makes total sense. Is it possible to make it configurable? |
I don't understand the need for setting the tabindex on the wrapper container. It might be needed for pure text content, but with an tabable item in it, it was completely fine before the change. Now it's an unnecessary extra tab. Also some extra css for the focus state is needed to keep up with existing UI. The change might be fine if it's optional or can be disabled. |
Hard coding I can remove the parent role in my page but I'm unable to update this For now I'm just going to use a version prior to this change. I agree with other comments, this feature should be configurable, ideally disabled by default. |
For anyone who wants to disable this behavior, you can use the following pattern: const simpleBar = new SimpleBarJS(scrollElement, options);
simpleBar.contentWrapperEl.removeAttribute("tabindex"); This isn't ideal, but it works until the feature is made configurable (if ever). |
Where did this end up? @mcuppi 's workaround works for me, but is it still necessary? |
After Grsmto#587, there had been many complaints about `tabIndex=0` breaking existing behaviour. This PR adds `tabIndex` as an option with it's default set to 0.
After Grsmto#587, there had been many complaints about `tabIndex=0` breaking existing behaviour. This PR adds `tabIndex` as an option with it's default set to 0.
* options: Add tabIndex as a configurable option. After #587, there had been many complaints about `tabIndex=0` breaking existing behaviour. This PR adds `tabIndex` as an option with it's default set to 0. * README: Add ariaLabel as an option.
|
time for a release then |
Latest release already has this change. |
|
It was impossible to scroll slider with keyboard in Chrome and Safari.
I added
tabindex="0"
to allow focusing on slider andaria-label
for screen readers.More info here https://marcus.io/blog/accessible-overflow