-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
feat: add skip-to-content button #7235
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no suggestions.
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.
I added some minor comments, but overall, the expected behavior should be that after pressing Tab
- Enter
, pressing Tab
again should directly focus on the main content. Currently, it focuses on backward navigation
@@ -23,6 +24,15 @@ const WithNavBar: FC = () => { | |||
|
|||
return ( | |||
<div> | |||
<Button |
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.
I think this should be a link instead of a button, something basic (like GitHub) could be considered for styling
@@ -23,6 +24,15 @@ const WithNavBar: FC = () => { | |||
|
|||
return ( | |||
<div> | |||
<Button | |||
className={ | |||
'!fixed left-0 m-3 -translate-y-16 p-3 !transition focus:translate-y-0' |
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.
the transitions should be motion-safe
, and avoid adding important
Hmm. I didn't realize additional logic was leading besides just #-ing the element. I'll look into this on my own, but I'm closing this for now, as to not take the opportunity from someone else. |
Description
Adds a "Skip Navigation" button. There was no CSS file for the Navbar, so I used inline classes.
Validation
Visit the preview page, and without clicking any elements, press Tab.
Related Issues
Fixes #7220
Check List
npm run format
to ensure the code follows the style guide.npm run test
to check if all tests are passing.npx turbo build
to check if the website builds without errors.