2.5.2: Pointer Cancellation – (Level A)
High-Level Description
Actions triggered by pointer input must be cancellable or reversible. This helps users to avoid any unintentional or accidental activation of elements and allows cancellation or reversal of inputs.
Detailed Description
What this means:
- Allows users to cancel actions by only partially triggering the event.
- Avoid triggering important or irreversible actions when tapping or clicking an interactable component e.g. mousedown or touchstart events.
- Ensure that dragging or sliding interactions are not final until the user releases the pointer, allowing cancellation by lifting the pointer outside the target.
Applies to:
- Interactable elements such as buttons and toggles.
- Any interface where accidental activation could cause loss of data, or navigation or transaction commitment.
- Dragging movements, sliders, and scrubbers.
Indicators of Non-Compliance:
- A button or toggle activates before the user has released it.
- A slider continues to move even after the user has moved the pointer away from the component.
- A dragging action is finalised even if the user releases the pointer outside the drop zone.
Real World Examples
| Scenario | Non-Compliant | Compliant |
|---|---|---|
| A button activation | Tapping down on the button completes the action before the user has lifted the pointer | The button only completes the action after the user has released it without sliding off |
| Drag and drop file upload | Releasing the file outside of the file drop area still completes the action | The drag and drop is cancelled after the user has released the item outside the drop zone |
| Transaction submission | The user accidentally submits a payment by clicking on the "submit payment" button and is unable to cancel the action | The user has clicked down on the button but has not lifted and are reconsidering their action. The user is able to slide the pointer away and the action cancels |
Disability Impact
| Disability Group | Without pointer cancellation | With pointer cancellation |
|---|---|---|
| Motor Disabilities | Users may accidentally interact with components with no mechanism to dismiss | Users can cancel unintended actions |
| Cognitive Disabilities | Accidental activation can confuse the users | Users have time to consider actions and cancel if needed |
Supporting Documentation
Remediation Strategies
1 - Use onclick or onmouseup instead of onmousedown
Ensure interactable elements do not active prematurely and wait until the full interaction has been completed.
2 - Implement confirmation dialogs or undo
Inform users visually and audibly through assistive technologies to confirm interaction has been completed.
3 - Allow gesture cancellation, such as drag release outside target
Where gestures are commonly used, ensure users are able to cancel interactions by dragging and releasing their pointer from the component.