Skip to content
WCAG & standards

Swipe and Pinch: Pointer Gestures Under WCAG 2.5.1

Swipe galleries, pinch zoom and swipe to delete: how online stores offer one-finger operation under WCAG 2.5.1 and only trigger actions when the finger lifts.

18 min read WCAG 2.5.1TouchbedienungOnlineshop

In short and in plain language

Many shops use gestures. You swipe through pictures. You zoom with two fingers. You swipe a line away, and it is gone.

Not everyone can swipe like this. Some people shake. Some have only one finger free. Others use their head or their voice. With a screen reader, swiping often does not work at all.

So every gesture also needs a button. For pictures, these are arrows. For zoom, these are plus and minus. In the cart, it is a button to remove an item.

A button should only act when you lift your finger. Then you can still change your mind. You just slide your finger off the button.

We check the gestures in your shop. We add the buttons. Then more people can shop with you.

In an online store, the thumb does the work: it swipes through product images, spreads two fingers to zoom into a store map and pushes a cart row aside to delete it. For many people, exactly that is the barrier. Anyone using a head pointer, eye tracking, a mouth stick or voice control, anyone with a tremor or with only one usable finger gets stuck on swipes and two-finger gestures. Success criterion 2.5.1 Pointer Gestures therefore requires that every function using a multipoint or path-based gesture can also be operated with a single pointer without a path-based gesture, unless the gesture is essential (W3C, Understanding SC 2.5.1). Next to it sits 2.5.2 Pointer Cancellation: buy, remove and close buttons should only fire on release, so a mistaken press can still be called off. This article covers both in three places that see a lot of traffic before Black Week: the product gallery, zoom and the cart.

Key takeaways

  • Every swipe or two-finger gesture the store evaluates itself needs a way to operate it with a simple tap or click; the only exceptions are essential gestures such as a signature and gestures handled by the browser, operating system or screen reader (W3C, Understanding SC 2.5.1).
  • The product gallery keeps its previous and next arrows on smartphones as well, and a custom zoom gets plus and minus buttons; 73 percent of online shoppers use a smartphone to shop online (Bitkom 2025).
  • Swipe to delete in the cart is not enough on its own: every row needs removal by a simple tap, most reliably as a visible button. The W3C lists a swipe menu whose options cannot be reached by tapping as failure F105 (W3C, F105).
  • Buy, remove and close fire on release, not on pointerdown or touchstart; sliding the finger off the button cancels. Firing on touch-down without a way back is failure F101 under 2.5.2 (W3C, F101).
  • Testing is done by hand on a touch device, with a screen reader switched on and with a look at the code for touchstart and pointerdown handlers; 91.3 percent of surveyed screen reader users also use one on mobile (WebAIM 2024).
  • Both criteria are Level A, and EN 301 549 adopts them for web pages in clauses 9.2.5.1 and 9.2.5.2 (ETSI EN 301 549); for the presumption of accessibility, Section 4 BFSG refers to harmonized standards.

What 2.5.1 requires: one finger is enough

The criterion distinguishes two kinds of gestures. A gesture is path-based when the route of the pointer matters: a swipe that is only recognized if the finger travels in a mostly straight line from start to end, or tracing a specific shape. Multipoint gestures need two or more pointers at the same time, such as spreading and pinching with two fingers to zoom or a two-finger tap (W3C, Understanding SC 2.5.1). A single pointer, by contrast, targets only one point at a time: a mouse, a finger, a stylus. Accepted alternatives include a tap, click, double tap, long press or click and hold (W3C, Understanding SC 2.5.1). The gesture itself may stay; it just must not be the only way.

The limits of the criterion matter just as much. It applies to gestures the page evaluates itself, not to gestures of the operating system, browser or assistive technology. Swiping down from the top edge for notifications, the browser’s sideways swipe for back and forward, scrolling the page and natively scrollable areas, and the swipes a screen reader uses to move from element to element are not covered (W3C, Understanding SC 2.5.1). Browser zoom with two fingers is not a page gesture either. Essential gestures are also exempt: a signature is a path by nature, confirming an order is not. And keyboard operation alone does not satisfy 2.5.1, because some people work with a pointer only (W3C, Understanding SC 2.5.1) and have no keyboard at hand on many devices, such as a smartphone (W3C, F105).

