Skip to main content
WCAGrules
Quick navigation

Pointer Cancellation

For anything operated with a single pointer, one of four things has to be true. The down-press does not execute any part of the function. Or the function completes on release and there is a way to abort it before it completes, or undo it afterwards. Or the release reverses whatever the press did. Or completing on the press is essential. The third one is the branch people miss, and it is why press-and-hold interactions are fine. A preview that appears while you hold and vanishes when you let go has already cancelled itself. The standard settles one essential case in its own text as well. A control that emulates a keyboard or keypad key is essential by definition, because a letter is supposed to appear when the key goes down rather than when it comes back up.

Why it matters

Touch is imprecise by nature and a tremor multiplies that. Firing on the press turns every accidental graze into a committed action with nothing to take back. Release-to-commit is what makes a phone feel forgiving, and it works because of a small mechanic worth knowing. The action fires only when the finger lifts inside the target, so sliding off before letting go is the cancel gesture. That gesture is only discoverable if the control shows something on press, which is the half designers usually leave out. This helps far more people than the ones with tremors. The standard names people with visual disabilities and people with cognitive limitations too, since anyone who cannot see or track exactly what they touched needs a way back.

Who this rule protects

This affects people with tremors or imprecise touch who brush a control by accident, people with visual disabilities who cannot confirm what they touched, people with cognitive limitations who need a way to back out of an action, people with motor impairments, and anyone who has ever fat-fingered a Delete they did not mean.

How to check it yourself

  1. Press a control, slide off it, and release. The action should not fire.
  2. Watch what happens on the press. A control that shows nothing until release has technically conformed and has hidden the cancel gesture from the person who needs it.
  3. Run the same test inside clickable cards and list rows. Releasing outside a nested button can still activate the container around it, which looks like a pass and is not the behaviour anybody wants.
  4. Check destructive and payment actions specifically, meaning delete, submit and pay, since a misfire there is not recoverable by trying again.
  5. For drag and drop, look for one of three exits. Releasing outside a drop target puts the item back, dragging it back to where it started undoes the move, or a confirmation step or undo control appears after the drop.

Failures we see most often

  • A modal Close control bound to the press rather than the click, so a brush against it discards a half-completed form.
  • Buttons wired to mousedown, touchstart or pointerdown, which fire before the user has decided to commit. On a codebase written in the last few years, pointerdown is the likeliest of the three.
  • A delete icon that acts on press, with no undo and no confirmation.
  • A kanban board where a card dropped in the wrong column stays there, with no way to release it harmlessly and no way to put it back.

Who this one is for

Read from this rule's own note above, so the grouping and the note cannot disagree.

How to fix it

  • Use the click event. It fires on release, it is device-independent, and it already works for touch, pointer and keyboard without a second code path.
  • Leave native controls alone. The up-event is the default behaviour of almost every control in every language, so the fix here is usually deleting an override rather than adding anything.
  • Give the user something to see on press. Cancellation only helps somebody who can tell they pressed the wrong thing while there is still time to slide off it.
  • For drag and drop, pick a cancellation route and build it. Reverting when the item is released outside any target is the cheapest. A board with no neutral space to drop on needs the second route instead, which is dragging the card back where it came from.
  • Where the press genuinely has to act, such as an on-screen piano key or a drawing tool, that is the essential branch and it conforms on its own. An undo is not required there, and it is still the kind thing to build.
Step-by-step fix guides (3)

Passes vs. fails

A general illustration of the pattern rather than a test of 2.5.2. Passes: targets big enough to hit. Fails: tiny, touching controls.

Passes

The order fires on release, sliding off cancels it, and a confirmation step stands between the tap and the charge.

Fails

'Place order' fires on touchstart, so a shopper with a tremor places the order twice before noticing.

In audits and lawsuits

There is no automated rule for this criterion, and W3C says outright that scanning for down-event listeners can narrow the list of suspects and cannot decide the outcome. That is because the failure is a conjunction of four things. It fails only when the down-event fires the function, no abort or undo exists, the release does not reverse it, and completing on the press is not essential. All four have to hold. We probe destructive and payment actions first, because a misfire there costs somebody real money. One thing our own method has to allow for. Sliding off a control inside a card that is itself clickable does not do nothing, because the browser fires the click on the nearest element containing both, so the cancel gesture cancels the button and activates the card.

Go somewhere useful

Find tools, resources and your workspace.

29 destinations