Sub topic 1
Start with Information Architecture and User Tasks
Prerequisites
Assume you know basic HTML and CSS, including links, lists, and the box model. You should also understand responsive design and basic JavaScript event handling.
Start with Information Architecture and User Tasks
Information architecture is the way a site organizes content. Begin with what users need to do, not with the number of links you want to display.
List the main user tasks, such as:
- Compare products
- Read documentation
- Contact support
- Manage an account
Group pages that support the same task. Keep primary navigation focused on the site's most important destinations. Secondary pages can appear inside sections, search results, or the footer.
Writing Clear Navigation Labels and Groups
A navigation label is the visible text for a link. Use words users already understand. “Pricing” is usually clearer than “Plans and investment options.” Keep labels consistent: use either nouns such as “Products” and “Support,” or action phrases such as “Buy” and “Contact us.”
Group related links under a shared heading. Avoid putting unrelated destinations into one large menu. Test labels by asking someone where they would click for a specific task.
Choosing a Primary Navigation Pattern
Choose the simplest pattern that supports the content:
- Use a simple menu when there are a few high-priority destinations.
- Use a dropdown when one section has a small set of related child pages.
- Use a mega menu when a large site needs several clearly grouped categories.
A mega menu should expose structure, not hide an unorganized list. On small screens, it often becomes a disclosure panel controlled by a button.
Marking Up Navigation with `nav`, Lists, and Labels
Use the nav landmark for a major set of navigation links. Give each navigation landmark a distinct accessible name. Lists preserve the relationship between links for assistive technology.
<a class="skip-link" href="#main">Skip to main content</a>
<header>
<nav aria-label="Primary">
<ul>
<li><a href="/" aria-current="page">Home</a></li>
<li><a href="/products">Products</a></li>
<li><a href="/support">Support</a></li>
</ul>
</nav>
</header>
<main id="main">
<h1>Home</h1>
</main>Adding a Skip Link
A skip link lets keyboard users bypass repeated navigation and reach the main content. Keep it visually hidden until focused. Make the target a real landmark, such as main, and ensure the target receives focus or is clearly announced by the browser.
Exercise
When should you choose a mega menu instead of a simple menu?
Show answer
Choose it when a large site has many destinations that can be organized into clear, meaningful groups.