Gesture in the storeType of gestureCovered bySingle pointer alternative
Custom swipe in the product gallerypath-based2.5.1Previous and next buttons, thumbnails
Two-finger spread on a product image or mapmultipoint2.5.1Plus and minus buttons, double tap as an extra
Swipe to delete in a cart rowpath-based2.5.1Remove button on every row
Dragging a map or sliderdragging movement2.5.7Direction buttons, tapping the track
Zooming and scrolling by the browserbrowser gesturenot 2.5.1do not block it, or enlarging becomes a barrier
Signature on screenpath-based, essentialexceptionconfirming itself by tap

Official statistics show only part of who is affected, because they count recognized severe disabilities. At the end of 2025, a little over 7.8 million people with severe disabilities lived in Germany; for 10 percent of them, arms and/or legs were functionally impaired, counted by the most severe disability (Destatis). Add people with a tremor, arthritis or an injured hand who are not recognized as severely disabled, and everyone holding a phone in one hand because the other is carrying something. The W3C explicitly names head pointers, eye-gaze systems and speech-controlled mouse emulators as input methods that cannot perform multipoint or path-based gestures, or not precisely enough (W3C, Understanding SC 2.5.1). How voice control works on the web is covered in our article on preparing websites for speech input.

A second group is hit especially hard on smartphones: people using screen readers. 91.3 percent of surveyed screen reader users also use one on a mobile device (WebAIM 2024). When the operating system’s screen reader is on, custom swipe gestures usually do not reach the page, because the assistive technology consumes the gesture itself: a horizontal swipe across the gallery then moves the screen reader focus to the next element instead of changing the image (W3C, G215). For this group a visible button is not the more convenient option but the only one. The same principles apply to native apps, as our article on accessible apps shows.

Why Black Week raises the stakes

In late November, a lot of shopping happens on smartphones. 73 percent of online shoppers use one to shop online (Bitkom 2025). Roughly one in two, 52 percent of surveyed internet users, planned to use the reduced prices around Black Friday and Cyber Week, most of them online (Bitkom 2025). And for 42 percent, usability of the store and the presentation of products are very important when choosing an online store (Bitkom 2025). The survey covered 1,120 internet users aged 16 and over in Germany, including 1,072 online shoppers (Bitkom 2025).

This is exactly when stores change a lot: promo banners, gift idea galleries, quick-buy buttons on product tiles. Every new component that evaluates a gesture is a potential 2.5.1 finding. A second point is only indirectly related to pointer gestures: 19 percent of mobile sites restrict zooming through user-scalable=no or a limited maximum-scale (Web Almanac 2025). That does not violate 2.5.1, but it takes away the most important tool of people who need to enlarge content and belongs to criterion 1.4.4 Resize Text. If you build your own zoom gestures, do not switch off browser zoom to make room for them. How countdowns and overlays stay operable during promotions is covered in our article on accessible Christmas promotions.

The gallery on the product page is a typical place for a custom swipe gesture. The W3C’s sufficient technique is simple: controls such as arrow buttons sit over or next to the swipe area and move the gallery with a single tap. The test checks exactly that, namely whether such controls exist (W3C, G215). If the gallery instead scrolls natively inside a scrollable area, the swipe is a browser gesture and is not covered by 2.5.1 (W3C, Understanding SC 2.5.1); arrows still help, because head pointers and voice control trigger horizontal scrolling only with effort. Carousels that advance on their own have additional rules, described in our article on sliders and carousels; this section is about the gallery that only moves on request.

The typical mistake sits in a single media query. Many galleries hide their arrows on touch devices because people can swipe there, for example with display: none inside @media (hover: none). That removes the alternative on exactly the device where the swipe is evaluated. The W3C does allow buttons that are visually hidden but operable with a pointer (W3C, Understanding SC 2.5.1). People who cannot see them will hardly find them, though. Visible arrows with a target area of at least 24 × 24 CSS pixels (W3C, WCAG 2.2) are the more reliable solution, with thumbnails below the main image as an addition. How to mark up those thumbnails as buttons is covered in our article on accessible product pages.

