Landmark strategy for complex pages
Large pages can contain multiple navigation and content areas, so their scope and accessible names need deliberate design.
✓ What you will learn in this topic
- Explain the purpose of Landmark strategy for complex pages in a real HTML document.
- Choose and apply the elements shown in both examples.
- Recognize the specific mistake described in this lesson.
Concept explanation
Landmarks are navigation shortcuts, not wrappers for every visual region. A page may need primary navigation, a table of contents, and contextual navigation; give those nav landmarks distinct names. Keep one main region for the central task. Use sectioning elements when content has a genuine topic and heading, rather than adding nested regions just to match a component tree.
Syntax
Name multiple nav landmarks by purpose and keep main focused on the central content.
Example 1: a small page
Two nav regions have distinct names so users can identify global navigation versus page contents.
<nav aria-label=\"Primary\"><a href=\"/docs\">Documentation</a></nav>
<nav aria-label=\"On this page\"><a href=\"#setup\">Setup</a></nav>
<main><h1>Install the toolkit</h1></main>Expected result: The page provides separately named navigation regions and one main topic.
Example 2: a practical page
The article contents navigation is contextual and its section links point to real headings.
<main>
<article>
<header><h1>Account security</h1></header>
<nav aria-label=\"Article sections\"><a href=\"#passkeys\">Passkeys</a><a href=\"#recovery\">Recovery</a></nav>
<section id=\"passkeys\"><h2>Passkeys</h2><p>Use a device credential to sign in.</p></section>
</article>
</main>Expected result: Readers can jump between the articleâs sections without confusing it with the global site navigation.
Common mistakes
Do not add landmarks and sectioning elements mechanically; too many named regions can make navigation noisy.
Best practices
Document a small semantic pattern library and use it consistently while letting each pageâs content determine its structure.
Practice exercise
Propose a semantic template for a documentation site with global navigation, section navigation, an article, an edit history, and related links. Explain landmark names and heading order.
Lesson summary
- Use a small number of clearly named landmarks whose scope matches the task.
- Document a small semantic pattern library and use it consistently while letting each pageâs content determine its structure.
Knowledge check
When should two nav landmarks receive distinct accessible names?
Show the explanation
When they serve different purposes, such as global navigation and a page table of contents.
Practical example
html<nav aria-label=\"Primary\"><a href=\"/docs\">Documentation</a></nav>
<nav aria-label=\"On this page\"><a href=\"#setup\">Setup</a></nav>
<main><h1>Install the toolkit</h1></main>
Expected result:
The page provides separately named navigation regions and one main topic.
Hands-on practice task
Propose a semantic template for a documentation site with global navigation, section navigation, an article, an edit history, and related links. Explain landmark names and heading order.
In this section
Other lessons in Advanced Semantic Architecture
Broaden your knowledge