skills/navigation-menu/SKILL.md
Use when you need to organize and structure site navigation.
npx skillsauth add thedaviddias/ux-patterns-for-developers navigation-menuInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Organize and structure site navigation
Navigation Menu is the primary horizontal or vertical bar of links that helps users move between the main sections of a website or application. It is the backbone of site architecture, giving users a persistent map of what the site offers and where they currently are. A well-built navigation menu balances visibility, hierarchy, and responsiveness — always adapting to viewport size while remaining accessible to keyboard and screen reader users.
Use Navigation Menu to provide persistent, structured access to the main sections of a website or app. Common scenarios include:
references/pattern.md, then choose the smallest viable variation.Do's ✅
<nav> element with aria-label for screen reader landmark navigationaria-current="page" on the active link<button> with aria-expanded and aria-haspopup for dropdown triggers<div> with click handlers instead of semantic <nav>, <ul>, <a>, or <button><nav> elements without distinct aria-label valuesposition: sticky not JavaScript-based)Semantic HTML (No JS Needed for Basic Nav)```html
<nav aria-label="Main navigation"> <ul>The Problem: Cramming 10+ items into the primary navigation bar causes wrapping, overflow, or truncated labels.
How to Fix It: Limit to 5-7 top-level items. Group excess items under broader categories or move them to a secondary navigation bar.
The Problem: Users can't tell which page they're on because no navigation item is visually highlighted.
How to Fix It:
Style the current page's navigation link distinctly (color, weight, underline) and add aria-current="page" for screen readers.
The Problem: Keyboard users and touch-device users cannot access dropdown submenus that only respond to mouse hover.
How to Fix It: Use click/tap to toggle dropdowns. Support Enter/Space to open and Escape to close for keyboard users.
For full implementation detail, examples, and testing notes, see references/pattern.md.
Pattern page: https://uxpatterns.dev/patterns/navigation/navigation-menu
tools
Use when implementing multi-step forms and processes.
content-media
Use when implementing video playback with controls.
development
Use when choosing, comparing, or implementing UX patterns across the UX Patterns for Developers corpus.
tools
Use when implementing user profile and account management.