product-gallery.html
<section class="gallery" aria-label="Product images wool jacket">
  <div class="gallery-track">
    <img src="jacket-front.webp" alt="Front view">
    <img src="jacket-back.webp" alt="Back view" hidden>
    <img src="jacket-lining.webp" alt="Lining with chest pocket" hidden>
  </div>
  <!-- single pointer alternative to the swipe gesture (SC 2.5.1) -->
  <button type="button" class="gallery-prev" aria-label="Previous image">
    <svg aria-hidden="true" focusable="false" viewBox="0 0 16 16"><path d="M10 3 5 8l5 5"/></svg>
  </button>
  <button type="button" class="gallery-next" aria-label="Next image">
    <svg aria-hidden="true" focusable="false" viewBox="0 0 16 16"><path d="M6 3l5 5-5 5"/></svg>
  </button>
  <p class="gallery-status" aria-live="polite">Front view</p>
</section>

<style>
  /* the browser keeps vertical scrolling, the gallery handles horizontal swipes itself */
  .gallery-track { touch-action: pan-y; }
  /* arrows stay visible on touch devices, no display: none via (hover: none) */
  .gallery-prev, .gallery-next { min-inline-size: 44px; min-block-size: 44px; }
</style>

In the script, both paths lead into the same function. That way the swipe cannot do anything the arrows cannot, and the status line announces which view is shown after each change. The gallery reacts only when the finger lifts and drops the gesture when the browser takes it over via pointercancel, for example because the movement turns out to be vertical scrolling.

product-gallery.js
// One function, two paths: buttons and swipe call the same code
const gallery = document.querySelector('.gallery');
const track = gallery.querySelector('.gallery-track');
const images = track.querySelectorAll('img');
const status = gallery.querySelector('.gallery-status');
let current = 0;

function showImage(index) {
  current = (index + images.length) % images.length;
  images.forEach((img, i) => { img.hidden = i !== current; });
  status.textContent = images[current].alt;
}

// Single pointer alternative (SC 2.5.1): one tap is enough
gallery.querySelector('.gallery-prev').addEventListener('click', () => showImage(current - 1));
gallery.querySelector('.gallery-next').addEventListener('click', () => showImage(current + 1));

// Swipe as a shortcut, not as the only way
let startX = null;
track.addEventListener('pointerdown', (e) => { startX = e.clientX; });
track.addEventListener('pointerup', (e) => {
  if (startX === null) return;
  const dx = e.clientX - startX;
  startX = null;
  if (Math.abs(dx) > 40) showImage(current + (dx < 0 ? 1 : -1));
});
// If the browser takes over the movement, the gesture is dropped
track.addEventListener('pointercancel', () => { startX = null; });

Two-finger zoom: plus and minus alongside

Zooming with two fingers is a multipoint gesture. The W3C gives an example that also fits a store locator: a map view supports pinch and spread and also offers plus and minus buttons (W3C, Understanding SC 2.5.1). In its overview of WCAG 2.1, which introduced 2.5.1 as one of 17 additional success criteria, the W3C describes a person with cerebral palsy who cannot move their fingers that way and can only zoom the map thanks to the zoom buttons (W3C, What’s New in WCAG 2.1). Dragging the map view falls under the newer criterion 2.5.7; what direction buttons for that look like is shown in our article on maps and store locators.

In a store, the same gesture hides in the product zoom. The magnifier in full-screen view often only opens with two fingers, because the page evaluates the gesture itself and switches off browser zoom in that area with touch-action: none. That is acceptable as long as plus and minus sit next to it and the zoom can be reset with a tap. A double tap counts as an alternative, because it needs no path and only one finger (W3C, Understanding SC 2.5.1). It is invisible, though, and easily missed, so it makes a poor sole alternative. If you offer a slider for the zoom level instead of buttons, make the track tappable: a tap on the track sets the value, arrow buttons next to it change it step by step (W3C, G216).

image-zoom.js
const stage = document.querySelector('.zoom-stage');   /* CSS: touch-action: none */
const image = stage.querySelector('img');
const level = document.querySelector('.zoom-level');
let scale = 1;

