squirrelscan
GitHub

One Main Landmark

Checks that the page has exactly one main landmark

Checks that the page has exactly one main landmark

Rule ID a11y/landmark-one-main
Category Accessibility
Scope Per-page
Severity warning
Weight 5/10

Solution

Each page should have exactly one <main> element or element with role=‘main’. This helps screen reader users quickly navigate to the primary content. Multiple main landmarks confuse navigation. Use <aside>, <nav>, or other landmarks for secondary content.

Enable / Disable

Disable this rule

[rules]
disable = ["a11y/landmark-one-main"]

Disable all Accessibility rules

[rules]
disable = ["a11y/*"]

Enable only this rule

[rules]
enable = ["a11y/landmark-one-main"]
disable = ["*"]

Type to search…

↑↓ navigate↵ openesc close