Skip to content

A11y 101: 2.5.2 Pointer Cancellation

Last week I wrote about gestures and pointers. This week we look at the next criteria, Pointer Cancellation. I mentioned that we wanted events to fire on the “Up” or “release” action. And that’s what this criteria is all about. We need to make sure that if a user creates a down event on a control, we need to allow them to cancel. Let’s look at the methods used.

Basic Rule

Fire events when the pointer is released and not when it is first pressed. Of course, there are always exceptions, and we’ll look at those. Before we do that, I want to take you through the exact things we are talking about.

Using a pointer to activate a control, we typically think when we click on it something should happen. With this success criterion, we don’t want that happening. We want to allow the user to click on it, hold and drag the pointer off of the control, and release without firing the control. This is the cancellation. If the user were to click and not move the pointer, then release we would fire off the control. If we click a control and move the pointer over another control and release, we fire the new control we were over on release. The W3C has four bullets pertaining to this:

No Down-Event: The down-event of the pointer is not used to execute any part of the function;

Abort or Undo: Completion of the function is on the up-event, and a mechanism is available to abort the function before completion or to undo the function after completion;

Up Reversal: The up-event reverses any outcome of the preceding down-event;

Essential: Completing the function on the down-event is essential.

You can read the full understanding article on the W3C’s site.

Essential

According to the W3C’s own documentation, the best example of Essential for completing on the down event is an onscreen/software keyboard. If the release of the pointer typed the letter instead of the down event, that would be incongruous with how physical keyboards work and lead to more mistakes and frustration in the end user.

Summary

Do not fire events on the down event of pointers, only on release. Exceptions include when emulating physical devices digitally and games where precise timing is needed.

Have questions or thoughts on this? Hit me up on LinkedIn or BlueSky!

Published ina11ya11y 101accessibilityblindcognitiondevelopmentEAAEN 301 549physical impairmentTestingW3CWCAGWeb Content Accessibility Guidelines

Comments are closed.