fix: Fix ariaLabel support for date range picker#4331
Open
avinashbot wants to merge 4 commits intomainfrom
Open
fix: Fix ariaLabel support for date range picker#4331avinashbot wants to merge 4 commits intomainfrom
avinashbot wants to merge 4 commits intomainfrom
Conversation
avinashbot
commented
Mar 4, 2026
| inlineTokens?: boolean; | ||
| ariaHasPopup?: 'true' | 'listbox' | 'dialog'; | ||
| ariaControls?: string; | ||
| ariaLabel?: string; |
Member
Author
There was a problem hiding this comment.
Not used anymore, since the select trigger also switched to the ariaLabelledby-only implementation.
905fb43 to
79af340
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4331 +/- ##
=======================================
Coverage 97.43% 97.43%
=======================================
Files 897 897
Lines 26342 26344 +2
Branches 9516 9516
=======================================
+ Hits 25667 25669 +2
Misses 669 669
Partials 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
amanabiy
approved these changes
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Turns out the
ariaLabelattribute doesn't actually work on the date range picker — because there's always anaria-labelledbycoming from the trigger itself, which always overridesaria-label. Whoops. Not breaking any new ground with the implementation here; keeping the implementation consistent with what we do in the select component.One thing I did change is moving
ariaLabelout ofi18nStringsand putting it in the top level. This is also consistent with what we did in other components; it was just missed in this one.i18nStringsare for properties that are always static, not situation-dependent.Related links, issue #, if available: AWSUI-61769
How has this been tested?
Added unit tests.
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.