Rule

Distinguishable landmarks

Landmarks of the same type need distinguishing labels.

Rule
landmark-unique
Type
Best practice, not a WCAG requirement. It runs when Best practices is switched on.
Severity
Moderate

What it checks

The rule groups the page's landmarks by role. A page may have only one banner, one main and one contentinfo, so a second of any of these fails whatever its label. Other landmarks of the same role, such as two navigations, fail when they share the same label or both have none.

Only author labels count: aria-labelledby, aria-label or title, not the text inside the landmark. A screen reader lists landmarks by role and label, so two that read alike cannot be told apart.

Example

Fails

<nav>
  <a href="/">Home</a>
  <a href="/shop">Shop</a>
</nav>
<main>
  <h1>Shop</h1>
</main>
<nav>
  <a href="/privacy">Privacy</a>
</nav>

Passes

<nav aria-label="Primary">
  <a href="/">Home</a>
  <a href="/shop">Shop</a>
</nav>
<main>
  <h1>Shop</h1>
</main>
<nav aria-label="Legal">
  <a href="/privacy">Privacy</a>
</nav>

The engine is tested against both examples.

How to fix it

Give each landmark of the same role its own short aria-label, such as "Primary" and "Legal". Keep only one banner, main and contentinfo.

Check your own pages

This rule runs in every pour audit: the browser extension, the bookmarklet, the command line and the editor. Get pour, free.