function setZoom(value) {
  scale = Math.min(4, Math.max(1, value));
  image.style.transform = `scale(${scale})`;
  level.textContent = `Zoom ${Math.round(scale * 100)} %`;
}

// Single pointer alternative to the pinch gesture (SC 2.5.1)
document.querySelector('.zoom-in').addEventListener('click', () => setZoom(scale + 0.5));
document.querySelector('.zoom-out').addEventListener('click', () => setZoom(scale - 0.5));
document.querySelector('.zoom-reset').addEventListener('click', () => setZoom(1));

// Two-finger spread as an extra
const pointers = new Map();
let startDistance = 0;
let startScale = 1;
const distance = () => {
  const [a, b] = [...pointers.values()];
  return Math.hypot(a.clientX - b.clientX, a.clientY - b.clientY);
};
stage.addEventListener('pointerdown', (e) => {
  pointers.set(e.pointerId, e);
  if (pointers.size === 2) { startDistance = distance(); startScale = scale; }
});
stage.addEventListener('pointermove', (e) => {
  if (!pointers.has(e.pointerId)) return;
  pointers.set(e.pointerId, e);
  if (pointers.size === 2 && startDistance > 0) setZoom(startScale * distance() / startDistance);
});
['pointerup', 'pointercancel'].forEach((type) => stage.addEventListener(type, (e) => {
  pointers.delete(e.pointerId);
  startDistance = 0;
}));

The zoom level is shown as text next to the buttons, so it can be followed without looking at the image. Plus, minus and reset are real button elements and therefore reachable by keyboard as well. The spread gesture stays in place; people who know it lose nothing.

Swipe to delete in the cart

In mobile carts, swipe to delete is popular: the row slides aside and reveals a delete button. The W3C uses exactly this pattern as an example of failure F105: a swipe-to-reveal control shows different options when swiping left and right, and at least one of them cannot be reached when the row is opened with a simple tap (W3C, F105). The fix is a visible “Remove” button on every row, plus a quantity field with plus and minus. The swipe can stay as a shortcut.

Because removing an item has consequences, one more step pays off: after removal, a notice with a restore button stays visible until the next action, and the change is announced as a status message. That covers two things: anyone who hit the button by mistake brings the item back with one tap, and screen reader users learn that the cart has changed. How to mark up such messages is described in our article on error and status messages. If the notice disappears on its own after a few seconds, the way back turns into a time limit, which again hits exactly the people who operate more slowly.

cart-row.html
<li class="cart-row">
  <img src="wool-hat.webp" alt="">
  <div class="cart-item">
    <p class="cart-name">Wool hat, gray</p>
    <div class="cart-qty" role="group" aria-label="Quantity wool hat">
      <button type="button" aria-label="Decrease quantity">−</button>
      <input type="number" value="1" min="1" aria-label="Quantity">
      <button type="button" aria-label="Increase quantity">+</button>
    </div>
  </div>
  <!-- single pointer alternative to swipe to delete (SC 2.5.1) -->
  <button type="button" class="cart-remove">
    Remove<span class="visually-hidden">: wool hat</span>
  </button>
</li>

<!-- after removal: status message and a way back -->
<p class="cart-status" role="status">Wool hat removed from your cart.</p>
<button type="button" class="cart-undo">Restore wool hat</button>

2.5.2 Pointer Cancellation: fire on release

The second criterion in the group gets checked less often in stores, although it is also Level A. 2.5.2 Pointer Cancellation requires at least one of four approaches for everything operated with a single pointer (W3C, Understanding SC 2.5.2):

  1. No down-event: touching down with a finger or pressing the mouse button does not execute any part of the function.
  2. Abort or undo: the function completes on release, and there is a way to abort it beforehand or undo it afterwards.
  3. Up reversal: releasing reverses whatever touching down triggered, such as a preview that only shows while the finger rests on it.
  4. Essential: firing on touch-down is essential, as with an on-screen keyboard or a piano in the browser.

