Banner landmark should not be contained in another landmark
How to fix the landmark-banner-is-top-level accessibility rule. Headings and landmarks. A best practice, not a WCAG requirement.
The message you saw
Lighthouse has no audit for this rule, so you’ll only see it from axe-core based tools.
What it means
The banner is the site-wide header. This message means it sits inside another landmark, so it’s no longer one of the page’s top-level areas.
A plain <header> inside <article>, <aside>, <main>, <nav> or <section> isn’t a banner at all, so this rule ignores it. It catches the cases that are still banners: an element with role="banner" placed inside a landmark, or a top-level <header> inside something given a landmark role, such as <div role="main"> or <div role="region" aria-label="…">.
Who is affected
The site header (banner) is nested inside another landmark, so screen readers present a confusing page outline.
Screen-reader users expect the banner beside main and contentinfo, not inside one of them. A nested banner makes the landmark list confusing and the site header harder to find.
This is a best practice, not a WCAG requirement.
How to find it
- Run the checker: it outlines the nested banner.
- In DevTools, select it and check its ancestors for a
roleattribute or a landmark element.
How to fix it
- Move the site header out so it’s a direct child of
<body>(or of a plain<div>wrapper). - If the nested element isn’t the site header (it’s a page or section header), remove its
role="banner". - Remove landmark roles from wrappers around the whole page.
Example
Before
<main>
<div role="banner">Article intro</div>
</main>After
<main>
<header>Article intro</header>
</main>WCAG success criteria
None. This is a best practice: fixing it helps people using assistive technology, but it doesn’t affect WCAG conformance. Our scanner only reports it if you tick “Also show best-practice suggestions”.
Check your fix
Scan a web page and the report lists every element that fails this rule, with screenshots outlining where they are, the code, and a selector you can paste into your browser’s developer tools. Scan again after your change: when the rule no longer appears under the problems, the fix worked.
An automated pass means this rule found nothing wrong. It doesn’t prove the page is accessible: some of what WCAG asks for needs a person to check, and the report’s manual checklist lists those steps.
Related fix guides
- Document should not have more than one banner landmark
- Main landmark should not be contained in another landmark
- All page content should be contained by landmarks
More detail
- Deque University’s reference for landmark-banner-is-top-level (the makers of axe-core, the engine our scanner uses)
- All fix guides