w3c / wcag

Web Content Accessibility Guidelines
https://w3c.github.io/wcag/guidelines/22/
Other
1.09k stars 244 forks source link

2.5.2 Pointer Cancellation: Testing approach for content with wide accessibility baseline #4035

Closed detlevhfischer closed 1 week ago

detlevhfischer commented 3 weeks ago

This is a question for someone steeped in the technical details of pointer events. The Technique G212 describes the way to test whether functions are triggered by a down event (mousedown, touchstart):

Activate the down event then move the pointer outside the target before triggering the up-event.

What the technique doesn't specify is whether this happens in a mousing or touch environment. Does this mean that for content with a wide accessibilty baseline that claims to meet 2.5.2, this test would always need to be carried out using both touch input and mouse input?

Or does one effectively include the other, so that when, say, nothing happened on the touchstart event, nothing will happen on a mousedown event? Finally, if both tests are indeed necessary when covering desktop and mobile OSs, does it matter whether the mouse is attached to a device running Android / iOS or to a desktop OS running Windows or MacOS?

patrickhlauke commented 3 weeks ago

Does this mean that for content with a wide accessibilty baseline that claims to meet 2.5.2, this test would always need to be carried out using both touch input and mouse input?

Yes

Or does one effectively include the other, so that when, say, nothing happened on the touchstart event, nothing will happen on a mousedown event?

mousedown and touchstart are separate (though touch events will also trigger compatibility mouse events but only as a result of a full down/up activation gesture / "tap"), so you'll need to test both.

also should really test pointerdown - the new combined event model for mouse/touch/stylus/etc. (edit: assuming you're testing not just manually, but doing some code check looking for code smells that something may be listening for those events)

Finally, if both tests are indeed necessary when covering desktop and mobile OSs, does it matter whether the mouse is attached to a device running Android / iOS or to a desktop OS running Windows or MacOS?

need to test all pointer devices available on all devices/environments. so also considering potential touch on a "desktop/laptop" device (think Surface for instance) and mouse on a nominally "mobile/touchscreen" device.

detlevhfischer commented 3 weeks ago

Thanks @patrickhlauke for the quick answer (even if the effort appears prohibitive).

also should really test pointerdown

What would that mean in practical terms?

patrickhlauke commented 3 weeks ago

from a manual testing point of view, nothing. this is all behind-the-scenes plumbing. that was more in case you're running some code analysis or other automated thing that looks for event listeners. in that case, you want to look not just for things that happen on mousedown or touchstart, but also on pointerdown