A page should have no more than one main landmark
Each page should have exactly one visible main landmark, around its primary content. This is a best practice, not a WCAG requirement, and it makes the jump to the main content reliable.
| Rule ID | landmark-no-duplicate-main |
|---|---|
| Impact | Moderate |
| Success criterion | Best practice, not a WCAG requirement |
| Needs a change in the website’s code |
Example
<main class="layout">
<nav aria-label="Account">...</nav>
<main>
<h1>My orders</h1>
</main>
</main>Jumping to main lands on the account menu, not on “My orders”.
<div class="layout">
<nav aria-label="Account">...</nav>
<main>
<h1>My orders</h1>
</main>
</div>One main landmark: jumping to it lands directly on “My orders”.
Why it matters
The main landmark is the shortcut screen reader users rely on most: it skips the header and menus and goes straight to the content. With two main landmarks, the shortcut may land in the wrong place, and the landmarks list shows two identical entries.
The HTML standard also allows only one visible <main> element per page, so duplicates are invalid markup.
This often happens in single-page apps and CMS themes, where the layout and the page template each add their own <main>. Keyboard users who use a skip link pointing at main can be affected too.
This is a best practice, not a WCAG requirement.
How to fix it
Decide which element really wraps the page's primary content, and make only that one a main landmark.
Layout and page both add main. Keep <main> in one place, usually the layout, and turn the other into a <div>:
<main id="content">
<div class="page-orders">
<h1>My orders</h1>
</div>
</main>
A div with role="main" plus a main element. Remove the role from the div.
Several views in a single-page app. You may keep one <main> per view in the markup, as long as only one is shown. Hide the others with the hidden attribute:
<main id="orders">...</main>
<main id="settings" hidden>...</main>
Then make sure your skip link targets the visible main.
After the change, open your screen reader's landmarks list on each page template and confirm that main appears exactly once.
Checklist
- Keep a single visible main element per page.
- Remove role="main" from divs when a main element exists.
- Hide inactive app views with the hidden attribute.
- Point the skip link at the visible main landmark.
How the check works
The check counts the elements visible to assistive technology that are <main> or have role="main". Hidden ones, for example with the hidden attribute or display: none, are ignored. It passes when there is at most one main landmark, and fails when there are two or more.
Resources
- Landmark regions W3C WAI
Updated October 27, 2026