Skip to content

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)
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

Invoices

Nothing more in this demo.

Invoices is semibold, has a bar on its leading edge and a filled icon. Clients is drawn as if under the pointer and only gets a quiet background, so the two cannot be mixed up. Click an item: the mark follows the page.

Do: The mark survives the collapsed sidebar

With the labels gone, the current item keeps a filled icon and a border around it that holds its contrast against the bar behind. Click an item in either bar: both follow.

Don't: Colour is the only difference

Invoices

Nothing more in this demo.

Invoices uses the full text colour and the rest a muted one, with the same weight and icons. Take the colour away, in forced colours or for a person who does not tell the shades apart, and nothing marks the page. The difference is also under 3:1 in lightness, the least VIS-003a accepts.

Don't: Current looks like hover

Invoices

Nothing more in this demo.

Clients is drawn as if under the pointer and gets the same pill as the current page, so two items look current. Move the pointer over the other items to see the second one appear.

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 SidebarMenuButton gets bg-sidebar-accent, text-sidebar-accent-foreground and font-medium, and hover uses the same background and text colour. Only the weight tells the current item from the hovered one. An active SidebarMenuSubButton changes colour only. Add a cue of your own, such as data-[active=true]:font-semibold with 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-foreground while the rest are text-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

Stances on NAV-002b
SourceRoleStancePage
WCAG 2.2LawSupports1.4.1 Use of Color
Material DesignJudge SupportsNavigation rail: guidelines
Navigation rail: accessibility
Navigation bar: guidelines
Navigation bar: accessibility
Navigation drawer: guidelines
Apple Human Interface GuidelinesJudge No position
Carbon Design SystemJudge SupportsUI shell left panel: accessibility
GOV.UK Design SystemExpert witness No position
Nielsen Norman GroupExpert witness SupportsNavigation: 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