Let keyboard users jump past your menu with a skip to main content link
Repeated navigation can stand between a keyboard user and the page they came to read. A skip link gives them a direct route to the main content.
Add a skip to main content link that moves focus
Make the link the first thing a keyboard user reaches, and point it at the main content's
id. It can stay hidden until it receives focus, but it has to appear then.Activating the link should move keyboard focus to the main content, which is the last test in W3C's skip-link technique.
Keep the keyboard focus indicator visible
A keyboard user needs to see which control is active. Preserve the browser's outline or supply a clear replacement rather than removing focus styling.
WCAG lists using the platform's default focus indicator as one way to meet the requirement. If you replace it, WCAG also lists a two-color focus indicator as a way to keep enough contrast.
Keep the tab order logical for keyboard navigation
A positive
tabindexputs an element ahead of ordinary controls in the tab sequence. Prefer a logical document order and native links or buttons instead of numbering controls to repair the layout.MDN's tabindex reference distinguishes
0, which follows document order, from-1, which can receive focus programmatically without joining the normal Tab sequence.
Frequently asked questions
Does a skip navigation link have to stay visible all the time?
No. W3C prefers links that are always visible, but a link that appears only when it receives focus still meets the technique.
Does a skip to main content link replace keyboard accessibility testing?
No. The link handles one shortcut. Try the tasks people come to the page for with the keyboard alone, too.
Do I need a skip link if my page uses landmarks and headings?
Not always. WCAG's Bypass Blocks lists ARIA landmarks and headings at the start of each section as sufficient techniques, beside a skip link.
Continue the keyboard accessibility review
Website accessibility
Find what stops people with disabilities from using your site.
Fix the accessibility problems Lighthouse reports
Fix the form label, link name, lang, heading order and ARIA warnings in Lighthouse.
WCAG 2.2 AA checklist
Plan the A and AA criteria review and identify the decisions that need a person.
8 manual accessibility tests for every website
Test keyboard use, focus, zoom, forms, dialogs, motion, content, and screen readers with eight browser checks automated audits cannot finish.