Skip to content
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

Can't set tabIndex on handle #353

Closed
gvincentlh opened this issue Oct 31, 2017 · 5 comments
Closed

Can't set tabIndex on handle #353

gvincentlh opened this issue Oct 31, 2017 · 5 comments

Comments

@gvincentlh
Copy link
Contributor

We need to be able to disable tabbing into the rc-slider-handle by setting tabIndex="-1". Unfortunately it looks like tabIndex on the handle is currently hard-coded to "0", with no ability to override this value.

tabIndex="0"

Could you please add the ability to override tabIndex on the handle?

@gvincentlh gvincentlh changed the title Can't set tabIndex on rc-slider-handle Can't set tabIndex on handle Oct 31, 2017
@paranoidjk
Copy link
Member

It's for keyboard accessibility, could you explain why you need to disable it ? #282

@gvincentlh
Copy link
Contributor Author

@paranoidjk does the why really matter? We'd just like to have control over the tabIndex value on the handle. We want to create an explicit tab order on multiple page elements. Thanks.

@paranoidjk
Copy link
Member

Then we maybe could add a api tabIndex: boolean | number (default to be 1, false to disable)

Would you like PR?

@gvincentlh
Copy link
Contributor Author

@paranoidjk sounds good, yes will submit a PR tomorrow.

@gvincentlh
Copy link
Contributor Author

gvincentlh commented Dec 19, 2017

@paranoidjk see the MDN docs on tabIndex here https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex

We should probably default it to "0" as it is now. Wouldn't want to break the existing behavior. But we should allow it to be overridden via props. I'll expose a tabIndex prop on both the Handle and Slider components. Slider would simply pass it through to Handle, so that we won't have to use a custom handle just to set tabIndex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants