Skip to main content
WCAGrules
Quick navigation

Bypass Blocks

A mechanism has to exist for getting past blocks of content that repeat from page to page, and that mechanism can take more than one shape. A skip link at the top of the page is one. Landmark regions are another. So are headings, because a heading on the main content is a documented way to bypass everything above it. So is a navigation menu that collapses. W3C's own automated rule for this criterion passes on any one of four things, meaning a collapsible block, a heading on the non-repeated content, a landmark around it, or a control that moves focus to it. Blocks means real blocks. Navigation, header content and advertising frames all count, and a repeated word, phrase or single link does not. Whatever mechanism you pick has to meet every Level A rule itself, so a skip link no keyboard can reach is not a mechanism at all.

Why it matters

Do the arithmetic once. W3C's own worked example puts about 40 links between a keyboard user and the main story, 200 words between a screen reader user and that same story, and a hunt around the layout for somebody using magnification. Multiply that by every page and every visit. The standard does not call this an inconvenience, either. It says the keystrokes may cause severe physical pain for some users. A sighted mouse user skips the header with their eyes and never notices doing it. This rule is that same shortcut, handed to everybody else.

Who this rule protects

This affects keyboard and switch users, who would otherwise press Tab dozens of times on every page, screen-reader users jumping by landmark or heading, screen-magnifier users hunting for where the main content starts, and people for whom repeated keystrokes are physically painful.

How to check it yourself

  1. Load the page and work out how a keyboard user gets past the repeated header. A skip link as the first focusable element is one passing answer. A landmark structure is another. A heading on the main content is a third. A site with none of the three is the one that fails.
  2. If there is a skip link, run the five checks in order. It is the first focusable control, its text says it goes to the main content, it is visible at least while it has focus, activating it moves focus, and focus ends up in the main content.
  3. Check the skip link moves focus rather than only scrolling. If the viewport jumps and focus does not, the next Tab press starts back in the header.
  4. Confirm the page marks up main, nav and header regions, so screen-reader users have the landmark route as well as the link.
  5. Look for the second pattern too. A long filter panel or a long form ahead of the results is a block of its own, and a link that jumps to the end of it is the documented answer.

Failures we see most often

  • No skip link, no landmarks and no heading on the main content, leaving a 40-link mega menu between every visitor and every page.
  • A skip link that stays invisible even when it has focus, so a sighted keyboard user tabs onto something they cannot see.
  • A skip link pointing at an anchor that no longer exists, so activating it does nothing and focus stays where it was.
  • A skip link that fails a Level A rule of its own, such as one built from a div with a click handler. The rule asks for a mechanism, and a mechanism has to conform before it counts as one.

Who this one is for

Read from this rule's own note above, so the grouping and the note cannot disagree.

How this one is tested

We list 5 ACT rules against 2.4.1. Each one defines exactly what a checker looks at, which is how automated tools decide what to flag. Each one also checks a slice, so passing every rule here is not the same as meeting the criterion, and a rule can be proposed rather than approved or need a person to finish it. The note beside each says which.

How to fix it

  • Add an anchor as the first element on the page, targeted at the main content container and revealed on focus. Thirty minutes of work, and keyboard users stop tabbing through your menu on every page of the site.
  • Wrap each region in the element it belongs in, using <header>, <nav>, <main> and <footer>. That markup pays for itself twice, since conveying structure in code is what 1.3.1 asks for as well.
  • Put a real heading on the main content. It is a documented bypass route on its own, and it is the route screen-reader users are most likely to take in practice.
  • Ship both the link and the structure. The structure is what makes the rule pass. The link is what helps the sighted keyboard user who has nothing to jump with.
  • For a long filter panel or a long list of options ahead of the content, add a link that skips to the end of that block rather than back to the top of the page.
Step-by-step fix guides (10)

Passes vs. fails

A general illustration of the pattern rather than a test of 2.4.1. Passes: one jump past the header. Fails: tab through everything, every page.

Passes

Tab once and 'Skip to main content' appears. Enter puts focus on the product heading, and the page's landmarks give a screen-reader user the same jump.

Fails

Reaching the product description means tabbing through 47 header links first, on every page, every visit.

In audits and lawsuits

This is one of the cheapest fixes we write, usually one anchor and a few lines of CSS, and it is also where the conforming answer and the good answer come apart. Landmarks and headings satisfy the rule, and they only help people who have a way to jump by landmark or heading. A sighted keyboard user with no assistive technology has neither, which is why W3C recommends the link-based route on top and so do we. Two scope points settle most arguments. A repeated footer needs no mechanism, because browsers already offer a key that jumps to the end of a page and this rule does not ask authors to duplicate the browser. And blocks that repeat within a single page, such as a filter panel above every group of results, sit outside the rule however tiring they are.

Go somewhere useful

Find tools, resources and your workspace.

29 destinations