SiteLint

  1. Home
  2. Docs
  3. SiteLint
  4. Accessibility Rules
  5. main-landmark-must-be-top-level

main-landmark-must-be-top-level

Print this article

Description

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

Purpose

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 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.

Standard

Accessibility

Was this article helpful to you? Yes No