- Success Criterion 2.5.2
- Conformance level A
Button Firing on Touchstart Instead of Release
2.5.2 — Pointer Cancellation
Scenario
Setting
A pharmacy app's prescription-refill form
What’s wrong
Buttons firing on touchstart for "responsiveness", no abort possible by sliding off.
Example
refillBtn.addEventListener('touchstart', () => {
submitRefillRequest(); // fires the instant a finger touches down, for "responsiveness"
}); Why it matters
A patient who taps the wrong medication's refill button by mistake has already sent the request before realizing it.
How to test
Press down (touchstart) on a button and slide off before lifting: if the action already fired on touchstart, it fails.
How to fix
Firing on touchend, and checking the finger is still over the button, restores the ability to slide away and cancel.
refillBtn.addEventListener('touchend', (e) => {
if (isStillOverButton(e)) submitRefillRequest();
}); Outcome
A patient who starts pressing the wrong drug can drag off the button and stop the refill before it sends.
Who is affected
Users with low vision who misjudge target position, and anyone with a hand tremor near the touchscreen.
Learn more
- Understanding Understanding document (opens in a new tab)
Related scenarios
- Action That Fires the Instant the Pointer Goes Down
- 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
- Custom Gesture That Commits Mid-Motion Instead of on Release