unique-landmark
Angular templatesHTMLVue / SvelteVue / Sveltecorrectnessno fixdefault: offhtml/html-validate-recommended
What it does
Section titled “What it does”Reports landmarks of the same kind (<nav>, <aside>, or elements with the same landmark role) that a screen reader user cannot tell apart: with several of them, each needs an aria-label or aria-labelledby that no other has.
Why it matters
Section titled “Why it matters”A list of landmarks that holds “navigation, navigation, navigation” gives no way to pick the right one.
To fix, give each landmark a label that tells it from the others.
Example
Section titled “Example”...<svg focusable="false"></svg><nav aria-label="a"></nav><nav aria-label="a"></nav><nav></nav><aside></aside>...<a href="x" aria-label="x">y</a><div role="main"></div>...<main role="main"></main>...<button aria-label="x"></button>...Configuration
Section titled “Configuration”angular: lint: rules: unique-landmark: warn # off (default), warn, errorhtml: lint: rules: unique-landmark: warn # off (default), warn, errorsvelte: lint: rules: unique-landmark: warn # off (default), warn, errorvue: lint: rules: unique-landmark: warn # off (default), warn, errorEnabled by the presets: html/html-validate-recommended.
Suppress one line with sudsy-disable-next-line unique-landmark in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.
| Tool | Rule | Match | What differs |
|---|---|---|---|
| html-validate | unique-landmark |
partial | header, footer, section and form landmarks are not checked |