landmark-main-is-top-level
Main landmark must be top-level
manualconfidence: mediumseverity: minoroperable
Checks that the main landmark (role="main" or <main>) is not nested inside another landmark region.
Applies to. Applies whenever the page contains at least one main landmark (explicit role="main", or an implicit <main> element).
Expectation. No main landmark has an ancestor that is itself any landmark region. A main region nested inside another landmark is not a top-level, whole-page main content area and confuses landmark-based navigation for assistive technology users.
Examples
can't tell
<div role="navigation"><main>Nested main</main></div>
The main landmark is nested inside a navigation landmark instead of being top-level.
n/a
<main>Content</main>
The main landmark is not nested inside any other landmark.