Fixing Missing Page Landmarks: A Diagnostic Guide to HTML5 Semantic Elements
Learn how to diagnose and fix missing HTML5 landmarks to improve screen reader accessibility and SEO by replacing generic divs with semantic elements.
11 Sept 2026, 10:57 UTC

The Problem: Invisible Page Structure
When a website relies exclusively on <div> and <span> tags for layout, the visual structure is clear to sighted users, but the logical structure is invisible to assistive technologies and search engine crawlers. This results in a lack of "landmarks"—defined regions of a page that allow screen reader users to jump directly to the main content, navigation, or footer without tabbing through every link on the page.
The takeaway: Replacing generic containers with HTML5 semantic elements (like <main>, <nav>, and <header>) automatically assigns ARIA (Accessible Rich Internet Applications) roles to your content, improving both accessibility (A11y) and SEO indexing.
Diagnostic: Identifying Landmark Failures
If you suspect your page structure is non-semantic, use this table to match the symptom to the likely cause.
| Symptom | Probable Cause | Impact |
|---|---|---|
| Screen reader cannot "jump to main content" | Missing or multiple <main> tags |
High: Users must navigate the entire header/nav first |
| Navigation links are not grouped as a landmark | Using <div class="nav"> instead of <nav> |
Medium: Loss of quick-nav functionality |
| Content is not identified as a standalone entity | Using <section> for independent posts instead of <article> |
Low/Medium: Poor syndication and SEO indexing |
| Redundant "Navigation" announcements | Nested <nav> elements without labels |
Medium: Confusing auditory experience |
Step-by-Step Structural Audit
Follow these checks in order. Perform these tests using Browser Developer Tools (F12) and an accessibility validator like Axe or Lighthouse.
1. Verify the Main Content Landmark
Search your DOM for the <main> element. It must represent the dominant content of the <body>.
- Check: Is there exactly one
<main>element? - Risk: Multiple
<main>tags violate the HTML5 spec and confuse document outline parsers. - Fix: Wrap the primary unique content of the page in a single
<main>tag. Remove any duplicate<main>tags.
2. Validate Navigation Regions
Identify all areas used for primary or secondary navigation.
- Check: Are these areas wrapped in
<nav>tags rather than<div>tags? - Check: If multiple
<nav>elements exist (e.g., header nav and footer nav), do they have unique labels? - Fix: Replace
<div class="navigation">with<nav>. For multiple navs, add anaria-labelto distinguish them:<nav aria-label="Primary">and<nav aria-label="Footer">.
3. Distinguish Articles from Sections
Review blocks of content that could theoretically be distributed independently (like a blog post, a forum comment, or a news card).
- Check: Is the content wrapped in
<article>? - Fix: Use
<article>for self-contained content. Use<section>for thematic groupings of content that are part of a larger whole.
4. Audit Header and Footer Placement
Check the top and bottom of your document structure.
- Check: Is the page-level header in a
<header>and the page-level footer in a<footer>? - Fix: Ensure the global site header/footer use these tags. Note: You can use
<footer>inside an<article>for metadata, but the primary page footer should be a direct child of the<body>or a major landmark.
Implementation Example: Before vs. After
Below is a comparison of a non-semantic layout and its corrected semantic version.
Non-Semantic (Incorrect)
<div id="header">
<div class="nav">...</div>
</div>
<div id="content">
<div class="post">...</div>
</div>
<div id="footer">...</div>
Semantic (Correct)
<header>
<nav aria-label="Main">...</nav>
</header>
<main>
<article>...</article>
</main>
<footer>...</footer>
Verification and Limitations
To verify the fix, run the following checks:
- Lighthouse/Axe: Run an accessibility audit. The "Landmarks" or "ARIA" warnings should be resolved.
- Screen Reader Test: Using NVDA (Windows) or VoiceOver (macOS), use the landmark navigation shortcut (usually 'D' or 'L' depending on the tool) to cycle through the page. You should hear "Main landmark," "Navigation landmark," etc.
- DOM Inspection: Ensure no
role="navigation"is added to a<nav>tag; this is redundant and unnecessary in modern browsers.
Limitation: Semantic tags improve structure but do not fix poor content hierarchy. You must still use correct heading levels (<h1> through <h6>) inside these landmarks to provide a full document outline.
Rollback Procedure
If the introduction of semantic tags causes unexpected CSS layout shifts (which can happen if your CSS targeted specific div IDs or classes that were removed), revert the tags to <div> and re-apply the original IDs/classes. Once the layout is stable, transition the tags one by one while updating the CSS selectors to target the element type (e.g., change #header to header).
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.