Skip to content

fix(theme): skip link jumps to aside instead main content heading/anchor - #4940

Open
userquin wants to merge 2 commits into
mainfrom
userquin/fix-skip-to-content
Open

fix(theme): skip link jumps to aside instead main content heading/anchor#4940
userquin wants to merge 2 commits into
mainfrom
userquin/fix-skip-to-content

Conversation

@userquin

@userquin userquin commented Sep 10, 2025

Copy link
Copy Markdown
Member

Description

This PR just search for the first h1 heading with tabindex inside #VPContent main instead just inside #VPContent.

This PR also adds position: fixed to the skip link anchor, the skip to content anchor scrolls with the content.

The result will be similar to clicking on the first aside link if present without changing the route.

Since Skip to Content has an anchor to #VPContent there is no way to avoid changing the url.

Linked Issues

Additional Context


Tip

The author of this PR can publish a preview release by commenting /publish below.

@userquin

Copy link
Copy Markdown
Member Author

don't merge yet, we're going to change a few things to simplify the logic

@bluwy

bluwy commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

What's the status of this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants