The main landmark should not be inside another landmark

The main landmark holds the page's primary content and should be a top-level region, not nested inside a header, navigation, region or other landmark. This is a best practice, not a WCAG requirement.

Rule IDlandmark-main-is-top-level
ImpactModerate
Success criterion Best practice, not a WCAG requirement
Readabler fix Needs a change in the website’s code

Example

Before
<section aria-label="Page content">
  <main>
    <h1>Book a table</h1>
  </main>
</section>

The screen reader announces a “Page content” region, then main inside it: an extra step before the content.

After
<main>
  <h1>Book a table</h1>
</main>

Jumping to main lands directly on “Book a table”.

Why it matters

The main landmark is the most used shortcut for screen reader users: one key press skips the header and menu and goes straight to the content. Users expect it to be a top-level region of the page.

When main is wrapped in another landmark, such as a named section, a banner or an aside, the landmarks list becomes a confusing tree, and some screen readers announce the outer region first. The page also suggests that its primary content is part of something secondary.

This is a best practice, not a WCAG requirement, but it makes the most common navigation shortcut predictable.

How to fix it

Make <main> a sibling of the site header and footer, not a child of another landmark.

A named section or region as a wrapper. A <section> with aria-label or aria-labelledby becomes a region landmark. Remove the name, or replace the section with a plain <div>:

<div class="content-wrap">
  <main>...</main>
</div>

Main placed inside the header or an aside. This happens with some layout components. Move it out so the structure reads:

<header>...</header>
<main>...</main>
<aside aria-label="Opening hours">...</aside>
<footer>...</footer>

A role on a div. If you use role="main" instead of the element, the same rule applies: its ancestors must not have landmark roles.

After the change, open your screen reader's landmarks list and confirm that main appears at the top level, next to the banner and the footer.

Checklist

  1. Keep main as a sibling of header and footer.
  2. Do not give wrappers around main a landmark role or a name.
  3. Use one main element per page.
  4. Check the landmarks list in a screen reader.

How the check works

The check finds every <main> element and every element with role="main". It walks up through the ancestors and fails when one of them is another landmark, such as banner, navigation, complementary, contentinfo or a named region. It passes when main has no landmark ancestor.

Resources

Updated October 27, 2026