Rule: Skip to main content link

Rule ID Bypass 1
Conformance Required
Definition Provide a keyboard-supported means of bypassing blocks of content, such as navigation menus and page headers, to get to the main content of the page.
Purpose
  • Most pages of websites typically have navigation menus, page headers and other repeated content before the main content of the page.
  • For keyboard-only and screen reader users, a link or other means of skipping these types of content blocks makes it easy to go directly to the main content of the page, without first having to tab through the repeated content.
Conformance Required
WCAG Success Criteria

Success Criterion 2.4.1 Bypass Blocks

Rule Category Keyboard Support
Rule Scope Page
Techniques
  • Make the first link on the page an internal link that references a valid target element at the beginning of the main content of the page.
  • The id attribute is preferred method to identify the target element for the "Skip to main content" link.
  • To make any target element focusable, add tabindex="-1" to the element. If the target is an a element, adding tabindex="-1" will remove it from the tab order.
  • If you use an h1[id="main"] element as the target of the "Skip to main content" link, most screen readers will read the heading level and content when the user activates the skip to link.
  • The "SkipTo" script automates the skip feature by providing a dynamically generated landmark regions and headings (H1-H2) based on the structural content of the page.
Information Links