About This Accessibility Rule
Landmarks are structural regions of a page — like header, navigation, main content, and footer — that assistive technologies use to build an outline of the page. When a screen reader user opens a page, they can pull up a list of landmarks and jump directly to the section they need. Without a main landmark, there is no way for these users to skip past repeated headers and navigation to reach the content they came for. This makes the page significantly harder to use.
This rule is a Deque best practice aligned with the WAI-ARIA technique ARIA11: Using ARIA landmarks to identify regions of a page. Users who are blind, deafblind, or who have mobility impairments and rely on screen readers or alternative navigation methods are the most directly affected. Without landmarks, these users must tab or arrow through every element on the page to find the content they need.
How landmarks work
HTML5 introduced semantic elements that automatically create landmark regions:
| HTML5 Element | Implicit ARIA Role |
|---|---|
<header> |
role="banner" |
<nav> |
role="navigation" |
<main> |
role="main" |
<footer> |
role="contentinfo" |
<aside> |
role="complementary" |
Modern browsers and screen readers understand these HTML5 elements natively. For maximum compatibility, you can also add the explicit ARIA role alongside the HTML5 element (e.g., <main role="main">). This redundancy is harmless and can help with older assistive technologies.
How to fix the problem
-
Wrap your primary content in a
<main>element. Every page should have exactly one<main>landmark. -
Place all other visible content inside appropriate landmarks. Use
<header>,<nav>,<footer>, and<aside>as needed so that no content is orphaned outside a landmark region. -
Check
iframeelements. If aniframecontains landmarked content, it should have no more than one<main>landmark. -
Don’t nest
<main>elements. There should be only one<main>per page (or periframe).
Note that landmarks primarily benefit screen reader users. Sighted users and screen magnifier users don’t perceive landmarks, so they still need visible skip-navigation links to bypass repeated content.
Examples
Incorrect: no main landmark
This page has no <main> element, so screen reader users have no way to jump directly to the primary content.
<header>
<p>Company Logo</p>
</header>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/about">About</a></li>
</ul>
</nav>
<div class="content">
<p>This is the primary content of the page.</p>
</div>
<footer>
<p>© 2024 Company Name</p>
</footer>
Correct: page with one main landmark
Replacing the generic <div> with a <main> element gives screen reader users a direct navigation point to the primary content.
<header>
<p>Company Logo</p>
</header>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="/about">About</a></li>
</ul>
</nav>
<main>
<p>This is the primary content of the page.</p>
</main>
<footer>
<p>© 2024 Company Name</p>
</footer>
Correct: using both HTML5 elements and ARIA roles for maximum compatibility
<header role="banner">
<p>Company Logo</p>
</header>
<nav role="navigation">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/about">About</a></li>
</ul>
</nav>
<main role="main">
<p>This is the primary content of the page.</p>
</main>
<footer role="contentinfo">
<p>© 2024 Company Name</p>
</footer>
Incorrect: multiple main landmarks
Having more than one <main> element confuses assistive technologies about which section is the true primary content.
<main>
<p>Article content here.</p>
</main>
<main>
<p>Sidebar content here.</p>
</main>
Correct: single main with an aside for secondary content
<main>
<p>Article content here.</p>
</main>
<aside>
<p>Sidebar content here.</p>
</aside>
Help us improve our guides
Detect accessibility issues automatically
Rocket Validator scans thousands of pages with Axe Core and the W3C Validator, finding accessibility issues across your entire site.