Skip to content

Conversation

brc-dd
Copy link
Member

@brc-dd brc-dd commented Sep 13, 2025

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

@brc-dd brc-dd requested a review from userquin September 13, 2025 09:53
@brc-dd
Copy link
Member Author

brc-dd commented Sep 13, 2025

For skip link thing, it still needs #4940. But I'm thinking of going with <main id="main-content"> and link using #main-content instead of manually finding the first heading. I'll update that PR and add main element with id to home too.

@brc-dd brc-dd requested a review from Copilot September 13, 2025 10:47
Copy link
Contributor

@Copilot Copilot AI left a 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.

@brc-dd brc-dd changed the title fix(a11y,client): improve focus handling in router fix(a11y,client): improve focus handling and scrolling behavior in router Sep 13, 2025
@brc-dd brc-dd merged commit d46107f into main Sep 14, 2025
9 checks passed
@brc-dd brc-dd deleted the fix/router-focus branch September 14, 2025 18:08
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