• 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