landmark-no-duplicate-contentinfo
Rule Severity : Moderate
Description
The landmark-no-duplicate-contentinfo rule ensures that a page has at most one contentinfo landmark. The contentinfo landmark is represented by a top-level <footer> element or an element with role="contentinfo". It identifies the page’s closing information, typically copyright notices, privacy links, and contact details. Multiple contentinfo landmarks create confusion for screen reader users navigating by landmarks, as they encounter two “contentinfo” regions without a reliable way to distinguish between them.
This rule meets WCAG requirements by:
- Exposing Document Structure (WCAG 1.3.1 Info and Relationships): It ensures the page’s footer region is unique and its role is unambiguous, allowing its position and purpose to be programmatically determined without confusion.
- Enabling Landmark Navigation (WCAG 2.4.1 Bypass Blocks): It ensures users can navigate reliably to the single contentinfo landmark to access site-wide footer information, without encountering multiple indistinguishable footer regions.
To comply with this rule, ensure that only one top-level <footer> element or role="contentinfo" exists on the page.
Examples
Here, two top-level <footer> elements exist in the document. Both become contentinfo landmarks, creating duplicate regions in the accessibility tree.
This example consolidates the footer content into a single <footer> element, resulting in exactly one contentinfo landmark.
How to fix?
To fix violations of the landmark-no-duplicate-contentinfo rule, follow these steps:
-
Identify all top-level
<footer>elements and elements withrole="contentinfo"on the page. -
Consolidate their content into a single
<footer>element at the top level of the document. -
Note that
<footer>elements placed inside<article>,<section>,<aside>, or<nav>do not carry thecontentinforole. They are scoped to their parent element. Only top-level<footer>elements become contentinfo landmarks.
Reference
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!