chore: Use CSS-native :focus-visible to track visible focus state (batch 3)
Description
Reducing the potential blast radius of a visual change that affects tons of components. I'll be removing the internal JS-based focus-visible solution in individual batches. This one contains all the weird interesting changes I've had to make, but it's the last one before I remove useFocusVisible() from the components package entirely.
See #3585 for the big original PR.
Related links, issue #, if available: AWSUI-60845
How has this been tested?
Tested the whole big PR in my dev pipeline, and the individual changes just manually.
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
- If the code handles URLs: all URLs are validated through the
checkSafeUrlfunction.
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 Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 96.59%. Comparing base (
c606ac5) to head (bf57dd9).
Additional details and impacted files
@@ Coverage Diff @@
## main #3607 +/- ##
=======================================
Coverage 96.59% 96.59%
=======================================
Files 807 807
Lines 23582 23582
Branches 8261 8271 +10
=======================================
Hits 22780 22780
+ Misses 795 748 -47
- Partials 7 54 +47
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.