-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
fix(a11y,client): improve focus handling and scrolling behavior in router #4943
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
Conversation
For skip link thing, it still needs #4940. But I'm thinking of going with |
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.
Pull Request Overview
This PR improves accessibility by centralizing focus handling in the router's scrollTo function, removing duplicate focus logic from individual components.
- Consolidated focus management logic into the router's scrollTo function
- Removed custom focus handling from VPSkipLink and VPDocOutlineItem components
- Added proper focus restoration for elements that are temporarily made focusable
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/client/theme-default/components/VPSkipLink.vue | Removed custom focus handling and simplified skip link implementation |
src/client/theme-default/components/VPDocOutlineItem.vue | Removed custom onClick handler for focus management |
src/client/app/router.ts | Enhanced scrollTo function with comprehensive focus handling and tabindex management |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
39baaaa
to
da2a99c
Compare
Before (key strokes are not shown, but I'm pressing tab after clicking):
Screen.Recording.2025-09-13.at.3.20.39.PM.mov
After:
Screen.Recording.2025-09-13.at.3.21.37.PM.mov