-
Notifications
You must be signed in to change notification settings - Fork 72
LG-3879: fix(DatePicker) Updates DatePicker Next/Prev button aria-labels #3224
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
Conversation
🦋 Changeset detectedLatest commit: 518338a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
Pull Request Overview
This PR improves the accessibility of the DatePicker component by updating ARIA labels for navigation buttons and select elements, and hiding calendar cell text from screen readers to prevent redundant announcements.
Key Changes:
- Enhanced ARIA labels for previous/next month navigation buttons to include destination month information
- Updated month and year select elements with clearer ARIA labels using parenthetical notation
- Added
aria-hiddenattribute to calendar cell text spans to prevent duplicate screen reader announcements
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| CalendarCell.tsx | Added aria-label prop handling and aria-hidden attribute to cell text |
| DatePickerMenuSelectYear.tsx | Improved year select aria-label format and extracted year string variable |
| DatePickerMenuSelectMonth.tsx | Updated month select aria-label format and added getMonthName import |
| DatePickerMenuHeader.tsx | Refactored chevron button aria-labels to include destination month information |
| DatePickerMenu.spec.tsx | Updated tests to use data-testid selectors and verify aria-label content |
| DatePicker.testutils.tsx | Switched from aria-label to data-testid selectors for chevron buttons |
| date-picker-aria.md | Added changeset documentation for the accessibility improvements |
packages/date-picker/src/shared/components/Calendar/CalendarCell/CalendarCell.tsx
Outdated
Show resolved
Hide resolved
...ages/date-picker/src/DatePicker/DatePickerMenu/DatePickerMenuHeader/DatePickerMenuHeader.tsx
Show resolved
Hide resolved
...ages/date-picker/src/DatePicker/DatePickerMenu/DatePickerMenuHeader/DatePickerMenuHeader.tsx
Outdated
Show resolved
Hide resolved
|
Size Change: +272 B (+0.02%) Total Size: 1.8 MB
ℹ️ View Unchanged
|
e33f9b9 to
659594b
Compare
Co-authored-by: Copilot <[email protected]>
659594b to
8505afe
Compare
|
Coverage after merging at/LG-3879-date-picker-vo into main will be
Coverage Report for Changed Files
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
commit cb03690 Merge: f201865 dbf5b75 Author: Adam Michael Thompson <[email protected]> Date: Wed Dec 3 14:26:43 2025 -0500 Merge branch 'main' into at/wizard-integration commit f201865 Merge: 814af43 7a1b203 Author: Adam Michael Thompson <[email protected]> Date: Wed Dec 3 14:26:14 2025 -0500 Merge branch 'at/wizard-integration' of https://github.com/mongodb/leafygreen-ui into at/wizard-integration commit 814af43 Author: Adam Michael Thompson <[email protected]> Date: Wed Dec 3 14:26:03 2025 -0500 Update getTestUtils.tsx commit 7a1b203 Author: Adam Thompson <[email protected]> Date: Wed Dec 3 14:25:00 2025 -0500 Update packages/wizard/src/WizardStep/WizardStep.tsx Co-authored-by: Copilot <[email protected]> commit 83f936e Author: Adam Thompson <[email protected]> Date: Wed Dec 3 14:24:54 2025 -0500 Update packages/lib/src/childQueries/findChildren/findChildren.spec.tsx Co-authored-by: Copilot <[email protected]> commit f4a1e3d Author: Adam Thompson <[email protected]> Date: Wed Dec 3 14:24:33 2025 -0500 Update packages/lib/src/childQueries/findChild/findChild.spec.tsx Co-authored-by: Copilot <[email protected]> commit a219fae Author: Adam Thompson <[email protected]> Date: Wed Dec 3 14:24:23 2025 -0500 Update packages/wizard/src/Wizard/Wizard.tsx Co-authored-by: Copilot <[email protected]> commit dbf5b75 Author: Stephen Lee <[email protected]> Date: Wed Dec 3 10:16:56 2025 -0800 fix: publish script (#3356) commit 918b3a5 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed Dec 3 01:41:06 2025 +0000 Version Packages (#3354) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> commit 0c523f5 Author: Stephen Lee <[email protected]> Date: Tue Dec 2 15:12:23 2025 -0800 chore: update release pipeline (#3355) * chore: update release pipeline * refactor: update publish script commit 0c42aba Author: Adam Thompson <[email protected]> Date: Mon Dec 1 19:03:38 2025 -0500 LG-3879: fix(DatePicker) Updates DatePicker Next/Prev button aria-labels (#3224) * updates chevron button labels * update select labels * update calendar cell label * Create date-picker-aria.md * Update DatePickerMenu.spec.tsx * Update DatePicker.testutils.tsx * Update date-picker-aria.md * Apply suggestion from @Copilot Co-authored-by: Copilot <[email protected]> * Apply suggestion from @TheSonOfThomp --------- Co-authored-by: Copilot <[email protected]> commit 6e49fef Merge: c462dca 9e5932c Author: Adam Thompson <[email protected]> Date: Mon Dec 1 18:27:25 2025 -0500 Merge branch 'main' into at/wizard-integration commit 9e5932c Author: Adam Rasheed <[email protected]> Date: Mon Dec 1 13:28:47 2025 -0600 [LG-5760] chore: FormFooter Sticky Styling (#3344) * [LG-5760] chore: FormFooter Sticky Styling * updated story * updates pt1 * updated story, style cleanup * cleanup, added changeset commit fa89f65 Author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed Nov 26 23:12:40 2025 +0000 Version Packages (#3353) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> commit 837a0e7 Author: Adam Thompson <[email protected]> Date: Wed Nov 26 16:10:48 2025 -0500 Update pr.yml (#3352) commit 651c0bb Author: Nima Taheri <[email protected]> Date: Wed Nov 26 13:05:53 2025 -0800 LG-5588 Fix array field updates in chart options merge (#3351) * feat: correctly merge array-fields (choose full override, no recursive) * docs
…els (#3224) * updates chevron button labels * update select labels * update calendar cell label * Create date-picker-aria.md * Update DatePickerMenu.spec.tsx * Update DatePicker.testutils.tsx * Update date-picker-aria.md * Apply suggestion from @Copilot Co-authored-by: Copilot <[email protected]> * Apply suggestion from @TheSonOfThomp --------- Co-authored-by: Copilot <[email protected]>
✍️ Proposed changes
'@leafygreen-ui/date-picker': patch
LG-3879
Updates ARIA labels for DatePicker menu previous/next buttons, and year/month select elements.
Hides calendar cell text, so screen-readers only read the cell's
aria-value.