Skip to content

chore: Adds group role and aria label to flash focus#3263

Merged
orangevolon merged 1 commit intomainfrom
alamiami/issue-a11y-flashbar-focus-2
Feb 17, 2025
Merged

chore: Adds group role and aria label to flash focus#3263
orangevolon merged 1 commit intomainfrom
alamiami/issue-a11y-flashbar-focus-2

Conversation

@orangevolon
Copy link
Member

@orangevolon orangevolon commented Feb 7, 2025

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?

  • Newly added unit test
  • Manual check with voice over
Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.42%. Comparing base (d34642b) to head (e7a5133).
Report is 2 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

@orangevolon orangevolon force-pushed the alamiami/issue-a11y-flashbar-focus-2 branch from 3540939 to 8f6e381 Compare February 12, 2025 09:28
for (const { item, expectedLabel } of flashItemsWithExpectedLabels) {
const focusContainer = within(item.getElement()!).getByRole('group', {
name: expectedLabel,
});
Copy link
Member Author

@orangevolon orangevolon Feb 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@orangevolon orangevolon force-pushed the alamiami/issue-a11y-flashbar-focus-2 branch from 8f6e381 to d329aa5 Compare February 12, 2025 15:16
@orangevolon orangevolon marked this pull request as ready for review February 12, 2025 15:19
@orangevolon orangevolon requested a review from a team as a code owner February 12, 2025 15:19
@orangevolon orangevolon requested review from cansuaa and removed request for a team February 12, 2025 15:19
@orangevolon orangevolon added this pull request to the merge queue Feb 17, 2025
Merged via the queue into main with commit c6ed14c Feb 17, 2025
38 checks passed
@orangevolon orangevolon deleted the alamiami/issue-a11y-flashbar-focus-2 branch February 17, 2025 14:30
orangevolon added a commit that referenced this pull request Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants