Skip to content

unique-landmark

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.

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.

Reported
...
<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>
...
angular:
lint:
rules:
unique-landmark: warn # off (default), warn, error
html:
lint:
rules:
unique-landmark: warn # off (default), warn, error
svelte:
lint:
rules:
unique-landmark: warn # off (default), warn, error
vue:
lint:
rules:
unique-landmark: warn # off (default), warn, error

Enabled 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.

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