Why it matters
Users with motor impairments often accidentally touch or click the wrong target. Pointer cancellation gives users the chance to correct mistakes by moving away before releasing.
Common violations
- Buttons that trigger actions on mousedown/touchstart instead of click
- Drag operations with no undo mechanism
- Links that navigate on pointer down rather than pointer up
- Destructive actions with no confirmation or reversal
Code examples
Bad
<button onmousedown="deleteAccount()">Delete Account</button>Good
<button onclick="deleteAccount()">Delete Account</button>
<!-- onclick fires on pointer up, allowing user to move away to cancel -->How to fix
Use click events (which fire on pointer up) instead of mousedown or touchstart for actions. For complex interactions, provide an undo mechanism or confirmation step.
Related criteria
Related resources
Scan your site