According to the W3C, the most accessible way is to trigger the action on release (W3C, Understanding SC 2.5.2). Anyone who hits the wrong button slides the finger off and only then lets go, and nothing happens. In its overview of WCAG 2.1, the W3C describes a person who hits the end call button instead of mute and loses the call; in another application, they simply slide the finger off the button (W3C, What’s New in WCAG 2.1). In a store the buttons have different names, but the pattern is the same: buy now, remove item, delete voucher, close dialog.

Native controls using the click event usually meet the criterion without extra work, because click fires on release and also works with touch and keyboard (W3C, G212). The failure appears when mousedown, touchstart or pointerdown is used for a faster response. The W3C describes failure F101 as a close button in a dialog with a long form that closes on touch-down and discards all input (W3C, F101). In a store, typical candidates are quick-buy buttons on product tiles, mini carts that close on touchstart and trash icons that react on first contact. What else to watch for with dialogs is covered in our article on modals and overlays.

pointer-cancellation.js
// Failure F101: fires as soon as the finger touches down
buyButton.addEventListener('pointerdown', addToCart);   // do not do this

// Better: click fires on release, for touch and keyboard alike
buyButton.addEventListener('click', addToCart);

// Custom gesture logic: only fire on release inside the target
tile.addEventListener('pointerdown', (e) => {
  tile.setPointerCapture(e.pointerId);
  tile.classList.add('is-pressed');
});
tile.addEventListener('pointerup', (e) => {
  tile.classList.remove('is-pressed');
  const r = tile.getBoundingClientRect();
  const inside = e.clientX >= r.left && e.clientX <= r.right &&
                 e.clientY >= r.top && e.clientY <= r.bottom;
  if (inside) openQuickView();   // released outside means canceled
});
tile.addEventListener('pointercancel', () => tile.classList.remove('is-pressed'));

Custom gesture logic needs pointercancel. The browser fires this event when it suppresses a pointer event stream, for example because it takes over the movement for scrolling or zooming (W3C, Pointer Events Level 3). Code that ignores it keeps a half-pressed state and may trigger something on the next contact. Which movements the browser may take over is controlled by the CSS property touch-action; with pan-y, vertical scrolling stays with the browser while the gallery evaluates horizontal swipes (W3C, Pointer Events Level 3). A custom tile without a button also needs a role, a name and keyboard operation; the simpler route is almost without exception a real button.

Boundaries: dragging, target size and keyboard

Three neighboring criteria are often confused with 2.5.1. Dragging without a fixed path, such as moving a map view or a slider thumb, is not covered by 2.5.1 but, since WCAG 2.2, by 2.5.7 Dragging Movements. A slider only also counts as a path-based gesture if it loses its grip as soon as the finger leaves the track, and the alternative to a path-based gesture must not rely on dragging alone (W3C, Understanding SC 2.5.1). The size of the replacement buttons is governed by 2.5.8. And keyboard operation under 2.1.1 is needed in addition, but does not replace operation with a single pointer (W3C, Understanding SC 2.5.1).

2.5.1 Pointer Gestures (A)

Swipe and multi-finger gestures of the page need operation with a single pointer and no path: tap, click, double tap or long press.

2.5.2 Pointer Cancellation (A)

Fire on release, cancel by sliding the finger off, undo after the action. Down-events only where they are essential.

2.5.7 Dragging Movements (AA)

Dragging needs an alternative without dragging, such as direction buttons; examples in our article on maps and store locators.

2.5.8 Target Size (AA)

Replacement buttons need a sufficient target area; the dimensions are in our article on older customers.

How to test gestures in a store

Automated testing tools rarely find gesture problems, because they do not know which function a gesture triggers. For content you did not build yourself, the W3C names two approaches: explore the page on a touchscreen and search the code for event handlers such as touchstart or touchend (W3C, F105). For 2.5.2, searching for mousedown, touchstart and pointerdown narrows down suspicious places but does not decide pass or fail (W3C, F101). The actual test is manual work on a device:

  • Go through the gallery, product zoom, map, cart and wish list on a smartphone and note every gesture that triggers something
  • For every gesture noted, check whether the same function can be reached with a single tap, also in landscape and with enlarged text
  • With a screen reader switched on, check whether arrows, zoom buttons and remove buttons can be reached and have clear names
  • On buy, remove and close, touch down, slide the finger off the button and then let go: nothing may happen
  • After removing an item from the cart, check whether a status message appears and whether the action can be reversed
  • Search the code for touchstart, pointerdown and included gesture libraries and map every hit to a function

