-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
fix(spatial-navigation): focus lost in error modal #8817
Merged
Merged
Conversation
This file contains 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
CarlosVillasenor
changed the title
fix(spatial navigation): focus lost in error modal
fix(spatial-navigation): focus lost in error modal
Jul 25, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8817 +/- ##
==========================================
+ Coverage 83.68% 83.80% +0.11%
==========================================
Files 120 120
Lines 8030 8050 +20
Branches 1927 1930 +3
==========================================
+ Hits 6720 6746 +26
+ Misses 1310 1304 -6 ☔ View full report in Codecov by Sentry. |
…ableComponents' array
…d' for buttons of modal error
CarlosVillasenor
requested review from
bzizmo,
dzianis-dashkevich and
wseymour15
July 26, 2024 19:57
dzianis-dashkevich
approved these changes
Jul 29, 2024
|
||
// Focus the buttons of the modal | ||
if (this.focusableComponents.length > 1) { | ||
this.focusableComponents[1].focus(); |
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.
- Why do we focus 2nd element here, not first?
- What if a modal has exactly one focusable element? (this if statement does not cover this case)
This was referenced Sep 25, 2024
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
The spatial-navigation is unable to focus certain elements of the error modal when this appears, this PR will fix that
Specific Changes proposed
Allow the spatial-navigation to focus certain non-component elements in the error modal
Requirements Checklist
npm run docs:api
to error