How to fix landmark no duplicate main on Adobe Commerce (Magento)

Ensure each page contains exactly one `<main>` landmark element (or one element with `role="main"`) so screen-reader users can navigate directly to the page's primary content.

Steps for Adobe Commerce (Magento)

  1. The main landmark is defined in your theme's layout XML and PHTML templates. Locate your active theme under 'app/design/frontend/<Vendor>/<Theme>/'.
  2. Open '1column.phtml', '2columns-left.phtml', etc. in the 'Magento_Theme/templates/root/' directory and search for '<main' and 'role="main"'. There should be only one.
  3. Also search layout XML files (e.g. 'default.xml', 'catalog_product_view.xml') for any '<referenceContainer>' or '<block>' that adds a second 'role="main"' attribute via a template.
  4. If a third-party extension is adding the duplicate, override its template in your custom theme by copying the PHTML to your theme path and editing it to remove or change the '<main>' tag.
  5. Run 'php bin/magento cache:clean' and 'setup:static-content:deploy', then re-test with the axe DevTools extension.
Official Adobe Commerce (Magento) documentation ↗
<main>
  <!-- All unique page content lives here — product listings,
       article body, cart, etc. -->
</main>

<!-- ✅ Only ONE <main> per page. Everything else uses
     <header>, <nav>, <aside>, <footer>, <section>, or <article>. -->

<!-- ❌ Do NOT add a second <main> or role="main" anywhere else on the same page -->
<!-- <div role="main">…</div>  ← remove this if <main> already exists -->

What is landmark no duplicate main?

Every web page should have exactly one "main landmark" — the region that holds the page's primary, unique content. This is created by using the HTML `<main>` tag or by adding `role="main"` to any container element. When a page accidentally includes two or more of these landmarks (for example, because a theme template wraps content in `<main>` and a widget or app adds another one), assistive technologies become confused about where the real content starts. The WCAG rule `landmark-no-duplicate-main` flags this exact situation.

Screen-reader users rely on landmarks to skip repetitive navigation and jump straight to what matters on a page — this is a foundational accessibility technique. When two `<main>` landmarks exist, screen readers may announce the wrong region, navigate to the wrong place, or skip content entirely, making your store effectively unusable for a significant portion of shoppers with disabilities. In many jurisdictions (USA, EU, UK, Australia) selling online to the public creates legal obligations under accessibility laws such as the ADA, EAA, and WCAG-based regulations; duplicate landmarks are a clear, auditable WCAG 2.x violation that can appear in demand letters and audits. Fixing it also signals clean, well-structured HTML to search engines, which can marginally support crawlability and indexing.

See the complete Landmark no duplicate main guide for every platform and the full background.

Not sure if your Adobe Commerce (Magento) store has this?

Run a free SEOLZ audit — we’ll find landmark no duplicate main and every other issue across your whole site.

Scan my site free

Fix landmark no duplicate main on another platform