This test belongs in every WCAG audit of a store and combines well with screen reader testing, because both take place on a real device. Stores rolling out new components before Black Week should apply the list to exactly those components before they go live.

What the BFSG has to do with it

The German Accessibility Strengthening Act requires that products and services can be found, accessed and used by people with disabilities in the usual way, without particular difficulty and in principle without outside help (Section 3(1) BFSG). A cart that can only be emptied by swiping is the opposite for a person using a head pointer: usable only with difficulty or with outside help. If an offering complies with harmonized standards whose references have been published in the Official Journal of the European Union, it is presumed to meet the requirements to the extent the standards cover them (Section 4 BFSG).

The technical reference for this is EN 301 549, with one caveat: its version V3.2.1 was prepared as a means of conforming to Directive 2016/2102 on the websites and apps of public sector bodies (ETSI EN 301 549), and a standard only carries the presumption under Section 4 BFSG once its reference has been published in the Official Journal. How the versions fit together is explained in our article on EN 301 549. V3.2.1 requires web pages, word for word, to satisfy WCAG success criterion 2.5.1 Pointer Gestures (ETSI EN 301 549, clause 9.2.5.1), and likewise 2.5.2 Pointer Cancellation (ETSI EN 301 549, clause 9.2.5.2). Both are Level A, the lowest level of any WCAG conformance. Which further requirements a store has to meet is summarized on our page on BFSG requirements; what that means for online stores in detail is on the page about the accessible shop.

How we rebuild gestures in a store

Gesture problems rarely sit in a single page; they sit in a few components: gallery, zoom, cart row, quick-buy tile. That is why we work on the component code rather than page by page. In accessible web development we proceed like this:

  1. Inventory: we record the components that evaluate swipe, two-finger or down events, each with its location in the code.
  2. Build the alternative: add arrows, zoom buttons, remove buttons and undo, and keep the gesture as a shortcut.
  3. Change the trigger: handlers on pointerdown and touchstart are rebuilt to use click or release inside the target with pointercancel.
  4. Test on devices: run through touch, keyboard and screen reader on smartphone and desktop.
  5. Make it stick: the rules go into the component library and the acceptance criteria, so new promotion pages inherit them.

If you have little time before the end of November, start with the cart and the buy buttons, because a mistaken tap there costs money; gallery and zoom follow. If your team wants to implement the patterns itself, our training teaches the criteria using examples from your own store.

Sources

This article is based on data from: W3C (Understanding Success Criterion 2.5.1 Pointer Gestures and 2.5.2 Pointer Cancellation; Web Content Accessibility Guidelines 2.2; techniques G212, G215 and G216; failure techniques F101 and F105; What’s New in WCAG 2.1; Pointer Events Level 3), ETSI (EN 301 549 V3.2.1, foreword and clauses 9.2.5.1 and 9.2.5.2), Bitkom (press release on Black Friday and online shopping, November 2025), Federal Statistical Office (Destatis, press release on people with severe disabilities, July 2026), WebAIM (Screen Reader User Survey, 2024 edition), HTTP Archive (Web Almanac 2025, Accessibility chapter) and the German Accessibility Strengthening Act (Sections 3 and 4 BFSG).

Related Articles

WCAG & standards

Focus Not Obscured: Fixing Sticky Bars for WCAG 2.4.11

Sticky headers, promo bars, chat and mini carts often hide keyboard focus. How to test WCAG 2.4.11 and fix failure F110 with scroll-padding following C43.

20 min read
WCAG & standards

Select Menus Without Surprises: WCAG 3.2.2 On Input

WCAG 3.2.2 in online stores: why sort, language and variant menus must not reload on the first arrow key, and how an Apply button and a keyboard test fix that.

21 min read
Practice & implementation

Accessible Promo Banners: Keep Text Out of the Image

Promo banners with discount text baked into the image fail WCAG 1.4.5. How shops build banners as HTML text, apply the exceptions and test before Black Week.

20 min read