- Success Criterion 2.5.2
- Conformance level A
Destructive Action Firing on Press With No Way to Abort
2.5.2 — Pointer Cancellation
Scenario
Setting
A hotel booking site's room-selection page
What’s wrong
Down-event deletes/sends with no ability to abort or reverse.
Example
removeBtn.addEventListener('mousedown', () => removeRoomFromCart(roomId));
// no undo, and no way to abort once the finger has landed Why it matters
A traveler who brushes the remove icon while scrolling the room list loses their selected room with no chance to stop it.
How to test
Press down on a delete/send action and try to slide off before releasing: if it fires on down with no abort/undo, it fails.
How to fix
Fire on click instead of mousedown, and add a short undo window as a second safety net.
removeBtn.addEventListener('click', () => {
removeRoomFromCart(roomId);
showUndoToast('Room removed', () => reAddRoom(roomId));
}); Outcome
A traveler who accidentally removes a room gets an undo toast and restores it in one tap.
Who is affected
People with low dexterity and anyone using a trackpad prone to accidental clicks mid-scroll.
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
- Press-to-Trigger Control Where Release Confirmation Was Possible
- Custom Gesture That Commits Mid-Motion Instead of on Release