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(skip-to-content): add explicit href to component, add id to… #607

Merged
merged 1 commit into from
Dec 12, 2019
Merged

fix(skip-to-content): add explicit href to component, add id to… #607

merged 1 commit into from
Dec 12, 2019

Conversation

jendowns
Copy link
Contributor

@jendowns jendowns commented Dec 11, 2019

Closes #606

The SkipToContent component needs to target part of the page so that keyboard users can jump to it, so I suggest adding id="main-content" to the <main> element of each page. NOTE: this would not include homepage, since it doesn't appear to have a SkipToContent link -- is that acceptable?

Also, since the default href for the SkipToContent is #main-content, I suggest explicitly defining it where the component is used so that folks who come along later can quickly see where the link goes. 👍

Changelog

New

  • add href="#main-content" to the SkipToContent component
  • add id="main-content" to the <main> element on each (non-homepage) page.

@vercel
Copy link

vercel bot commented Dec 11, 2019

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/carbon-design-system/gatsby-theme-carbon/fjyxu0rmt
🌍 Preview: https://gatsby-theme-carbon-git-fork-jendowns-skip-to-content-link.carbon-design-system.now.sh

@vpicone
Copy link
Contributor

vpicone commented Dec 12, 2019

I like explicitly defining it as well, thanks for this!

@vpicone vpicone changed the title fix(skip-to-content): add explicit href to component, add id to target fix(skip-to-content): add explicit href to component, add id to… Dec 12, 2019
@vpicone vpicone merged commit 068fec5 into carbon-design-system:master Dec 12, 2019
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.

[SkipToContent]: does not target any part of the page to allow skipping
2 participants