No main landmark (landmark-one-main)

The landmark-one-main rule flags a page that has no main landmark – no <main> element and no role="main". Screen reader users then have no direct way to jump to the content. The fix is one <main> around the main content, set once in the page template.

What the rule means

The main landmark marks the part of the page that is unique to it: the article, the product, the search results – not the header, navigation or footer that repeat on every page. HTML provides it with the <main> element; role="main" on another element does the same.

The rule checks the whole document once and passes as soon as it finds one main landmark. It does not check whether that landmark actually holds the main content, and it does not complain about several of them – that is the separate axe rule landmark-no-duplicate-main. The HTML standard allows only one visible <main> per page.

Note: this is a best practice, not a WCAG failure in itself. It relates to 1.3.1 Info and Relationships, because the page's structure becomes machine-readable, and to 2.4.1 Bypass Blocks, because a main landmark is one way to skip repeated content.

Who is affected

Mainly blind people using a screen reader. They jump straight to the main region – with D in NVDA, via the rotor in VoiceOver, or from a list of landmarks – instead of listening to the whole navigation on every page. Without a main landmark that shortcut is missing. Keyboard users benefit indirectly: a skip link needs a target, and <main id="content"> is the natural one.

Why the check fails

  • Older themes that wrap the content in <div id="content"> or <div class="container">.
  • Single-page apps that render into <div id="app"> and never add a landmark.
  • Page builders whose templates output sections as plain <div>s.
  • Landing pages and special templates (checkout, campaign, error page) built outside the main theme.
  • <main> inside a component that only some page types load.

How to fix it

Put <main> in the page template, around the content between header and footer. One change fixes every page that uses the template.

<!-- Before: header and footer are landmarks, the content is a div -->
<body>
  <header class="site-header"><a href="/">Example Ltd</a></header>
  <div id="content" class="page-content">
    <h1>Delivery and returns</h1>
  </div>
  <footer class="site-footer"><p>© 2026 Example Ltd</p></footer>
</body>
<!-- After: one main element; the id doubles as the skip-link target -->
<body>
  <a class="skip-link" href="#content">Skip to content</a>
  <header class="site-header"><a href="/">Example Ltd</a></header>
  <main id="content" class="page-content">
    <h1>Delivery and returns</h1>
  </main>
  <footer class="site-footer"><p>© 2026 Example Ltd</p></footer>
</body>

Three rules of thumb:

  • Exactly one visible <main> per page, not nested inside <header>, <nav>, <aside> or <footer>.
  • Keep the element, keep the classes: swapping <div> for <main> rarely changes the layout, because <main> is a block element like a <div>.
  • In a single-page app, render <main> in the layout component that every route shares.

How to test it manually

  1. Show the landmarks: in NVDA press Insert + F7 and choose "Landmarks"; in VoiceOver open the rotor with VO + U. A landmark browser extension works too.
  2. Check there is exactly one main region, and jump to it. Does it start where the page's own content starts?
  3. In the browser's developer tools, look at the accessibility tree: the element should have the role "main".
  4. The rule only checks that a main landmark exists. A <main> that also contains the navigation, or one wrapped around the whole body, passes the rule and still defeats its purpose.

None directly – landmark-one-main is a best practice. It relates to 1.3.1 Info and Relationships and 2.4.1 Bypass Blocks; for 2.4.1, landmarks, headings or a working skip link are each accepted ways to skip repeated content.

How Reviseberg reports it

Reviseberg runs landmark-one-main on every crawled page. The rule checks the document as a whole, so each affected page counts as one occurrence; when the cause is a shared template, nearly every page appears. The issue list shows the rule as a best practice with its severity, the number of pages and the points a fix gets you back; it never counts towards a WCAG criterion or appears in a compliance report. The detail view lists every affected page. You can mark a finding as "ignore" or "false positive" with a reason; every decision is logged.

  • undefined – content that sits outside every landmark.
  • undefined – the page has no level-one heading to start from.
  • undefined – the keyboard agent's check for a working skip link.

Check the page structure of your whole site – get a free scan

Frequently asked questions

Is a missing main landmark a WCAG failure?

No. axe-core lists landmark-one-main as a best practice, and Reviseberg reports it that way. It still helps screen reader users directly and supports WCAG 1.3.1 and 2.4.1.

Do I need role="main" as well as <main>?

No. Current browsers expose <main> as a landmark on their own. Adding the role is redundant but harmless.

Can a page have more than one <main>?

Only one may be visible at a time. Additional ones must be hidden with the hidden attribute, for example in an app that keeps several views in the page.

Does the rule check that the right content is inside <main>?

No. It only checks that one exists. Whether it starts at the page's own content is a manual check.

Sources

  1. Deque University, axe-core 4.13 rule landmark-one-main – https://dequeuniversity.com/rules/axe/4.13/landmark-one-main
  2. WHATWG, HTML Living Standard: the main element – https://html.spec.whatwg.org/multipage/grouping-content.html#the-main-element
  3. W3C, ARIA Authoring Practices Guide: Landmark Regions – https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/
  4. W3C, Understanding SC 2.4.1 Bypass Blocks – https://www.w3.org/WAI/WCAG22/Understanding/bypass-blocks

See what a scan finds on your site

One page in about thirty seconds, no email needed. The full report covers up to 100 pages and a keyboard journey.