Accessible Web Touch Gestures
Implement swipe or drag on web interfaces while preserving page scroll, zoom, tap alternatives and keyboard access. Use for mobile and mixed-input interaction review.
Start by describing the operation without gestures: move a card, change a slide, or adjust a value. Implement the operation once and expose it through appropriate keyboard and simple single-pointer controls. For a drag reorder, a user can select a card and then choose a destination or press a move button. For a swipe gallery, keep previous and next buttons. A keyboard-only alternative does not satisfy a requirement for a non-drag pointer alternative. ## Key Points - [W3C Pointer Events](https://www.w3.org/TR/pointerevents3/) - [W3C dragging movements guidance](https://www.w3.org/WAI/WCAG22/Understanding/dragging-movements) - [W3C input modalities](https://www.w3.org/WAI/WCAG22/Understanding/input-modalities)
skilldb get ux-design-patterns-skills/touch-gesturesFull skill: 29 linesAccessible Web Touch Gestures
Start by describing the operation without gestures: move a card, change a slide, or adjust a value. Implement the operation once and expose it through appropriate keyboard and simple single-pointer controls. For a drag reorder, a user can select a card and then choose a destination or press a move button. For a swipe gallery, keep previous and next buttons. A keyboard-only alternative does not satisfy a requirement for a non-drag pointer alternative.
Let the browser handle normal input
Use Pointer Events for interactions that need pointer identity and unified mouse, touch or pen handling. Choose touch-action narrowly, before the gesture starts, based on which axis or interaction the component actually owns. Keep page scrolling and browser zoom available wherever compatible. Do not disable touch behavior across the whole page. Let ambiguous movement remain a page gesture until the component's own activation rule is met.
Use a movement threshold or explicit handle to separate taps from drags. Use pointer capture when the control must track the same pointer outside its bounds, and handle pointercancel, lost capture, extra pointers and component teardown. Preview changes during movement and commit only through an explicit end condition. Cancel restores the previous state. Prevent the following click only for a completed gesture whose click would cause an unintended duplicate action.
Verify mixed input and recovery
On a real touch target, test slow vertical scrolling across the component, a diagonal gesture, tapping a visible control, pinch zoom and interruption by browser behavior. Verify a mouse release outside the target, keyboard operation and use of the non-drag pointer alternative. Use the same data fixture to compare results across inputs. Check large text and reduced-motion preferences without removing control feedback.
Record browser, OS, device and input types. If the only test was browser emulation, identify the physical behavior it could not establish, including OS gesture competition and tactile timing.
References and rights
Original SkillDB instructions under LicenseRef-SkillDB-Content. References were checked 2026-11-13 and used for technical verification.
Install this skill directly: skilldb add ux-design-patterns-skills
Related Skills
Video Editor Timeline Interface
Build a timeline for video editing with track and clip geometry, playhead scrubbing, trim and snap behavior, undo and accessible alternate controls.
Accessible Calendar Date Picker
Design and test a date input and calendar dialog with keyboard navigation, local date validation, availability rules and predictable focus restoration.
dashboard-layout
Dashboard layout patterns with sidebar nav, header, content area, and responsive breakpoints
data-tables
Data table UX patterns for sorting, filtering, pagination, bulk actions, and empty states
Debounced UI Search and Filters
Implement search/filter navigation with debounced input, safe request cancellation, truthful loading, empty and error states, and browser history checks.
form-patterns
Form design patterns for validation, multi-step forms, inline editing, and error handling