Document does not have a main landmark
How to fix the landmark-one-main accessibility rule. Headings and landmarks. A best practice, not a WCAG requirement.
The message you saw
Lighthouse runs axe-core inside it, so both are the same check, and the fix below works whichever tool showed you the message.
What it means
The main landmark marks where the page’s own content is, separate from the header, menu and footer that repeat on every page. You create it with a <main> element (or role="main" on another element). This message means the page has none that screen readers can reach.
Pages built with older templates or page builders often use <div id="content"> for this, which looks the same but means nothing to assistive technology. A <main> hidden with display: none or aria-hidden doesn’t count. If a modal dialog is open when the page is checked, axe skips this rule.
Who is affected
The page has no main landmark, so screen-reader users can't jump straight to the content.
Screen-reader users have a shortcut to jump straight to the main landmark, past the header and menu. Without one they have to find the start of the content by listening or searching.
This is a best practice, not a WCAG requirement on its own. A <main> is also one of the ways to meet 2.4.1 Bypass Blocks.
How to find it
- Run the checker: this rule is reported once for the whole page.
- In Chrome DevTools, search the Elements panel for
<mainandrole="main".
How to fix it
- Find the element that holds the page’s own content (often
<div id="content">or<div class="page">). - Change it to
<main>, keeping its id and classes so the styles still apply. - Make sure the header, menu and footer are outside it.
- Use only one visible
<main>per page.
Example
Before
<div class="header">…</div>
<div id="content">…</div>
<div class="footer">…</div>After
<header>…</header>
<main id="content">…</main>
<footer>…</footer>Common mistakes
- In single-page apps, put
<main>in the app shell so it exists on every route, not only on some pages. - Two visible
<main>elements is a different problem, flagged by the duplicate-main rule.
WCAG success criteria
None. This is a best practice: fixing it helps people using assistive technology, but it doesn’t affect WCAG conformance. Our scanner only reports it if you tick “Also show best-practice suggestions”.
Check your fix
Scan a web page and the report lists every element that fails this rule, with screenshots outlining where they are, the code, and a selector you can paste into your browser’s developer tools. Scan again after your change: when the rule no longer appears under the problems, the fix worked.
An automated pass means this rule found nothing wrong. It doesn’t prove the page is accessible: some of what WCAG asks for needs a person to check, and the report’s manual checklist lists those steps.
Related fix guides
- Document should not have more than one main landmark
- Main landmark should not be contained in another landmark
- All page content should be contained by landmarks
- The page does not contain a heading, skip link, or landmark region
More detail
- Deque University’s reference for landmark-one-main (the makers of axe-core, the engine our scanner uses)
- All fix guides