A page needs no more than one site footer
- Rule:
axe/landmark-no-duplicate-contentinfo - Checks: Document should not have more than one contentinfo landmark
- WCAG: none; a best practice, not a WCAG success criterion
- Fix class:
mechanical: A fix needs no authored text or visual decision.
Who it affects
Section titled “Who it affects”- People who use a screen reader or a braille display, most of them blind.
How to fix it
Section titled “How to fix it”A second <footer> outside <main> holds a page note, an action bar or a notice
Section titled “A second <footer> outside <main> holds a page note, an action bar or a notice”Keep one site footer at the top level. Move content that belongs to the page into <main>, where a <footer> without a role is not a landmark, and make other bars a <div> inside the landmark they belong to.
<main> <h1>Returns policy</h1> <p>Return any item within 30 days.</p> <footer> <p>Last updated March 3</p> </footer></main><footer> <p>Acme Inc.</p></footer>More than one element has role="contentinfo"
Section titled “More than one element has role="contentinfo"”Keep role="contentinfo", or a top-level <footer>, on the one footer that holds site-wide information, and remove the role from the others. A top-level <footer> is a contentinfo landmark without the role, so move any other into the part of the page it belongs to, or make it a <div>.
Fixes that fail
Section titled “Fixes that fail”Giving each footer a different aria-label
Section titled “Giving each footer a different aria-label”Names tell landmarks apart, but a page has only one contentinfo landmark. axe still reports this rule, and screen reader users still meet two site footers.
More on the rule
Section titled “More on the rule”axe-core’s documentation of the rule
CORA’s fix guidance adapts content from accessibility-agents, under the MIT License: see its notice.