Rule

Pointer gesture alternative

Swipe, pan and pinch gestures need a single-pointer alternative.

Rule
pointer-gesture-alternative
WCAG 2.2
2.5.1 Pointer Gestures (opens in a new tab) (Level A)
Severity
Serious

What it checks

A page that builds its own swipe, pan or pinch tells the browser to step aside with the CSS touch-action property. The rule reads its computed value on every rendered element at least 100 by 60 pixels. A value of none, or one that leaves only one axis to the browser, such as pan-y on a carousel, marks a gesture surface. Only the outermost surface in a subtree is reported.

The values auto, manipulation and pan-x pan-y leave gestures to the browser and pass. Range inputs and sliders are skipped, as the criterion does not treat them as path-based, and draggable elements belong to the dragging check.

When a person decides

A gesture surface is sent for review, never failed. The gesture itself lives in script, and whether the same actions work with a single tap or click, such as previous and next buttons, cannot be read from the markup. Gestures that are essential are excused.

Example

Sent to review

<div class="carousel" style="touch-action: pan-y; width: 600px; height: 300px; overflow: hidden">
  <img src="harbour.jpg" alt="The harbour at dawn" width="600" height="300">
</div>

Passes

<div class="carousel" style="width: 600px; height: 300px; overflow: hidden">
  <img src="harbour.jpg" alt="The harbour at dawn" width="600" height="300">
</div>
<button type="button">Previous photo</button>
<button type="button">Next photo</button>

The engine is tested against both examples.

How to fix it

Give every gesture a single-pointer twin: previous and next buttons for a carousel, zoom in and zoom out buttons for a map, a control to choose a value.

Check your own pages

This rule runs in every pour audit: the browser extension, the bookmarklet, the command line and the editor. Get pour, free.