- Success Criterion 2.5.2
- Conformance level A
Custom Gesture That Commits Mid-Motion Instead of on Release
2.5.2 — Pointer Cancellation
Scenario
Setting
A weather app's forecast screen
What’s wrong
Custom gesture recognizers that commit at threshold mid-gesture rather than on release.
Example
card.addEventListener('touchmove', (e) => {
if (getSwipeDistance(e) > 60) {
pinCardToTop(card); // commits mid-drag, well before touchend
}
}); Why it matters
A user who starts the swipe but changes their mind can't slide back down, the card is already pinned before the motion finishes.
How to test
Perform a custom gesture and release partway through, after the threshold: if the system commits mid-gesture rather than waiting for release, it fails.
How to fix
Wait for the release event to check the final gesture, so the user keeps the whole motion available to abort.
card.addEventListener('touchend', (e) => {
if (getSwipeDistance(e) > 60) pinCardToTop(card);
}); Outcome
A user can drag the card partway up, then pull it back down, and nothing gets pinned.
Who is affected
People with tremor and limited fine motor control who overshoot a gesture threshold unintentionally.
Learn more
- Understanding Understanding document (opens in a new tab)
Related scenarios
- Action That Fires the Instant the Pointer Goes Down
- Button Firing on Touchstart Instead of Release
- Drag Interaction That Commits With No Way to Cancel
- Menu That Opens and Selects on the Same Press-and-Drag
- Destructive Action Firing on Press With No Way to Abort
- Press-to-Trigger Control Where Release Confirmation Was Possible