Labeling Landmarks
You'll learn how to make multiple landmarks of the same type distinguishable for screen reader users.
The Problem with Duplicate Landmarks
When you have multiple <nav> elements or several <aside> sections on a page, screen readers announce them all the same way: "navigation landmark" or "complementary landmark." This creates confusion—users can't tell which navigation is the main menu versus a secondary menu, or which aside contains related articles versus advertisements.
Think of it like having three doors in a hallway all labeled "Door." Not helpful! You need "Front Door," "Bathroom Door," and "Closet Door."
Using aria-label
The aria-label attribute adds a descriptive name directly to a landmark:
<nav aria-label="Main">
<!-- primary site navigation -->
</nav>
<nav aria-label="Footer">
<!-- footer links -->
</nav>
Screen readers now announce "Main navigation landmark" and "Footer navigation landmark"—much clearer!
Using aria-labelledby
When a visible heading already describes the landmark, reference it with aria-labelledby:
<aside aria-labelledby="related-heading">
<h2 id="related-heading">Related Articles</h2>
<!-- content -->
</aside>
<aside aria-labelledby="ads-heading">
<h2 id="ads-heading">Sponsored Content</h2>
<!-- ads -->
</aside>
This approach is preferred when the label is already visible—it keeps your HTML DRY (Don't Repeat Yourself) and ensures visual and programmatic labels match.
When to Label Landmarks
You only need labels when you have multiple landmarks of the same type on a page. A single <main> or <nav> doesn't need a label—its role is already unique.
Key Takeaway: Use aria-label or aria-labelledby to distinguish multiple landmarks of the same type, making navigation clearer for screen reader users who browse by landmark regions.