-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Improve time picker accessibility #4181
Improve time picker accessibility #4181
Conversation
theopolisme
commented
Jul 30, 2023
- Explicitly declare the Time picker as a listbox
- Add support for keyboard Arrow events to navigate the Time picker (per listbox keyboard interaction requirements)
- When Time picker focused, initially focus the currently selected time, or whatever time was initially scrolled into view, rather than always focusing the last time (fixes Keyboard navigation when including times is very cumbersome (Accessibility) #3785)
* Explicitly declare the Time picker as a listbox * Add support for keyboard Arrow events to navigate the Time picker * When Time picker focused, initially focus the currently selected time, or whatever time was initially scrolled into view, rather than always focusing the last time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ This pull request was sent to the PullRequest network.
@theopolisme you can click here to see the review status or cancel the code review job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PullRequest Breakdown
Reviewable lines of change
+ 97
- 21
59% JavaScript
41% JavaScript (tests)
Type of change
Feature - These changes are adding a new feature or improvement to existing code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall the change looks good and has appropriate testing. A minor React issue is noted, but it's not something that impacts functionality.
Reviewed with ❤️ by PullRequest
return times.map((time, i) => { | ||
return ( | ||
<li | ||
key={i} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code was not modified in this PR (just whitespace changes)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
event.target.nextSibling | ||
) { | ||
event.preventDefault(); | ||
event.target.nextSibling.focus(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report
@@ Coverage Diff @@
## main #4181 +/- ##
==========================================
- Coverage 94.02% 93.75% -0.28%
==========================================
Files 20 20
Lines 1890 1904 +14
Branches 458 464 +6
==========================================
+ Hits 1777 1785 +8
- Misses 40 43 +3
- Partials 73 76 +3
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PullRequest reviewed the updates made to #4181 since our last review was posted. This includes comments that have been posted by non-PullRequest reviewers. No further issues were found.
Reviewed by:
Looks good, merging. Thank you! |