Expected element with role=”main” to be a top-level landmark to indicate the primary content of a document


Rule ID: main-landmark-must-be-top-level

This rule determines if a given main landmark element (<main> element or an element with role="main") is not contained within any other landmarks.


The main landmark is used to describe the primary content of the page. Each page should have one main landmark. Top-level landmarks are the easiest landmarks to find and navigate to using assistive technologies.

How to fix it

  • Do not use any other type of landmark element as a parent element for the <main> element on the page.
  • Note: prefer using the <main> element over declaring role="main", unless there are legacy browser support concerns.