How to fix: “Document should have one main landmark”
No main content area, explained in plain English, with the exact fix and code you can copy.
- Scanner rule:
landmark-one-main- Standard:
- Best practice (not a strict WCAG failure on its own)
What this error means
Landmarks are named regions of a page: the header, navigation, main content and footer. Screen reader users can jump straight between them. The <main> landmark marks the part of the page that is unique to this page. Without it, someone has to listen through the whole menu on every page before reaching the content. This is flagged as a best practice, not a strict WCAG failure.
Who it affects
Screen reader users and keyboard users, who save time by jumping to the main content instead of tabbing through the menu on every page.
Where it usually hides
- Hand-built pages where everything is nested divs
- Custom themes that use <div id="content"> instead of <main>
- Pages where the main element appears twice, or is hidden
How to fix it
- Find the container that holds the page's main content, everything except the site header, navigation, and footer.
- Change it to <main> (or add role="main" if you cannot change the tag).
- Make sure there is only one <main> per page and that it is not hidden.
- Use <header>, <nav> and <footer> for the other regions.
Before and after
Before
<div id="header">...</div>
<div id="content">...</div>
<div id="footer">...</div>Generic containers with no meaning for assistive technology.
After
<header>...</header>
<main id="content">...</main>
<footer>...</footer>Real landmarks that screen readers can jump between.
On your website platform
WordPress and Shopify
Most modern themes already include main. If yours does not, the change goes in the theme's page templates (page.php, index.php in WordPress; theme.liquid in Shopify). A child theme or a theme copy keeps it safe from updates.
Common mistakes
- Wrapping the entire page, including the menu, in main.
- Having two main elements on one page.
How to check your fix
- Re-run a scan to confirm the notice is gone.
- In Chrome DevTools, open the Accessibility tab and look at the tree for a 'main' landmark.
Is this on your site?
Run a free scan and see every page and element affected. No account needed.
Questions people ask
Is this required by the ADA?
It is a recommended practice, not a named failure. It is part of building a page that is easy to navigate, and it takes a minute to fix.
Keep reading
- Headings skip levels: Heading levels should only increase by one
- Page has no main heading: Page should contain a level-one heading
- Page language not set: <html> element must have a lang attribute
Automated scans catch only part of what WCAG covers, and fixing a scan result is not a legal guarantee of compliance. Last reviewed November 16, 2026.