NAV-002b Mark the current page in a repeated menu with a cue that is not colour alone
- Level
- Rule
- Verdict
- Unanimous (2 of 2)
- Area
- Navigation
- Status
- proposed, version 1.0.1
Rule
A navigation menu that repeats across pages marks the item for the page or section the person is in, and only that item. The mark does not rest on colour alone: use heavier text, a filled icon, a shape behind the item or a bar beside it.
Examples
Live examples built with Justified's components. Try them with the mouse, the keyboard or a screen reader.
Do: Weight, a bar and a filled icon
Do: The mark survives the collapsed sidebar
Don't: Colour is the only difference
Don't: Current looks like hover
Why
A mark on one menu item tells the person where they are at a glance; a mark on two items, or one that looks like hover, answers it wrongly. A mark made of colour alone is lost on people who do not see that colour difference, and in forced-colours mode. No WCAG criterion at Level AA asks a menu to show the current item; 2.4.8 Location asks for it, but that is Level AAA. WCAG 2.2, 1.4.1 Use of Color sets a lower floor than this rule: it accepts a colour change that also differs enough in lightness, and a swap of foreground and background. So a colour-only mark does not always fail WCAG. Asking for a cue that is not colour at all is the judges' level, not the law's. This rule sits on two Requirements and sets no contrast figure of its own. When the mark uses colour, VIS-003a sets the lightness difference the law asks as a minimum. When a bar, a border or a shape behind the item is how people see the mark, VIS-004 sets the contrast that indicator needs. Saying the same thing in code is NAV-002a.
Do
- In the invoicing app Tallowbrook, the sidebar lists Dashboard, Invoices, Clients and Reports. On the invoice list, Invoices has semibold text, a filled icon and a bar on its leading edge. The other items have regular text and outlined icons.
- Know what shadcn gives you. In the current source (read on 25 November 2026), an active
SidebarMenuButtongetsbg-sidebar-accent,text-sidebar-accent-foregroundandfont-medium, and hover uses the same background and text colour. Only the weight tells the current item from the hovered one. An activeSidebarMenuSubButtonchanges colour only. Add a cue of your own, such asdata-[active=true]:font-semiboldwith a left border. - Keep the current mark and the hover style different, so the person can tell the page they are on from the item under the pointer. VIS-008b asks this of every state that lasts.
- Take the mark from the route, not from a click handler, so it is right after a reload, a back press or a link from elsewhere.
- Match routes so that one item wins.
pathname.startsWith("/")is true everywhere, so Dashboard at/matches only exactly. - Our own reading: on a single invoice,
/invoices/INV-0042, which is not in the menu, mark Invoices, the section the person is in. - In a nested group, the child item gets the mark. The parent may show that it holds the current page, for example by staying expanded, but not with the same mark.
- Keep a cue that survives the collapsed sidebar (
collapsible="icon"), where the label is gone: a filled icon, or a border or shape behind the icon that meets the contrast VIS-004 asks for against the bar behind it. A shape that falls short of that does not count as the cue. - On a narrow screen the menu moves into a sheet (LAY-001). The current item keeps its mark there.
- Our own advice: forced-colours mode (Windows high contrast) drops background colours, so a mark made only of a background pill, or a bar drawn with a background, disappears. Weight, a border and an icon change survive.
- Make the mark look nothing like the focus ring, which KBD-001 owns. Both can show on the same item at once.
Don't
- Mark Invoices with
text-foregroundwhile the rest aretext-muted-foreground, and nothing else. - Use the hover classes for the current item, so moving the pointer over Clients makes two items look current.
- Highlight Dashboard and Reports together on the reports page because of a prefix match.
- Set the active item in state on click, so nothing is marked after a reload.
- Leave only a faint tint behind the icon when the sidebar collapses to icons.
Exceptions
- No item matches. On a page reached from the account menu, such as Profile, which the sidebar does not list, mark nothing rather than the nearest item.
- Menus that are not about place. An account menu or a menu of actions has no current page and needs no mark.
- Tabs. Tabs that switch a panel in place show a selected tab; this rule is for menus of links that go to pages.
Verdict
Unanimous (2 of 2). Only the judges decide; the expert witnesses are shown but do not vote. How verdicts work
| Source | Role | Stance | Page |
|---|---|---|---|
| WCAG 2.2 | Law | Supports | 1.4.1 Use of Color |
| Material Design | Judge | Supports | Navigation rail: guidelines Navigation rail: accessibility Navigation bar: guidelines Navigation bar: accessibility Navigation drawer: guidelines |
| Apple Human Interface Guidelines | Judge | No position | |
| Carbon Design System | Judge | Supports | UI shell left panel: accessibility |
| GOV.UK Design System | Expert witness | No position | |
| Nielsen Norman Group | Expert witness | Supports | Navigation: You Are Here, by Susan Farrell |
Each stance links to the page it rests on, read on the date in the source register. This page never repeats what a source says; read the source itself.
History
- Version 1.0.1, : Points to VIS-008b for keeping the current mark apart from hover.
- Version 1.0.0, : First version.
Last checked against the other rules for conflicts on .
More in Navigation: 3 rules and 1 guideline · All rules
Justified is an independent project. It is not affiliated with, sponsored or endorsed by the organisations whose guidance it cites. Read the full statement.
Apple is a trademark of Apple Inc., registered in the U.S. and other countries and regions.