How to fix landmark main is top level on Shopify

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 Shopify

  1. In your Shopify Admin, go to Online Store → Themes → click 'Customize' next to your active theme, then exit Customize and instead click the '…' menu → Edit code.
  2. In the Layout folder, open 'theme.liquid' (the master HTML shell for almost every Shopify theme).
  3. Search (Ctrl/Cmd+F) for '<main' or 'role="main"'.
  4. Check what HTML tag directly wraps the `<main>` element. Common culprits: a `<div role='banner'>`, a `<header>`, or a wrapper `<section>`.
  5. Cut the entire `<main>…</main>` block (and its closing tag) and paste it as a direct child of `<body>`, typically right after the closing `</header>` tag.
  6. Click Save, then visit a storefront page and run axe DevTools or WAVE in your browser to confirm the fix.
Official Shopify 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 Shopify 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