WCAG 2.1 – What is Pointer Cancellation?
When we think about accessibilty and websites, we might think of keyboard only users, or speech users who interact with a website using their voice. However, many users, including those without a disability, interact with a website using a mouse. The WCAG guidelines don’t just to help those with a disability, but they also help those without a disability by ensuring the highest standards, however you’re interacting with a website. The Pointer Cancellation criterion is an example of this ‘best practice for everyone’ approach.
It’s likely that you’ve noticed pointer cancellation in action, even if you weren’t aware of it. The WCAG guidelines on pointer cancellation don’t add anything new – something that web authors aren’t doing at the moment – but rather give clarification to an already existing standard practice.
We’re used to using a mouse to interact with a computer, and even the more recent additions of touchscreens and trackpads are not a world away from the idea behind the mouse. Using such a system may be second nature to many of us, but if the standard were to change suddenly, we would find it frustrating having to learn a new way of interacting with a computer, or worse, a new way just for one website.
2.5.2 – Pointer Cancellation (Level A)
In order to overcome the potential problem of a web author changing standard interaction methods on a computer, the World Wide Web Consortium have created success criterion 2.5.2 – Pointer Cancellation in order to standardise already common practices. The Success Criterion states:
- 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;
- Completing the function on the down-event is essential.
Functions that emulate a keyboard or numeric keypad key press are considered essential.
This requirement applies to web content that interprets pointer actions (i.e. this does not apply to actions that are required to operate the user agent or assistive technology).
When reading the success criterion we may think that some of what it says is obvious or very natural. This may be true to those who have used computers for many years, but there are still occasions when a website doesn’t perform in an expected way. Further to this, everyday new people are learning to interact with a computer, and making sure that the practice remains consistent for everyone is important.
Up and down events
On a mouse click, or indeed any active interaction including the tap of a screen or touchpad, there are two events: a down event, where a click is pressed, and an up event, where a click is released.
You may have noticed that, on most websites, if you hold down a click on a button, nothing happens. It is only when you release the click that the button is activated. This is the standard method and websites should conform to this standard, unless there is a specific reason not to do so.
An example where a down event activates an event is on a keyboard. When you press a key it immediately activates that button, and if you keep holding down a letter it repeats the action, putting several letters next to each other until the key is released. This is useful for typing, but it is not appropriate for mouse type interactions.
Abort or Undo
Sometimes an interaction may occur by mistake or a user may change their mind. There should a provision made that a user can cancel an interaction.
As a mouse will only activate on an up event, this means that while a button remains pressed, a user can move the mouse or slide their finger away from a button or link, and when they release the interaction will not occur. If the interaction still occurs, this would count as a failure.
The Pointer Cancellation criterion does state that there may be times when a down event is essential. Examples of this include keyboards, which by standard are activated on a down event. It may also be that a down event is essential on a mouse, for example during a game or test where a time based result needs to be triggered with an immediate response.
The use of mice and touch-based interactions have revolutionised the way we interact with digital devices. Although the interaction may have very standard practices, the WCAG guidelines have introduced the Pointer Cancellation criterion to encourage all web developers to keep to the same standards.
A mouse interaction should only occur on the up event and can be cancelled by releasing the click away from the interactive area, unless it is essential that an up event must occur.
Pointer Cancellation and your website
We mentioned earlier that the WCAG guidelines benefit everyone, whether or not someone has a disability, by ensuing the best methods are practised across the board. It’s important to everyone who visits your website that it conforms to the highest standards possible.
Dig Inclusion can help you and your web team to ensure these best practices, including through testing against the Pointer Cancellation criterion. Feel free to contact the Dig Inclusion team for more information.