In this Article
Need some background on Landmarks?
Review our ARIA Landmarks: The Basics article.
Why should landmarks be unique?
Providing unique, accessible landmark names enables screen reader users to navigate a webpage quickly, making accessibility a key part of an inclusive web experience.
For example, if there are three <footer> landmarks on a page without additional information provided to clarify the difference in the areas for the screen reader user, confusion is sure to follow. Screen readers would announce something like "Footer" for all three elements, with no clarification of the differences.
Creating Unique, Accessible Landmark Names
Landmarks should have either a unique role or a unique accessible name to pass this best practice check.
Whenever possible, use standard HTML elements that already have built-in roles, such as:
<header>has an implicit role of banner<nav>has an implicit role of navigation<main>has the same implicit role of main<aside>has the implicit role of complementary<footer>has an implicit role of contentinfo
If you have duplicates of an allowed landmark type, be sure to use one or more of the items listed below to differentiate each instance of the landmark.
The accessible name given to an element is determined using the following hierarchy:
aria-labelledby
aria-label
native <label>
title attribute
other fallbacks, such as placeholder text or inner content
Non-unique Landmark Examples and Corrections
Using aria-labelledby
Example 1: Incorrect
<div id="label-1">Main Menu</div>
<div id="label-2">Main Menu</div>
<nav id="main-menu-top" aria-labelledby="label-1"></nav>
<nav id="sub-menu-side" aria-labelledby="label-2"></nav>
Even though the ids for the two nav elements above have different values, their aria-labelledby values have the same value, so the names are not unique. Changing the value of either div reference in the nav code will provide a unique accessible name for each nav landmark.
Example 1: Correct
<div id="label-1">Main Menu</div>
<div id="label-2">Sub Menu</div>
<nav id="main-menu-top" aria-labelledby="label-1"></nav>
<nav id="sub-menu-side" aria-labelledby="label-2"></nav>
Using aria-label
Example 2: Incorrect
<nav id="violation-nav" aria-label="our nav"></nav>
<nav id="violation-nav-2" aria-label="our nav"></nav>
The <nav> elements above have different ids, but their aria-labels are the same. ID values are not taken into account for accessible landmark names. Screen readers would announce something like, "Navigation, our nav" for both of these elements.
Simply change one of the aria-labels in the example above to pass this check.
Example 2: Corrected
<nav id="violation-nav" aria-label="our nav"></nav>
<nav id="violation-nav-2" aria-label="sub nav"></nav>
Learn More
Accessibility Landmarks from W3schools
ARIA Landmarks Example from W3
If you have questions, please contact our DubBot Support team via email at help@dubbot.com or via the blue chat bubble in the lower right corner of your screen. We are here to help!
