-
Notifications
You must be signed in to change notification settings - Fork 205
fix: restore focus to header when exiting tutorial #4131
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
base: main
Are you sure you want to change the base?
Conversation
src/tutorial-panel/index.tsx
Outdated
| const headerRef = useRef<HTMLHeadingElement>(null); | ||
| const previousTutorialRef = useRef(context.currentTutorial); | ||
|
|
||
| // Restore focus to the tutorial panel header when exiting a tutorial |
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.
I think it would be better to use the onExitTutorial event more directly rather than observing for changes here, it should make the code a bit clearer to read and avoid needing useEffect
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4131 +/- ##
=======================================
Coverage 97.13% 97.13%
=======================================
Files 873 873
Lines 25562 25572 +10
Branches 9240 9241 +1
=======================================
+ Hits 24830 24840 +10
Misses 685 685
Partials 47 47 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f498833 to
967e1cd
Compare
967e1cd to
01bfe56
Compare
Description
Fix Accessibility issue for focus on the tutorial panel component. When a user exits/dismisses a tutorial, focus is automatically restored to the tutorial panel header to maintain proper keyboard navigation flow.
Related links, issue AWSUI-61570
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.