A finger lands on the wrong action while someone steadies a phone. A mouse slips between two adjacent controls. The important question is not only whether the target was large enough: can the person withdraw that press before it does anything? A control that commits immediately removes this small but useful opportunity to change direction.
1. Decide when the action becomes real
WCAG’s Pointer Cancellation criterion offers alternatives for single-pointer functions: avoid executing the function on the down-event; complete on release with a way to abort or undo; reverse the down-event’s outcome on release; or establish that down-event completion is essential. These are alternatives, not four simultaneous obligations, and they do not promise a universal undo facility.
For an ordinary save button, write down the actual commitment point. Pressed styling may acknowledge contact without sending the request. Keep the distinction clear in the design specification: a visual response is not permission to perform the business action early. Review custom event handlers as well as the mockup.
2. Leave room to withdraw
Try pressing a control, keeping the pointer down, moving away, then releasing. The test should answer a concrete question: did the unintended action remain uncommitted? Check the result, not merely whether the button returned to its usual colour. A toast, network request or changed record can reveal an action that already happened.
This is complementary to giving touch targets enough room. Spacing helps prevent a mistaken start; cancellation helps after one. Avoid placing a second consequential action directly along the likely escape route. Test near screen edges, where moving away may be awkward.
3. Prefer familiar activation behaviour
MDN describes click as device-independent. Keyboard activation applies to elements with default keyboard handling; adding tabindex to a div does not make it a native button. Start with an appropriate HTML control and preserve its expected behaviour instead of rebuilding a button from pointer events alone.
There is another implementation trap: pressing inside one element and releasing outside can produce a click on their common ancestor. A delegated handler must check the actual target rather than treating every click in a card as approval. Include padding, icons and neighbouring links in that review. Test mouse, touch and keyboard separately.
4. Make recovery match the action
A temporary preview can disappear on release. A completed operation may need a genuine recovery path, but do not label a button Undo unless it really reverses the relevant change. For consequential operations, cancellation before commitment and recovery afterward are different design decisions.
Describe both in plain language during review. If a user can rearrange content, consider alternatives to dragging as a separate concern. A cancellation mechanism does not automatically make a movement gesture easy to perform.
5. Test the interrupted journey
Do not limit acceptance testing to successful clicks. Ask someone to begin the wrong action deliberately and abandon it. Observe the visible state and the resulting data. Repeat with a slow press and with the page scrolled. Record what actually happens rather than assuming every browser reproduces a prototype.
- Identify the exact commitment event.
- Press, move away and release without unintended completion.
- Check parent handlers and nearby controls.
- Confirm normal keyboard activation still works.
- Verify any promised undo against the resulting state.
