landmark-no-duplicate-main
Web validation
main landmark.The main landmark pinpoints the primary content of a page. When you include more than one, assistive-technology users must guess which region is truly important, slowing navigation and causing confusion.
HTML allows only one visible <main> element per document, but browsers don't enforce that rule, and explicit ARIA roles can add more main landmarks. You must still check for duplicates, especially when templates, components, or embedded iframes add extra markup.
Pass Patterns
Single, top-level main landmark with complementary landmarks
The page supplies exactly one main region, helping screen reader users jump straight to the core content.
<header>
<!-- logo and sitewide actions -->
</header>
<nav>
<!-- primary site menu -->
</nav>
<main>
<!-- page-specific content -->
</main>
<footer>
<!-- copyright -->
</footer>Fail Patterns
Two elements are exposed as main landmarks
Because both containers carry role="main", assistive-technology users encounter two competing main regions.
<main role="main">
<p>Product list</p>
</main>
<aside role="main">
<p>Promotions</p>
</aside>Try It Yourself
Using a screen reader
New to screen reader testing, or need a refresher?
Review this article first: Practical guides for using screen readers
- Open the page in a desktop screen reader.
- Open the screen reader’s elements list (NVDA
Insert+F7, VoiceOverControl+Option+U), and go to the “Landmarks” section.
Expected results: The landmark list contains only one main element.
Actual results: The landmark list contains more than one main element.
FAQ
Why is this rule considered a best practice?
Although HTML limits a page to one visible <main> element, developers can still add extra role="main" attributes. Ensuring a single primary landmark aligns with long-standing guidance from ARIA and HTML, improving predictability for assistive-technology users.
Why is this issue marked as Moderate?
Duplicate main landmarks rarely block access outright, but they degrade navigation. Screen reader users must sift through redundant regions, increasing effort and disorientation, especially on complex pages. The impact is noticeable but not critical, which makes this a moderate severity issue.