chore: Adds group role and aria label to flash focus#3263
Merged
orangevolon merged 1 commit intomainfrom Feb 17, 2025
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3263 +/- ##
========================================
Coverage 96.42% 96.42%
========================================
Files 791 791
Lines 22580 22582 +2
Branches 7386 7802 +416
========================================
+ Hits 21772 21774 +2
+ Misses 801 754 -47
- Partials 7 54 +47 ☔ View full report in Codecov by Sentry. |
3540939 to
8f6e381
Compare
orangevolon
commented
Feb 12, 2025
| for (const { item, expectedLabel } of flashItemsWithExpectedLabels) { | ||
| const focusContainer = within(item.getElement()!).getByRole('group', { | ||
| name: expectedLabel, | ||
| }); |
Member
Author
There was a problem hiding this comment.
Using react testing library to get the actual computed label. Alternatively we could assert against the aria-labelledby and id props, but that would be relying on internal implementations.
8f6e381 to
d329aa5
Compare
cansuaa
reviewed
Feb 17, 2025
d329aa5 to
e7a5133
Compare
cansuaa
approved these changes
Feb 17, 2025
georgylobko
pushed a commit
that referenced
this pull request
Feb 18, 2025
orangevolon
added a commit
that referenced
this pull request
Feb 19, 2025
This reverts commit c6ed14c.
orangevolon
added a commit
that referenced
this pull request
Feb 20, 2025
orangevolon
added a commit
that referenced
this pull request
Feb 25, 2025
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
Adds proper role and label to the focus target in collapsed flashbar.
Related links, issue #, if available: AWSUI-60238
How has this been tested?
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.