A page should have a main landmark
Every page should wrap its primary content in a `<main>` element, so assistive technology can jump straight to it. This is a best practice, not a WCAG requirement, and one of the easiest structural fixes.
| Rule ID | landmark-one-main |
|---|---|
| Impact | Moderate |
| Success criterion | Best practice, not a WCAG requirement |
| Needs a change in the website’s code |
Example
<div class="header">...</div>
<div id="content">
<h1>Opening hours</h1>
<p>Monday to Friday, 8 am to 6 pm.</p>
</div>The screen reader's “next main landmark” command finds nothing, so the user reads through the header first.
<div class="header">...</div>
<main id="content">
<h1>Opening hours</h1>
<p>Monday to Friday, 8 am to 6 pm.</p>
</main>One key press jumps to “Opening hours”.
Why it matters
Screen reader users use the main landmark to skip repeated content, such as the logo, search and menu, and go straight to what the page is about. Without it, they have to read or tab through the header on every page, or guess with heading navigation.
Browser reader modes and some extensions also look for <main> to decide which part of the page is the content.
This is a best practice, not a WCAG requirement. A main landmark is also one valid way to meet WCAG 2.4.1 (bypass blocks), together with skip links and headings.
How to fix it
Wrap the primary content of every page in one <main> element.
Plain HTML or a theme template. Replace the content wrapper:
<main id="content">
...
</main>
Keep the layout outside. The site header, main navigation and footer stay outside <main>. Sidebars that are not part of the page's topic can sit outside it too.
Old markup you cannot change. Add role="main" to the existing wrapper:
<div id="content" role="main">...</div>
Pages built in iframes. The check is satisfied when the main landmark is inside a frame, but it is better to have one in the top document.
Pair it with a skip link. Point it at the main element so keyboard users get the same shortcut:
<a href="#content" class="skip-link">Skip to content</a>
Checklist
- Wrap each page's primary content in one main element.
- Keep the header, menu and footer outside main.
- Use role="main" only when you cannot change the element.
- Add a skip link that points to main.
How the check works
The check looks at the whole page, including frames. It passes when the page, or at least one of its frames, contains a <main> element or an element with role="main". It fails when there is none. If a modal dialog is open, the check passes, since the page behind it is not in use.
Resources
- Page regions W3C WAI
- Landmark regions W3C WAI
Updated October 27, 2026