Principle 01
The selected tab, the current page or the active filter should look different in its own body: its fill, its weight, its image. A thin stripe on one side is the cheapest way to say this one, and it is the first thing that reads as generated.
In a real interface
✕ Avoid
✓ Do
01
People need to know where they are and what is on. NN/g calls it visibility of system status and puts it first among the heuristics: "A lack of information often equates to a lack of control."
For navigation, NN/g recommends that the selected element become more visually prominent, through color, through offsetting it in space, or both, because both together are more accessible.
02
Change the item itself. Give the active row its ground, the active tab its weight and a filled shape, the active card its image or a stronger border all the way around.
Never rely on hue alone. WCAG 1.4.1 says color cannot be the only visual means of distinguishing an element, so pair the color with shape, weight, an icon or text.
03
Dense tables can use a filled row plus a check, not a colored edge. When two states coexist, such as hover and selected, each needs its own treatment so the selected one never looks like a hover.
✓ Do
✕ Avoid
For agents · PRINCIPLE.md
## State is shown by the content
- Mark the active item with its own fill, image or ground. Never with a stripe on one edge.
- The selected state must survive without color: add weight, a shape change or a label.
- Hover, focus, active, selected and disabled are five different states. Design each one.
- Before shipping, compare the active item with its neighbours in grayscale.
Enforced byBADESIGN never marks state with a colored stripe on one sidekero-audit state contrast on hover and focus