• 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