Pointer Cancellation
Actions should fire on release, not on press — so someone who lands on the wrong control can slide off it and nothing happens. Firing on down-press removes the chance to change your mind, which matters most to people with tremors or imprecise pointing.
- Principle
- Operable
- Guideline
- 2.5
- Level
- A
- In WCAG since
- 2.1
- Number
- 2.5.2
Broken, then fixed
The same interface twice: first with the mistake, then with the smallest change that fixes it.
Deleting fires the moment the pointer goes down.
A slipped tap is irreversible. There is no moment between touching the control and the action happening in which to escape.
It fires on release, over the control.
The default behaviour of a real click handler on a real button. Most violations of this criterion come from reimplementing buttons with pointerdown to feel snappier.
How to test
Check your own interface against 2.5.2, one step at a time.
- Press down on each button, link and control with the mouse, and hold the button down. Check that nothing happens yet.
- Still holding it down, move the pointer off the control and let go. Check that the action does not happen.
- Search the scripts for mousedown, pointerdown and touchstart handlers. For each one that runs an action, check that the action can be undone, or that releasing reverses it, as a press-and-hold button that shows something only while held does.
- Drag any item that can be dragged and drop it outside every drop target. Check that it goes back to where it started.
- For any action left that does run on the press, check that the press is essential, as it is for an on-screen piano key.
Common questions
Does a click handler pass 2.5.2?
Yes. The click event fires when the pointer is released over the same element it was pressed on, so moving off before letting go cancels it. Most failures come from handlers on mousedown, pointerdown or touchstart.
Does drag and drop pass 2.5.2?
Yes, when the person can cancel the drop. Dropping the item outside a target, or back where it started, should leave everything as it was; an undo step after the drop works too.
Can an on-screen keyboard act on the press?
Yes. A control that stands in for a physical key, such as a keyboard or a piano key, is expected to act on the press, so that is essential and is exempt.
Try it yourself
A lab is a small working piece of interface that you change yourself. Read its steps, use the controls under it, and watch the verdict line at the bottom: it says whether the criterion passes or fails as you go. Reset puts it back.
Try it: slide off the button
How to use this lab
- Goal. Let someone change their mind after pressing Delete draft.
- The controls. The options under “Delete draft acts on” pick Pointer down, which acts the moment you press, or Pointer up, which waits until you let go. The Press and slide off button acts out pressing Delete draft, sliding off it and letting go.
- Try this. The lab starts on Pointer down, which fails. Press Press and slide off, then pick Pointer up and press it again.
- What it means. On Pointer up, 2.5.2 passes: sliding off before letting go cancels, and the draft is kept. On Pointer down, 2.5.2 fails, because anyone who presses by mistake, such as people with tremors, has already lost the draft. The verdict line under the lab says which.
2.5.2 fails
Also in guideline 2.5
Criteria in the same guideline often fail together.
- 2.5.1, OperableLevel A
Pointer Gestures
Fails when: Zooming is gesture-only.
- 2.5.3, OperableLevel A
Label in Name
Fails when: The visible text and the accessible name disagree.
- 2.5.4, OperableLevel A
Motion Actuation
Fails when: Shake to undo, and no other way.
- 2.5.7, OperableNew in 2.2Level AA
Dragging Movements
Fails when: Reordering works by drag and drop only.
- 2.5.8, OperableNew in 2.2Level AA
Target Size (Minimum)
Fails when: Sixteen-pixel icons, packed edge to edge.