How to fix landmark main is top level on WooCommerce

Move the `<main>` element (or `role="main"`) so it is a direct child of `<body>`, not nested inside any other landmark element such as `<header>`, `<nav>`, `<aside>`, or `<footer>`.

Steps for WooCommerce

  1. In your WordPress Admin, go to Appearance → Theme File Editor (or use a local editor/FTP).
  2. Open your active theme's 'header.php'. Look for a `<main>`, `<div id='main'>`, or `<div role='main'>` that opens inside the `<header>` tag — this is the most common location of the bug.
  3. If `<main>` opens inside `header.php` but inside a landmark wrapper, move its opening tag to just after the closing `</header>` tag (or to the very top of 'index.php' / page templates before other content).
  4. Check that the matching closing `</main>` tag is in 'footer.php' before the `<footer>` landmark, not inside it.
  5. If you use a page builder (Elementor, Divi, etc.), those tools often inject their own wrappers — install the 'Editorskit' or 'Accessibility Checker' plugin and follow its landmark audit to locate the nesting.
  6. Save, flush any caching plugin, and verify with WAVE or axe in your browser.
Official WooCommerce documentation ↗

What is landmark main is top level?

Every webpage should have exactly one "main" landmark — the HTML `<main>` tag or any element with `role="main"` — that tells assistive technologies like screen readers "this is where the primary content begins." The WCAG rule `landmark-main-is-top-level` fires when that `<main>` landmark is accidentally placed inside another landmark element (such as `<header>`, `<nav>`, `<section>`, `<aside>`, or `<footer>`) instead of being a direct child of `<body>`. Think of landmarks like a building's floor plan: the "main hall" should open directly off the entrance, not be hidden inside a closet inside a side room.

Screen-reader users rely on landmark navigation to jump straight to the main content, skipping repetitive menus and headers — a fundamental assistive-technology workflow. When `<main>` is buried inside another landmark, screen readers mis-report the page structure, the "skip to content" shortcut may stop working, and keyboard-only users are forced to tab through every navigation item on every page. This directly harms the browsing experience for customers with disabilities and exposes your store to legal risk under laws tied to WCAG 2.1 compliance (ADA in the US, EN 301 549 in the EU, AODA in Canada, and equivalents worldwide). Fixing it is also a positive signal for Google's accessibility-aware ranking considerations and demonstrates a technically well-structured page to crawlers.

See the complete Landmark main is top level guide for every platform and the full background.

Not sure if your WooCommerce store has this?

Run a free SEOLZ scan — we’ll find landmark main is top level and every other issue across your whole site.

Scan my site free

Fix landmark main is top level on another platform