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

feat: add skip-to-content button #7235

Closed

Conversation

RedYetiDev
Copy link
Member

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.

image
image

Related Issues

Fixes #7220

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run npm run format to ensure the code follows the style guide.
  • I have run npm run test to check if all tests are passing.
  • I have run npx turbo build to check if the website builds without errors.
  • I've covered new added functionality with unit tests if necessary.

@RedYetiDev RedYetiDev requested a review from a team as a code owner November 16, 2024 17:02
Copy link

vercel bot commented Nov 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nodejs-org ✅ Ready (Inspect) Visit Preview Nov 16, 2024 5:04pm

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.

Copy link
Member

@canerakdas canerakdas left a 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
Copy link
Member

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'
Copy link
Member

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

@RedYetiDev
Copy link
Member Author

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.

@RedYetiDev RedYetiDev closed this Nov 16, 2024
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.

Adding a "Skip to Content" Link
2 participants