-
Notifications
You must be signed in to change notification settings - Fork 122
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
Add skip link to Svelte and SvelteKit sites #245
Conversation
@geoffrich is attempting to deploy a commit to the Svelte Team on Vercel. A member of the Team first needs to authorize it. |
Hmm, you shouldn't need |
There's also coincidentally a discussion earlier about the bug as well that might be related. |
This pull request is being automatically deployed with Vercel (learn more). hn – ./sites/hn.svelte.dev🔍 Inspect: https://vercel.com/svelte/hn/5HdwuEPW9Cdk4FiQhwYNCnbbEvTH svelte-dev – ./sites/svelte.dev🔍 Inspect: https://vercel.com/svelte/svelte-dev/5wFy1Su2U2iwpFMKifeHyroccw2K |
This is ready for review now. I was able to remove |
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.
Works fine for me
This PR adds a skip link to svelte.dev and kit.svelte.dev. This allows users navigating by keyboard or with a screen reader to bypass the main navigation, which they would otherwise need to tab through on every page load. It is hidden until it receives focus with the keyboard, at which point it becomes visible.
Points of note:
I had to setThis was a bug, and is no longer needed since latest SvelteKit fixes itrel="external"
on the skip link. Not doing so made it not work the first time and reset focus to the top of the page, not the main content. Not sure if this is expected or a bug in SvelteKitScreenshot of how it appears when focused: