Skip to content
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($theme-default): display header-anchor links when using keyboard navigation #123

Merged
merged 1 commit into from
Nov 16, 2020

Conversation

ramiy
Copy link
Contributor

@ramiy ramiy commented Nov 12, 2020

a11y: When using keyboard navigation the header-anchor link (the # tag before the heading) is not visible, this PR fixies this bug.

To recreate the issue, try navigating using you keyboard (with the TAB key) in a page with many h1-h6 headings. You won't see the heading-anchor link (the # tag before the heading). But when you hover with your mouse over a heading you will see the heading-anchor link.

Why? because the code uses only :hover (for mouse users). It should also include :focus (for keyboard users).

The same PR accepted on vuePress, see vuejs/vuepress#2699

@kiaking
Copy link
Member

kiaking commented Nov 16, 2020

Oh neat! Thank you so much 🙌

@kiaking kiaking merged commit 6931ebd into vuejs:master Nov 16, 2020
@ramiy ramiy deleted the patch-1 branch November 17, 2020 13:02
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants