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
squirrel.toml
toml[rules]
disable = ["a11y/landmark-one-main"]Disable all Accessibility rules
squirrel.toml
toml[rules]
disable = ["a11y/*"]Enable only this rule
squirrel.toml
toml[rules]
enable = ["a11y/landmark-one-main"]
disable = ["*"]