Landmark regions: main, nav and footer on every page
Screen reader users jump between landmarks instead of reading top to bottom. squirrel reports which of the three a page has.
What a landmark region is
Landmarks divide a page into named areas a screen reader can jump between: <main> for the content, <nav> for navigation, <header>, <footer> and <aside> for the furniture around it. A user presses one key to move between them instead of tabbing through the header on every page.
The semantic elements carry their roles implicitly, so <nav> needs no role="navigation". The ARIA roles exist for markup that cannot use the elements.
What squirrel checks
Three checks, at rule severity info and weight 3. This rule reports structure rather than failure, which is why its weight is the lowest in the category.
landmark-mainwarns withNo <main> landmark foundand the valueAdd <main> element around primary content, or warns withMultiple main landmarks (N)and the valuePages should have exactly one <main> element, or passes withMain landmark present.landmark-navpasses withN navigation landmark(s) found, or returns info withNo <nav> landmark found.landmark-footerpasses withFooter landmark present, or returns info withNo <footer> landmark found.
Only main warns. Navigation and footer landmarks are useful but not required, so their absence is reported as information.
How to fix it
<header>...</header>
<nav aria-label="Primary">...</nav>
<main>...</main>
<footer>...</footer>Use the elements rather than the roles wherever the markup allows it. They are shorter, they cannot be misspelled, and they keep the visual structure and the announced structure in one place.
Where a page has more than one <nav>, give each an aria-label so a screen reader can tell “Primary navigation” from “Breadcrumb”. Landmarks of the same type are otherwise announced identically.
| Rule ID | a11y/landmark-regions |
| Category | Accessibility |
| Scope | Per-page |
| Severity | info |
| Weight | 3/10 |
Enable / disable
Disable this rule
[rules]
disable = ["a11y/landmark-regions"]Disable all Accessibility rules
[rules]
disable = ["a11y/*"]Enable only this rule
[rules]
enable = ["a11y/landmark-regions"]enable replaces the default ["*"], so this is the only rule selected. Leave disable out: a rule that matches any disable pattern is skipped even when enable names it. Only an enabled setting under a rule’s own [rule_options] table overrides both lists.
Related rules
- a11y/landmark-one-main: the stricter check on the
<main>count. - a11y/skip-link: the bypass mechanism landmarks can stand in for.
- a11y/heading-order: heading levels that skip a step in the outline users navigate alongside landmarks.
- a11y/aria-labels: accessible names for buttons and interactive
<svg>elements inside those regions.
Accessibility findings ship in every audit next to the SEO, performance and agent experience rules. See Website security scan with AI for how an agent works through a report.
References
- Page regions, W3C WAI tutorials
- Landmark regions, WAI-ARIA Authoring Practices
- The main element, MDN
Check your site
Run squirrel audit https://example.com and open the Accessibility section of the report. The three landmarks are reported as separate checks, so a missing footer does not hide a missing main. Signed-out local audits need no account and cost nothing. Signed-in audits spend credits.