Navigation Patterns: 5 Must Know Rules for Your Site
Master 5 essential navigation patterns to structure your multi page site. Implement primary, secondary & utility navigation to…
Read more →Master 5 landmark elements to pass accessibility audits. Fix common failures and build accessible, navigable websites for all users.
Getting accessibility audits right starts with understanding landmark elements in practice. You know the drill. You run an accessibility scan, and the report spits back a laundry list of problems. “Page missing a main landmark.” “Ensure landmarks are unique.” It’s tempting to just treat these as annoying boxes to check, another round of semantic whack a mole to get that perfect score.
But here’s what those warnings are really saying, if you listen closely. Your website is a confusing, shapeless mess to someone who can’t see it. Imagine trying to navigate a new city with no street signs, no neighborhoods, no landmarks. Just buildings. That’s exactly what your page feels like to someone using a screen reader when your HTML has no structure.
This is where landmark elements come in. I’m talking about the simple HTML5 tags you might be ignoring: <main>, <nav>, <aside>, <header>, <footer>. These aren’t just code salad for auditors. They’re the street signs, districts, and major monuments of your webpage. They answer the basic questions every user has: “Where am I right now?” “Where’s the actual content?” “How do I get to the menu?”
Getting accessibility audits to pass isn’t about pleasing a scanner. It’s about building a mental map for real people. It turns a frustrating audit into actual, meaningful design when you implement landmark elements in practice.
People using screen readers don’t experience the web like you do. They don’t just start at the top and read down, that would be agonizingly slow. Instead, they navigate by jumping. They can pull up a list of all the landmarks on your page with a single keystroke and jump straight to the area they want, just like you visually scan for a menu or a search bar.
Without proper landmark elements in practice, that list is practically empty. The user is stuck in an endless sea of generic <div> tags, forced to crawl through every single element to find anything. It’s like searching for one specific store in a massive mall where all the directory signs are blank.
Good landmark elements do three simple but powerful things for accessibility audits and real users:
You don’t need to memorize a dictionary of obscure ARIA roles. For almost every website, these five tags will get you 95% of the way there when preparing for accessibility audits.
1. <main> – The Star of the Show
This tag wraps the primary, unique content of the page. There should only be one <main> per page. This is the destination.
<main>.html
<body>
<header>...</header>
<nav>...</nav>
<!-- This is the most important part of the page -->
<main id="main-content">
<h1>The Article You Came For</h1>
<p>All the unique content lives right here.</p>
</main>
<aside>...</aside>
<footer>...</footer>
</body>2. <nav> – Your Site’s Roadmap
Wrap any major collection of navigation links in a <nav>. Your main menu, a table of contents, or pagination controls are perfect examples.
3. <header> & <footer> – The Page’s Bookends
These are usually for the site wide top and bottom sections. The <header> typically holds your logo, main <nav>, and search. The <footer> is for copyright, contact links, and legal stuff.
<div> for CSS. They create landmarks.4. <aside> – The Supporting Actor
This is for content that’s related to the main content but not essential. Think sidebars, author bios, related article links, or pull quotes. If you removed the <aside>, the <main> content should still make complete sense.
5. <form> & <search> – The Action Stations
While not a visual “region,” a <form> (especially with role="search") and the newer <search> element are announced as landmarks. They tell users, “Here’s where you can do something.”
html
<form role="search"> <!-- Creates a "search" landmark --> <!-- search inputs --> </form>
When your accessibility audits fail or a screen reader user gets confused, it’s usually one of these four issues with your landmark elements in practice.
The Error: “Page missing a main landmark.”
<div class="content">.<div> to a <main>.The Error: “Landmarks must be unique.”
<nav> or two <aside> sections with no way to distinguish them.aria-label.html<nav aria-label=”User Account Links”>…</nav> <nav aria-label=”Help & Support”>…</nav>The Error: “Ensure landmarks are contained…”
<main> landmark inside a <nav> landmark, creating a weird structural hierarchy.<nav> to be inside a <header>, but your primary <main> should be on its own.The Error: “All content must be in a landmark.”
<aside>) or move it into an existing one (like putting a utility link in the <header>).Here’s what a typical, unstructured blog post looks like in code:
html
<body>
<div class="top">Logo, Search</div> <!-- Lost in space -->
<div class="menu">...</div> <!-- Invisible to navigation -->
<div class="content">
<h1>My Post</h1>
<p>Post content...</p>
</div>
<div class="sidebar">Author Bio</div> <!-- Just a div -->
<div class="bottom">Copyright</div> <!-- Orphaned -->
</body>To a screen reader: This is maybe 2 landmarks total. The user has to tediously explore every element.
Here’s the fixed version with proper landmark elements in practice:
html
<body>
<header>
<a href="#main-content">Skip to Content</a>
<div class="top">Logo, Search</div> <!-- Now part of header -->
<nav aria-label="Main Navigation">
<div class="menu">...</div>
</nav>
</header>
<main id="main-content">
<article>
<h1>My Post</h1>
<p>Post content...</p>
</article>
</main>
<aside aria-label="About the Author">
<div class="sidebar">Author Bio</div>
</aside>
<footer>
<div class="bottom">Copyright</div>
</footer>
</body>Now, a screen reader sees: Banner (header), Navigation, Main, Complementary (aside), Contentinfo (footer). The user can jump anywhere instantly.
<main> usually comes after the <header> and main <nav>.<main> to Rule Them All: Don’t nest them. You only get one per page.<nav> over <div role="navigation">. The built-in elements work better and are simpler. The official W3C ARIA Landmarks specification provides the complete standard for reference.<nav>, consider adding a heading (like <h2 class="visually-hidden">Site Menu</h2>) to clearly announce its purpose.Fixing landmark elements to pass an accessibility audit is just the start. The real win is changing your mindset. You’re not adding role="main" to check a box. You’re planting a <main> beacon for someone trying to get something done. You’re not labeling a <nav> to silence a warning. You’re putting up a clear street sign at a major intersection.
A page with good landmark elements in practice is an act of respect. It says, “I thought about how you’d move through here, and I built you a map.” Start with these five tags, test with a real screen reader, and watch those annoying accessibility audits transform into a clear, navigable structure that works for everyone. That’s what accessibility is really about.
New to HTML? Start Here: HTML Tutorial for Beginners: Your Complete Introduction to HTML Basics
Practice what you learned
Reading is step one. Open this lesson's starter code in the editor, finish it, and you've really learned it.
<body> <header>...</header> <nav>...</nav> <!-- This is the most important part of the page -->
Master 5 essential navigation patterns to structure your multi page site. Implement primary, secondary & utility navigation to…
Read more →Master code comments & style guides with 3 rules. Write maintainable HTML/CSS, onboard teams faster, and build effective…
Read more →Discover HTML fundamentals with our comprehensive guide. Unlock the colorful possibilities of web development today!
Read more →Arm yourself with step by step tutorials, expert tips, and insider tools to conquer any coding project - subscribe now.