Drag, swipe and slider controls: price filters, before-and-after photos and galleries everyone can use
How to make price range filters, before-and-after photo sliders, swipe galleries, drag-and-drop uploads and slide-to-confirm buttons on a small business website work without dragging: WCAG 2.5.7 explained, copyable min/max filter and before-and-after slider code, platform notes and a 5-minute check.
A lot of small business sites ask visitors to drag or swipe: a price range filter with two handles, a before-and-after photo slider, a swipe-only photo gallery, a "drag files here" upload box, a "slide to confirm" button or a map you have to pinch. Shoppers comparing prices across stores this holiday season lean on filters more than ever. But people with tremors, limited hand strength or a head pointer, people using voice control, keyboard users and anyone holding a phone one-handed on a bus can find dragging slow or impossible. WCAG 2.2 added a rule for this: anything you can do by dragging must also be doable with a single tap or click, unless dragging is truly essential (2.5.7 Dragging Movements). Here's how to fix the common cases.
1. Price range filters: add "min" and "max" boxes
A two-handle price slider is hard to set precisely even with a steady hand. The simplest fix is two number fields with labels and an Apply button. You can keep the slider for people who like it, as long as the boxes are there too. The fields also work with a keyboard (2.1.1 Keyboard) and have visible labels (3.3.2 Labels or Instructions).
<form class="price-filter" action="/collections/all" method="get">
<fieldset>
<legend>Price</legend>
<label for="price-min">Min ($)</label>
<input id="price-min" name="min_price" type="number" inputmode="numeric" min="0" step="1" placeholder="0">
<label for="price-max">Max ($)</label>
<input id="price-max" name="max_price" type="number" inputmode="numeric" min="0" step="1" placeholder="250">
<button type="submit">Apply price filter</button>
</fieldset>
</form>
<!-- example URL, field names and amounts; use the ones your store's filter expects -->
The URL, field names and amounts above are example details. Your platform's filter may use different ones.
2. Before-and-after sliders: let people click, tap or use arrow keys
Contractors, cleaners, salons, med spas, dentists and photographers love the "drag the line" before-and-after slider. Most of these only move when you drag the handle. A native range input fixes most of it, because people can click or tap anywhere on the track and use the arrow keys, and a few buttons make it even easier. Both photos still need real alt text.
<figure class="ba">
<div class="ba-frame">
<img src="after.jpg" alt="After: freshly painted white kitchen cabinets with brass handles">
<img src="before.jpg" alt="Before: worn oak kitchen cabinets with chipped paint" class="ba-before" id="ba-before">
</div>
<label for="ba-range">How much of the before photo to show</label>
<input id="ba-range" type="range" min="0" max="100" value="50">
<div class="ba-buttons">
<button type="button" data-show="100">Show before</button>
<button type="button" data-show="50">Show both</button>
<button type="button" data-show="0">Show after</button>
</div>
<figcaption>Kitchen cabinet repaint, before and after</figcaption>
</figure>
<style>
.ba-frame { position: relative; max-width: 40rem; }
.ba-frame img { display: block; width: 100%; height: auto; }
.ba-before { position: absolute; inset: 0; clip-path: inset(0 50% 0 0); }
.ba input[type=range] { width: 100%; max-width: 40rem; min-height: 24px; }
.ba-buttons button { min-height: 24px; margin: .25rem .25rem 0 0; }
</style>
<script>
var range = document.getElementById('ba-range');
var before = document.getElementById('ba-before');
function show(pct) { range.value = pct; before.style.clipPath = 'inset(0 ' + (100 - pct) + '% 0 0)'; }
range.addEventListener('input', function () { show(range.value); });
document.querySelectorAll('.ba-buttons button').forEach(function (b) {
b.addEventListener('click', function () { show(b.dataset.show); });
});
</script>
<!-- example photos, alt text and caption; use your real ones -->
The photos, alt text and caption above are example details. Write alt text that says what changed. If your slider app can't do this, showing the two photos side by side with captions works for everyone and is often clearer on a phone.
3. Swipe-only galleries and carousels: add buttons
Product photo galleries, review carousels and "swipe for more" sections often only respond to a swipe or a flick. Add visible previous and next buttons (or numbered dots that are real buttons) so one tap moves the gallery (2.5.1 Pointer Gestures). Make the buttons at least 24 by 24 CSS pixels (2.5.8 Target Size (Minimum)). See accessible image sliders and carousels.
4. Drag-and-drop uploads and reordering
- Uploads: a "drag your photos here" box is fine as long as there is also a real "Choose files" button, which is a native
<input type="file">with a label. Quote forms, job applications and photo-estimate forms are where this usually breaks. - Reordering: if customers or staff rank or sort items by dragging (gift list, menu order, playlist), add "Move up" and "Move down" buttons, or a position number they can type.
- Booking calendars: if people pick a time by dragging across a calendar, make sure each slot is also a button they can tap. See online booking widgets.
5. Maps, "slide to confirm" and shake gestures
- Maps: embedded maps need panning and pinching, so keep the map's own + and – zoom buttons visible, and always put your address and directions in text next to it. See accessible Google Maps embeds.
- "Slide to confirm" or "slide to verify": replace it with a normal button. If you must keep it, add a button that does the same thing. Use real buttons so the action happens when the finger or mouse is released, and people can slide off to cancel a mistaken press (2.5.2 Pointer Cancellation).
- Shake or tilt: "shake to undo" or "tilt to spin the wheel" needs an on-screen button as well, and a way to turn the motion off so a shaky hand doesn't trigger it (2.5.4 Motion Actuation).
Platform notes
- Shopify: many themes' price filters show a slider and min/max boxes together. Check that the boxes are switched on and labelled in your theme's filter settings. Before-and-after and gallery sliders usually come from apps, so test them with a tap and the arrow keys before relying on them. See Shopify fixes.
- WordPress and WooCommerce: price filter blocks and widgets vary. Prefer ones with number fields, and test before-and-after and upload plugins with only a keyboard and a single tap. See WordPress fixes.
- Squarespace, Wix and GoDaddy: built-in galleries may support swipe on phones and arrows on desktop. Turn on visible arrows where the setting exists, and use a code block or embed for a before-and-after slider only if it passes the check below. See Squarespace, Wix and GoDaddy.
- Webflow and AI-built sites: custom sliders and drag interactions are common. Ask for (or prompt for) buttons and keyboard support, and use native range and file inputs rather than custom divs. See Webflow fixes and AI-built sites.
Settings and app names change often, so check your platform's or app's own help pages for the current option.
Common mistakes
- A two-handle price slider with no min/max boxes.
- A before-and-after slider that only moves when you drag the handle, with no alt text on either photo.
- A photo gallery or reviews carousel that only moves with a swipe.
- A "drag files here" box with no "Choose files" button.
- "Slide to confirm" or "slide to unlock" instead of a button.
- Tiny gallery dots or arrows that are hard to tap.
- Custom sliders built from
<div>s that Tab skips. - An overlay widget instead of real fixes. See overlays vs real fixes.
A 5-minute check you can do today
- List every place on your site where you drag, swipe, pinch, shake or slide: filters, galleries, before-and-after, uploads, maps, sign-ups.
- For each one, try to do the same thing with only single taps or clicks, without dragging. Could you?
- Now try with only the keyboard (Tab, Shift+Tab, Enter, Space and the arrow keys). See our keyboard test.
- On your phone, are the arrows, dots and handles big enough to tap without hitting the wrong one?
- Press a button, then slide your finger off before lifting it. The action should not happen.
What a scan can and can't check here
Our scan is automated, so it finds only part of the barriers on the pages it visits. It can flag sliders and buttons with no accessible name, unlabelled number and file inputs, small targets in some cases and low contrast. It can't tell whether a gallery only moves with a swipe, whether a before-and-after slider works without dragging, or whether a filter can be set with a tap, which is why the 5-minute check above matters. Our Fix-Pack reports include copy-paste fixes for your platform for what the scan finds.
Related: image sliders and carousels, mobile zoom and tap targets, online store checkout, tooltips and hover pop-ups, WCAG 2.2 explained.
This is general technical guidance, not legal advice, and it doesn't certify compliance with the ADA or any law, or protect against claims.
Want the fixes written for you?
Start with a free homepage snapshot. The $149 Fix-Pack scans up to 10 pages and gives copy-paste fixes for your platform within 48 hours, with a 14-day refund promise. See a sample report first.
This is general technical guidance, not legal advice, and it does not certify compliance with the ADA or any law.
Have a cost calculator or instant quote tool? See cost calculator and instant quote accessibility.
Related guides
- Site search that everyone can use: search boxes, suggestions and results pages
- Product grids that everyone can shop: cards, Load more, quick view and add to cart
- Product pages shoppers can trust: size charts, options, quantity and photo zoom
- Shipping, returns and order tracking pages everyone can use
This guide is general technical information, not legal advice. Following it does not certify ADA or any legal compliance. Automated checks find only part of accessibility barriers.
Check your own site, then decide
- Free homepage snapshot. Your top 3 issues in about a minute. No signup, no card.
- $149 Fix-Pack, if you want the full list. Up to 10 pages scanned, issues ranked by impact, copy-paste fixes for your platform, delivered within 48 hours, plus one re-scan after you apply them.
Get my free snapshot Order the Fix-Pack – $149
14-day refund promise. See a sample report first. A technical report, not legal advice; automated checks find only part of accessibility barriers.