landmark-unique
Landmarks with the same role must have unique names
Checks that when two or more landmarks share the same role, each has a distinct accessible name.
Applies to. Applies whenever two or more landmark regions on the page share the same landmark role (banner, contentinfo, main, navigation, complementary, region, form, or search). A custom element whose ElementInternals give it a landmark role (this.attachInternals().role), with no role attribute naming another, is a landmark as a native element with that role is.
Expectation. Among landmarks sharing a role, each has a distinct accessible name (via aria-label/aria-labelledby; landmarks are not named from content). Two same-role landmarks with the same name (including two both left unnamed) are indistinguishable to assistive technology users navigating by landmark. A shared name is reported as CANTTELL, never as a failure: the ARIA Authoring Practices allow one when the landmarks have the same content and purpose, such as pagination repeated above and below a table, which only a person can confirm. Two unnamed landmarks need names either way, and the same allowance then applies to those names.
What a finding reports.
role: the landmark role the colliding landmarks share, such asnavigation.name: the name they share, in lowercase with spacing collapsed. Empty when they are all unnamed.groupSize: how many landmarks of that role share that name.
These data.details fields help to read and reproduce a finding. Apart from reasonCode and the few fields Output schema names as stable, they are not a stable contract: a field may be renamed or dropped in a minor release, so don’t build on them.
Examples
<nav aria-label="Primary">Primary nav</nav><nav aria-label="Footer">Footer nav</nav>
Each navigation landmark has a distinct accessible name.
<nav aria-label="Site">First</nav><nav aria-label="Site">Second</nav>
Two navigation landmarks share the identical accessible name, so a screen reader user can't tell them apart in the landmarks list. A person checks whether their content is identical, the one case where the ARIA Authoring Practices allow a shared name.
<nav aria-label="Primary">Primary nav</nav><main>Content</main>
No landmark role is used more than once.
How to check
When this rule can’t decide, it reports cantTell and leaves the question to a person. Each question it can ask is listed here under its reason code, with the steps to answer it. A finding carries the same steps as howToCheck, in the scan’s language. See Output schema.
LANDMARK_NOT_UNIQUE
- Find the landmarks the report names; they share one role, such as navigation, and one name or no name.
- Look at each one on the page and compare what it contains and what it is for.
- If they differ in purpose (for example main menu and footer links), check whether each has an aria-label or aria-labelledby that tells them apart.
- Open the Accessibility pane in the browser's developer tools and confirm the name each landmark exposes.
Pass. The landmarks hold the same content for the same purpose (such as pagination repeated above and below a list), or each now has a distinct name that says what it is.
Fail. Landmarks with different content share a name or have none, so they cannot be told apart when navigating by landmark (best practice, ARIA13).