VIS-008 Show a change on everything people can press, while it is pressed and while the pointer is over it
- Level
- Rule
- Verdict
- Unanimous (3 of 3)
- Status
- proposed, version 1.0.0
Rule
Everything that does something when pressed, including a clickable card, row or list item, changes its look while it is pressed and, where the pointer can hover, while the pointer is over it. A control that is off shows neither change.
Examples
Live examples built with Justified's components. Try them with the mouse, the keyboard or a screen reader.
Do: A card that answers the pointer and the press
Atlas redesign
12 tasks · due 4 Dec
hover:bg-accent under the pointer and an inner shadow while pressed, with active: so a touch shows it too. The stills show the three looks. Try it with a mouse, with Tab then Enter (it opens the card; for the keyboard the signal is the focus ring), and with a finger: "Right now" shows a press on touch and no hover.Don't: A card with only a pointing cursor
Atlas redesign
12 tasks · due 4 Dec
cursor-pointer. The cursor is not a change of the card, and a touch screen has no cursor. The three stills are identical, and "Right now" says the pointer is on a card that looks the same.Do: Icon buttons that change, and one that stays still
Q3 budget.xlsx
Edited yesterday
Rename is off while Ana Ruiz is editing this file.
aria-disabled="true", and its hover and press are scoped with not-aria-disabled:, so it stays as it is. The line under the card says why it is off, and the button points to it.Don't: Icon buttons with no change, and an off one that lights up
Q3 budget.xlsx
Edited yesterday
Rename is off while Ana Ruiz is editing this file.
aria-disabled="true" but keeps unscoped hover: and active: classes, so it lights up and presses in like a button that works.Why
A press that changes nothing on screen leaves people unsure whether it was taken, so they press again, or give up on a control that works. A change under the pointer tells them, before they click, that this is the thing that will respond, and that the card they are pointing at is one target and not three. The same looks on a control that is off promise an action that is not there. No WCAG criterion asks for hover or pressed looks. The explanation of WCAG 2.2, 1.4.11 Non-text Contrast treats an author's hover look as an extra, since the pointer itself already shows where it is, so this rule rests on the judges. That Apple's stance carries to the web is our own reading. A hover look confirms what the element at rest should already show: that it can be used. It does not replace that.
Do
- In a project dashboard, each project is a
Cardwith a link to the project stretched over it (after:absolute after:inset-0on the link,relativeon the card). The card getshover:bg-accent hover:text-accent-foregroundand a pressed look such asactive:shadow-inner, and keeps itsborderat rest so it looks like one target before anyone points at it. Which fill to use is VIS-002; text on the new fill follows VIS-001. - Give every pressable element an
active:style as well as ahover:one. Tailwind v4 applieshover:only on devices that can hover, so on a phone a tap shows nothing unless there is anactive:style, which applies on touch too. - On a phone, a tile in Today's tasks shows its pressed look as soon as the finger lands on it. It has no hover look there, and needs none. Check the press on a real phone: a browser may hold the pressed look back for a moment inside an area that scrolls.
- On a file card, the icon buttons Download, Share and Rename each have a hover fill and a pressed look. Their names in code are ACT-001b, and their size is ACT-006.
- Build menus and command lists from shadcn's
DropdownMenu,SelectorCommand, which light the item under the pointer and the keyboard. If you must build a list by hand, give each item the same highlight. - Keep a control that is off still. Tailwind's
disabled:variant matches only the native attribute, so a menu item or button witharia-disabled="true"keeps itshover:andactive:classes. Scope them withnot-aria-disabled:hover:bg-accentandnot-aria-disabled:active:…. Avoidpointer-events-nonefor this: it also blocks a tooltip that says why the control is off. - Our own choice: show the pressed look at once on the press, with no delay. Any motion in the change follows VIS-006.
- Our own advice: make a pressable element look usable at rest, with a border, a link style, a chevron or a button shape, so nobody has to sweep the pointer over the page to find out.
Don't
- Put
onClickon aCardor adivrow and give it onlycursor-pointer. The cursor is not a change of the element, and a touch screen has no cursor at all. - Strip a ghost
Buttonof its hover withclassName="hover:bg-transparent"and put nothing in its place. - Map a list of plain
divitems in place of aDropdownMenu, so the item under the pointer looks like every other item. - Give a static summary
Cardor a decorative picturehover:shadow-lg. It invites a click that does nothing. This is our own advice; the rule itself only keeps the looks off a control that is off. - Let a menu item marked
aria-disabled="true"light up on hover and darken on press like the items that work.
Exceptions
- Row highlight as a reading aid. A table row that lights up under the pointer to help the eye follow it, as shadcn's
TableRowdoes withhover:bg-muted/50, is fine, and so is a row whose actions appear on hover, which TBL-003 covers. - Whole containers. A bar, a dialog, a sheet or a panel as a whole takes no hover or pressed look. The controls inside it do.
- Controls the browser draws. A native control left with the browser's own styling keeps the browser's own response.
- Touch only. Where the device has no pointer that can hover, only the pressed look applies.
- Neighbouring rules. The focus indicator and keyboard reach are KBD-001. Content or actions that appear on hover are TXT-002a, TXT-002b and TBL-003. The contrast of a control's edge and marks while it is hovered or pressed is VIS-004. Which token draws the change is VIS-002. A selected or on state kept visible under hover and press is VIS-008b. A control that is off is off in code too, as VIS-008a says. What a button shows after the press while its action runs is STA-005a.
Verdict
Unanimous (3 of 3). Only the judges decide; the expert witnesses are shown but do not vote. How verdicts work
| Source | Role | Stance | Page |
|---|---|---|---|
| WCAG 2.2 | Law | – No criterion applies | |
| Material Design | Judge | Supports | States: applying states Lists: accessibility Lists: guidelines |
| Apple Human Interface Guidelines | Judge | Supports | Buttons Pointing devices (iPadOS and macOS pointer guidance; hover effects described for iPadOS apps, not the web) |
| Carbon Design System | Judge | Supports | Color Disabled states Tile |
| GOV.UK Design System | Expert witness | No position | |
| Nielsen Norman Group | Expert witness | Supports | Button States: Communicate Interaction, by Kelley Gordon Beyond Blue Links: Making Clickable Elements Recognizable, by Hoa Loranger |
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.0, : First version.
Last checked against the other rules for conflicts on .
More in Colour and motion: 11 rules and 0 guidelines · 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.