---
title: Ensure the document has a main landmark | Accessibility Rule
description: Document should have one main landmark. Why the landmark-one-main rule
  fails (Best Practices, moderate impact) and how to fix it with TestingBot.
source_url:
  html: https://testingbot.com/support/accessibility/web/rules/landmark-one-main
  md: https://testingbot.com/support/accessibility/web/rules/landmark-one-main.md
---

# Ensure the document has a main landmark

Rule ID: landmark-one-main User Impact: moderate Guidelines: Best Practices

The `landmark-one-main` rule ensures that each page contains exactly one `<main>` element or `role="main"` landmark. If the page includes `<iframe>` elements, each iframe should have zero or one `main` landmark.

## What is being tested?

This rule verifies that:

- The page has exactly one `main` landmark for the primary content.
- Each `<iframe>`, if used, contains zero or one `main` landmark.
- All main content is contained within a defined landmark region.

## Example

```
<header role="banner">
  <p>Put company logo, etc. here.</p>
</header>
<nav role="navigation">
  <ul><li>Put navigation here</li></ul>
</nav>
<main role="main">
  <p>Put main content here.</p>
</main>
<footer role="contentinfo">
  <p>Put copyright, etc. here.</p>
</footer>
```

This markup uses both HTML5 elements and ARIA roles, making it robust and accessible for screen reader users.

## Why it matters

Landmarks allow screen reader users to easily jump between major sections of a page. Ensuring there is exactly one `main` landmark helps users reliably locate the primary content.

Without landmarks or with multiple `main` landmarks, screen reader navigation becomes confusing, and important content can become hard to find.

## Best practices

- Use exactly one `<main>` or `role="main"` on the page.
- For each `<iframe>`, include zero or one `main` landmark.
- Combine HTML5 and ARIA landmarks to maximize accessibility and compatibility across assistive technologies.
- Include additional landmarks such as `banner`, `navigation`, and `contentinfo` to improve page structure.

## Other Rules

Interested in other web accessibility rules? Please see these other rules:

- [landmark-unique](https://testingbot.com/support/accessibility/web/rules/landmark-unique)
- [meta-viewport-large](https://testingbot.com/support/accessibility/web/rules/meta-viewport-large)
- [page-has-heading-one](https://testingbot.com/support/accessibility/web/rules/page-has-heading-one)
- [presentation-role-conflict](https://testingbot.com/support/accessibility/web/rules/presentation-role-conflict)
- [region](https://testingbot.com/support/accessibility/web/rules/region)
