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 DayPicker-wrapper to tabindex="0" #709

Closed
jr-codes opened this issue May 1, 2018 · 0 comments
Closed

Can't set DayPicker-wrapper to tabindex="0" #709

jr-codes opened this issue May 1, 2018 · 0 comments

Comments

@jr-codes
Copy link

jr-codes commented May 1, 2018

<DayPicker tabIndex={1}> works, but <DayPicker tabIndex={0}> still sets the tabindex to "-1".

https://codesandbox.io/s/20r8y4y4xr

Setting the tabindex to 0 would be nice for the case when months are restricted and previous/next buttons are no longer displayed. Using the arrow keys to navigate through the months when the wrapper is focused is a nicer experience than when the buttons are focused (focus is lost when the button is hidden, and the user has to tab or shift + tab to focus on the other button).

@gpbl gpbl closed this as completed in 06edeb1 May 6, 2018
gpbl added a commit that referenced this issue May 6, 2018
Check if `tabIndex` is `undefined` (fix #709)
kimamula pushed a commit to kimamula/react-day-picker that referenced this issue Aug 17, 2022
kimamula pushed a commit to kimamula/react-day-picker that referenced this issue Aug 17, 2022
Check if `tabIndex` is `undefined` (fix gpbl#709)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants