Skip to main content

When keyboard-only users interact with your site they use the tab key to jump from link to link. If you have a lot of links at the first of your page in your header or in a menu, they must tab through those every time they come to a new page just to get to the main content. Providing a skip to main content link allows them to easily bypass this.

Note: These techniques are also sometimes referred to as “skip navigation links”.

Here is a demonstration of what keyboard-only users must do to navigate a page without a skip to main content link.

You should include a tabindex=”-1″ on the target of the skip link. IE and Chrome both require this attribute to be present to make the skip link work consistently.

Having a skip to main content link appear when it receives keyboard focus

The text is hidden offscreen in a manner that allows screen reader users to interact with it.

Source Code

a.skip-main {
a.skip-main:focus, a.skip-main:active {
    color: #fff;
    left: auto;
    top: auto;
    width: 30%;
    height: auto;
    margin: 10px 35%;
    border-radius: 15px;
    border:4px solid yellow;
<a class="skip-main" href="#main">Skip to main content</a>
<h1>Skip to Main Content - Keyboard Accessible</h1>
  <li><a href="#">Nav Item 1</a></li>
  <li><a href="#">Nav Item 2</a></li>
  <li><a href="#">Nav Item 3</a></li>
  <li><a href="#">Nav Item 4</a></li>
<p id="main" tabindex="-1">This is the main content. In this example you will note that the &quot;Skip to main content&quot; link appears when I tab through the page. This allows keyboard-only users, in addition to screen reader users, an easy way to skip repetitive navigation. The key components to implementing this are</p>
  <li>provide a link at the top of the page that says "skip to main content"</li>
  <li>have it link to an internal anchor further down in the page where the main content begins.</li>
  <li>use CSS :focus and :activate to make the skip link visible when the user tabs to it</li>


View the skip to main content implementation on the W3C’s Web Accessibility Initiative’s homepage.