How to Fix a Missing Main Landmark and Unwrapped Content
This check fails when a page has no <main> landmark, has more than one, or leaves visible content outside any landmark region. By the end of this guide every page template will have exactly one <main>, and headers, menus, banners and footers will sit inside their own landmarks.

Why it matters
Screen reader users jump between landmarks to skip repeated navigation and reach the content they came for. Without a <main> region they must tab or arrow through every menu link on every page, and content outside landmarks can be missed when people navigate by region. The fix also gives search engines and AI crawlers a clear signal about which part of the page is the primary content and which parts are boilerplate.
1 (Bypass Blocks).
What you need
Step-by-step fix
Find what the page currently exposes
Open the page, then open DevTools (F12). Paste the snippet into the Console. It counts main landmarks and lists the visible top-level elements that are not inside a landmark.
Run it on each template type, because a blog post template often differs from the homepage.
console.log('main count:', document.querySelectorAll('main:not([hidden]), [role="main"]:not([hidden])').length);
[...document.body.children].filter(el => el.offsetParent !== null && !el.closest('header,nav,main,footer,aside,[role]') && !['SCRIPT','STYLE','NOSCRIPT'].includes(el.tagName)).forEach(el => console.log('outside landmark:', el));Wrap the primary content in a single <main>
In your layout template, replace the outer wrapper around the page content (often <div id="content"> or <div class="site-main">) with <main>. Keep the existing id and class so your CSS still applies. There must be exactly one visible <main> per page, and it must not sit inside <header>, <nav>, <aside>, <footer> or <article>.
<!-- Before --> <div id="content" class="site-content"> <h1>Spring pricing update</h1> <p>…</p> </div> <!-- After --> <main id="main" class="site-content"> <h1>Spring pricing update</h1> <p>…</p> </main>
Remove duplicate main elements
Duplicates usually come from a layout that adds <main> and a page template or plugin block that adds another one, or from a role="main" on an inner div. Keep the outermost one and change the others to <div> or <section>. If you have multiple views in a single-page app, only the active one may be visible; hide the rest with the hidden attribute.
<!-- Wrong: nested main --> <main> <div role="main">…</div> </main> <!-- Right --> <main> <div class="content-inner">…</div> </main>
Put the header, navigation and footer in landmarks
Use <header> for the site logo and top bar, <nav> for menus, and <footer> for the bottom area. A <header> or <footer> only becomes a page-level landmark when it is a direct part of the body layout, not nested inside <main>, <article>, <aside>, <nav> or <section>. If you have more than one <nav>, give each a distinct aria-label.
<body>
<a class="skip-link" href="#main">Skip to content</a>
<header>
<a href="/"><img src="/logo.svg" alt="Example Co"></a>
<nav aria-label="Primary">…</nav>
</header>
<main id="main">…</main>
<aside aria-label="Related articles">…</aside>
<footer>
<nav aria-label="Footer">…</nav>
<p>© 2026 Example Co</p>
</footer>
</body>Wrap stray banners, notices and widgets
Content that is injected at the top or bottom of the body often fails the region rule. Common examples are announcement bars, cookie banners, chat launchers and newsletter pop-ups. Move each one inside an existing landmark, such as an announcement bar inside <header>, or wrap it in its own labelled region.
- Cookie or consent banner:
<section aria-label="Cookie consent"> - Promo bar: move into
<header> - Supplementary widgets:
<aside aria-label="…">
<section aria-label="Cookie consent" class="cookie-banner"> <p>Example Co uses cookies to …</p> <button type="button">Accept</button> </section>
Retest every template
Clear any page or CDN cache, then reload each template. Run axe DevTools (Scan all of my page) and confirm there are no issues for 'Document should have one main landmark', 'Document should not have more than one main landmark' or 'All page content should be contained by landmarks'. Rerun the console snippet from step 1 to double-check, then rerun your site audit.
Platform-specific notes
WordPress
In block themes, open Appearance > Editor > Templates, select the Group block that wraps the content, and go to Block settings > Advanced > HTML element. Set it to <main>, and set the header and footer template parts to <header> and <footer>. Check every template, including Single, Page, Archive and 404. In classic themes, edit header.php, footer.php and the page templates in a child theme. Remove extra role="main" attributes added by page builders.
Shopify
Online Store 2.0 themes such as Dawn already include <main id="MainContent" role="main"> in layout/theme.liquid. Failures usually come from a second main inside a section file, or from app-injected banners placed outside it. Go to Online Store > Themes > … > Edit code and check layout/theme.liquid and sections/*.liquid. Move announcement bars into the header group.
Webflow
Select the wrapper element and open the Settings panel (gear icon). Under Tag, choose Main. Use the Header, Nav and Footer tags for the matching elements. Apply this in each page template and CMS template page, or put it in a shared Component so it stays consistent.
Next.js
Put a single <main> in app/layout.tsx around {children}, with <header> and <footer> as siblings. Do not add another <main> in page.tsx or nested layouts. In the Pages Router, put it in the shared Layout component used by _app.tsx.
Wix
Wix renders a main landmark automatically for the page body. Failures usually come from custom embeds or HTML iframes placed in the header or footer areas. In Wix Studio, select an element and set its semantic tag in the Inspector panel under the Accessibility section. Move custom-code banners inside a section that has a tag set.
Check that it worked
✅ How to verify
- Run the axe DevTools extension on each template and confirm the landmark-one-main, landmark-no-duplicate-main and region rules all pass.
- In Chrome DevTools > Elements > Accessibility pane, enable 'full-page accessibility tree' and confirm one 'main' node with banner, navigation and contentinfo alongside it.
- Use a screen reader landmark list to confirm 'main' appears once: press D in NVDA, use VoiceOver Rotor (VO+U) > Landmarks, or press R in JAWS.
- Run `document.querySelectorAll('main:not([hidden]), [role="main"]').length` in the console and confirm it returns 1.
⚠️ Common mistakes
- Adding <main> to the layout while the page builder or a block also outputs one, which creates a duplicate main failure.
- Using <section> without an aria-label for banners. Unnamed sections are not landmarks, so the content still counts as outside a region.
- Nesting <header> or <footer> inside <main> or <article> and expecting them to act as the site banner or footer landmark.
- Fixing only the homepage and leaving blog, product, search and 404 templates without a main landmark.
Is this still an issue on your site? Run a free audit — ZORO checks this and 294 other SEO, AI-visibility, accessibility and security signals, with fixes for your platform.
Check my site freeFAQ
Can a page have more than one <main> element?
Only one can be visible at a time. Extra <main> elements must carry the hidden attribute, which is useful for single-page apps that swap views. Otherwise, use exactly one per page.
Is role="main" still needed on the <main> element?
No. All current browsers map <main> to the main landmark. role="main" is redundant on <main> but harmless. Never put it on a second element.
What does 'All page content should be contained by landmarks' mean?
Every visible piece of content must sit inside a landmark: header, nav, main, aside, footer, or a labelled section or form. Stray divs at body level, such as cookie banners or promo bars, trigger this warning.
Does adding a main landmark help SEO?
It is not a direct ranking factor. However, it clearly separates primary content from navigation and boilerplate, which helps crawlers and AI systems extract the right text. It also improves accessibility for screen reader users.
How to Add a Skip to Content Link for Keyboard Users
How to Fix Heading Order: One H1 and No Skipped Levels
How to Fix Invalid ARIA Attributes and Roles on Your Site
How to Fix a Missing or Empty Page Title Element
How to Fix Duplicate Element IDs for Accessibility
How to Fix a Missing or Invalid Page Language (html lang)