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

[a11y] expose a callback for when the user hits tab or shift tab inside the day picker #1427

Merged

Conversation

Sumeet-Jain
Copy link

For an upcoming refactor, we need to be able to listen for when the user
hits tab inside the day picker. This is to support an a11y change in
which the daypicker will become an immediate sibling of the date input
so the user can just naturally tab into it. The problem is that when the
user hits tab to exit the day picker, we need to close the calendar,
which is currently done inside the DateRangePickerInputController. The bigger
refactor will be done in another pr

Testing

Npm linked this change and then tested e2e refactor. Also added a spec

Reviewers

@majapw

the day picker

For an upcoming refactor, we need to be able to listen for when the user
hits tab inside the day picker. This is to support an a11y change in
which the daypicker will become an immediate sibling of the date input
so the user can just naturally tab into it. The problem is that when the
user hits tab to exit the day picker, we need to close the calendar,
which is currently done inside the DateRangePickerInputController.
@coveralls
Copy link

coveralls commented Oct 22, 2018

Coverage Status

Coverage increased (+0.03%) to 85.011% when pulling be3b523 on Sumeet-Jain:sumeetj--expose-on-tab-for-day-picker into 6002537 on airbnb:master.

@ljharb ljharb added the semver-minor: new stuff Any feature or API addition. label Oct 22, 2018
@ljharb ljharb requested a review from majapw October 22, 2018 22:28
Copy link
Collaborator

@majapw majapw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems great! One small comment.

src/components/DayPicker.jsx Show resolved Hide resolved
src/components/DayPickerRangeController.jsx Show resolved Hide resolved
@Sumeet-Jain
Copy link
Author

@majapw @ljharb could one of you merge in this pr :)

Also, whats the release cycle like for react dates?

@majapw majapw merged commit 2573dc4 into react-dates:master Oct 30, 2018
@majapw
Copy link
Collaborator

majapw commented Oct 30, 2018

Sorry @Sumeet-Jain! I'll do a release right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor: new stuff Any feature or API addition.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants