landmark-no-duplicate-main

Page must not have more than one main landmark

manualconfidence: mediumseverity: minoroperable

Checks that at most one main landmark (role="main" or <main>) exists on the page.

Applies to. Applies whenever the page contains at least one main landmark (explicit role="main", or an implicit <main>).

Expectation. At most one main landmark exists on the page. Distinct, atomic decision from landmark-one-main (that rule flags zero mains too; this one only flags more than one).

Examples

can't tell
<body>
<main>First</main>
<main>Second</main>
</body>

Two `<main>` elements are both exposed to assistive technology as main landmarks.

n/a
<body>
<main>Only one</main>
</body>

Only one main landmark exists.

View source