Avoid Duplicate contentinfo Landmarks
Rule ID: landmark-no-duplicate-contentinfo
Ruleset: axe-core 4.10
User Impact: Moderate
Guidelines: Deque Best Practice
How to Fix the Problem
Ensure your page includes only one instance of the contentinfo
ARIA landmark. This landmark is typically used to indicate information about the parent document, such as copyright, site-wide links, or publisher details, and should be located near the bottom of the page.
Correct Usage Example
A single contentinfo
landmark should be defined once per page:
Incorrect Usage Example
Avoid using multiple role="contentinfo"
regions, such as placing them inside multiple <main>
tags or repeating them in each article section:
Best Practices
-
Use
role="contentinfo"
only once per page, typically in the<footer>
element. -
Replace extra
contentinfo
regions with<aside>
or<section>
elements, or simply use paragraph tags if no landmark role is necessary. -
Consistently use semantic HTML5 elements like
<footer>
when applicable, as they are automatically mapped to ARIA roles by assistive technologies.
Why it Matters
Landmarks are essential for assistive technologies like screen readers because they allow users to jump quickly to important sections of a webpage. Using role="contentinfo"
more than once dilutes its effectiveness and confuses users who rely on clear page structure.
Screen readers like JAWS, NVDA, and VoiceOver allow users to list all landmarks on a page. When there are duplicates of the contentinfo
landmark, it becomes difficult for users to distinguish between them or understand which is the primary source of page-level information. This causes navigation inefficiencies and harms the overall accessibility experience.
Furthermore, although HTML5 allows multiple <footer>
elements, ARIA specifications explicitly recommend using roles like banner
, main
, and contentinfo
only once per page to maintain clarity for screen reader navigation.
Rule Description
This rule ensures that no more than one contentinfo
ARIA landmark exists on a page. The purpose is to support assistive technologies in providing efficient navigation for users who depend on them.
The Algorithm (in Simple Terms)
-
Search the page for all elements with the role of
contentinfo
. -
Filter out elements that do not correctly map to this role.
-
Confirm that only one valid
contentinfo
landmark is present on the page.