Accessibility Certified – Home

2.5.2 Pointer Cancellation

Actions triggered with a single pointer should run on release, not on press, or users must be able to abort or undo them.

Level APrinciple 2: Operable

What does it mean?

If an action happens the moment a finger or mouse button goes down, an accidental touch triggers it straight away. When it runs on release instead (the "up-event"), users can move the pointer away before letting go and nothing happens. This is how native buttons work.

For functions operated with a single pointer, at least one of these must be true: the down-event does not trigger anything; the action completes on the up-event and can be aborted before or undone afterwards; the up-event reverses whatever the down-event did (as in press-and-hold to preview); or acting on the down-event is essential, such as a piano keyboard app.

Who does it help?

  • People with tremors or limited motor control who touch the wrong target
  • People with low vision who touch something before they realise it was the wrong place
  • People with cognitive disabilities who need a chance to change their mind

Common failures

  • A "Delete" or "Buy" control that acts on mousedown or touchstart
  • Navigation that follows a link as soon as the finger touches the screen
  • A custom control that triggers its action on pointerdown and cannot be cancelled

How we test it

  • people only Manual only: nothing useful can be measured. The reviewer tests it directly.

Test question: Actions trigger on release (up-event), not on press, or can be aborted.

A person decides every criterion. No criterion ever passes automatically.

How to fix it

Problem
deleteBtn.addEventListener('pointerdown', deleteItem);
Better
<button type="button" id="delete">Delete item</button>

<script type="module">
  document.getElementById('delete')
    .addEventListener('click', deleteItem); // fires on release
</script>

The click event fires only when the pointer is released over the button, so users can slide away to cancel.

Practical tips

  • Use the click event for activation; it also covers keyboard activation.
  • For destructive actions, an undo option is helpful in addition to up-event activation.

Official source

Understanding WCAG 2.2 at the W3C: 2.5.2 Pointer Cancellation

How does your website do on this criterion?

The free check tests your home page automatically; the audit decides all 55 criteria.

Free checkAll criteria