-
Notifications
You must be signed in to change notification settings - Fork 172
feat: add keyboard accessibility for timepicker #2613
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
base: master
Are you sure you want to change the base?
feat: add keyboard accessibility for timepicker #2613
Conversation
|
Thanks for the pull request, @asajjad2! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2613 +/- ##
==========================================
+ Coverage 93.02% 94.78% +1.75%
==========================================
Files 756 1235 +479
Lines 13708 28033 +14325
Branches 2961 6365 +3404
==========================================
+ Hits 12752 26571 +13819
- Misses 920 1387 +467
- Partials 36 75 +39 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Thanks, this looks nice! Please let me know when it's ready for review. Also, will this work with v8 ? #2572 |
bradenmacdonald
left a comment
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.
Thanks for this PR! Unfortunately I am seeing a few issues.
Here is a screenshot of Chrome's a11y view showing all the issues:
- The
ariaLabelprop you gave is being ignored. If you put// @ts-checkat the top of the file, you'll see thatDatePickerdoesn't accept anariaLabelprop, and it also seems to ignorearia-label. You can also see in my screenshot that this element has no accessible name/label other than its placeholder ("HH:MM") which isn't helpful.

- There is a
<label>element from the<Form.Group>that is supposed to be providing a label (e.g. "Course start time") for this control, but theidprop is not being set on the<DatePicker>/<input>element, so theForm.Groupis broken and the label is invalid - which Chrome's a11y viewer is warning about. We need to either generate a unique ID and pass it to theForm.GroupascontrolId, or use the form group context to get the auto-generated ID and pass it in to the<DatePicker>/<input>. This is affecting the dates as well as the times.
What are the relevant tickets?
#9097
Description (What does it do?)
Time fields in Schedule settings rely on react-datepicker's time-only popover. This PR adds ARIA labels and screenreader hints to improve accessibility for keyboard and screen-reader users.
Note: Keyboard navigation (ArrowUp/ArrowDown and Enter key) for the time picker is now handled upstream in react-datepicker. This PR focuses solely on adding proper ARIA labels and screenreader instructions.
The changes include:
ariaLabelto the time picker input with instructions about using arrow keysariaDescribedByto associate the input with screenreader hintsidattributes for ARIA associationsScreencast (this is now handled in react-datepicker upstream)
Screen.Recording.2025-11-11.at.3.38.55.PM.mov
How can this be tested?
aria-labelandaria-describedbyattributes