squirrelscan
GitHub

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-main warns with No <main> landmark found and the value Add <main> element around primary content, or warns with Multiple main landmarks (N) and the value Pages should have exactly one <main> element, or passes with Main landmark present.
  • landmark-nav passes with N navigation landmark(s) found, or returns info with No <nav> landmark found.
  • landmark-footer passes with Footer landmark present, or returns info with No <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 IDa11y/landmark-regions
CategoryAccessibility
ScopePer-page
Severityinfo
Weight3/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.

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

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.

Type to search…

↑↓ navigate↵ openesc close