Check 40.05 · AI agent compatibility

Avoid mandatory complex gestures

Offer a click or typing alternative to every mandatory drag and drop, swipe or hover, so that AI agents and visitors alike can complete your journeys.

Priority
Experimental
Difficulty
Intermediate
Estimated time
2 h to 3 days
Free, no account: your progress is saved in this browser.

Ask an AI to check this point on your site

Opens the assistant with a ready-made question: this check, its goal and your site URL.

For Gemini, Copilot or another assistant, copy the question. The link opens the chosen service directly: nothing goes through this site.

In short

A complex gesture is an interaction that requires more than a click or typing: drag and drop, a slider to drag, swiping a carousel, a long press, a pinch, drawing a path, a sustained hover, scrolling to the bottom to load more. When this gesture is the only way to act, an AI agent often gets stuck, as do some visitors. Once this check is done, every function in your key journeys can be performed with a simple click, a keyboard key or typing in a field; the gesture remains possible, but it is no longer mandatory. This topic is experimental: agent capabilities evolve quickly.

Why it matters

Browsing agents act through elementary actions: clicking an element, typing text, pressing a key, scrolling. Richer gestures exist in their tools, but remain fragile:

  • the documentation of Anthropic's computer use tool states that some elements, such as drop-down lists and scrollbars, can be tricky to manipulate with the mouse, and suggests using keyboard shortcuts instead; dragging is limited to a simple movement from one point to another;
  • an agent that reads the accessibility tree, such as Playwright MCP, can drag one element onto another, but only if the drop target can be identified; a price slider cannot be set through a field to fill in;
  • an agent that reads the page text does not see what a hover or infinite scrolling would reveal.

The same gestures exclude humans: people with reduced mobility, users of keyboards, voice control or switch devices, poorly calibrated touch screens. WCAG (Web Content Accessibility Guidelines) success criteria cover this: 2.5.1 “Pointer Gestures” (level A) requires a single-pointer alternative without a path-based gesture for multipoint or path-based gestures; 2.5.7 “Dragging Movements” (level AA, WCAG 2.2) requires any function that uses dragging to be operable without dragging; 2.1.1 “Keyboard” requires everything to be usable with the keyboard.

What it improves

  • Agent success on filters, configurators, time slot selection and forms. A plausible effect, not publicly measured.
  • Accessibility Compliance with criteria 2.5.1, 2.5.7 and 2.1.1, and with the equivalent criteria of the French RGAA (Référentiel général d'amélioration de l'accessibilité).
  • Mobile conversion Sliders and carousels are often imprecise with a finger; a field or a button reduces errors.
  • Crawling Pagination links instead of infinite scrolling alone make the next products discoverable by crawlers.
  • Rankings No direct effect.

How to check

Gesture inventory. Go through each key page and note every interaction that is not a click, typing or a key press:

Component Mandatory gesture Alternative present? Fix
Price filter dragging two handles no two fields, “Minimum price” and “Maximum price”
Product page carousel swiping no “Previous / Next image” buttons and thumbnails
Sofa configurator dragging the modules no list of modules with “Add” and “Move up / Move down” buttons
Uploading a supporting document dragging a file yes, a “Choose file” button none
Mega menu hover no a button that opens the submenu on click
Catalog infinite scrolling no “Show more” button and pagination links
Quote signature drawing with a finger no checkbox and typed name, depending on the legal value you need

Keyboard-only test. Unplug the mouse: every function must be reachable with Tab, Enter, Space and the arrow keys. See test keyboard navigation (opens in a new tab).

Typing test. In the page's ARIA snapshot (see use semantic HTML and explicit labels (opens in a new tab)), every setting must appear as a field (textbox, spinbutton, combobox) or a named button, not only as a slider without an alternative or a generic area.

Agent test. Ask a browsing agent to “Filter shoes between €80 and €120” or “Book the 19:30 slot” and observe whether it succeeds without help. See test user journeys with browsing agents (opens in a new tab).

How to implement

Before you start

Principle: keep the gesture if you want to, but always add a click or typing alternative, in native HTML.

Gesture Recommended alternative
Range slider (price, area, dates) two labeled <input type="number"> fields, synchronized with the slider
Single slider a native <input type="range"> (adjustable with the arrow keys), plus the value in a field or “− / +” buttons
Drag and drop to reorder “Move up” and “Move down” buttons, or a “Position” field
Dragging onto an area (cart, folder) an “Add to cart” button, a “Move to…” menu
File drop a visible, labeled <input type="file"> in the drop zone
Carousel swipe previous and next buttons, clickable thumbnails, no auto-rotation without a pause button
Hover to reveal opening on click or on focus. See avoid information available only on hover (opens in a new tab)
Long press, double click a visible button or context menu
Infinite scrolling a “Show more” button and real pagination links. See control pagination and infinite scroll (opens in a new tab)
Pinch to zoom “Zoom in” and “Zoom out” buttons, a high-resolution image reachable through a link
Calendar to drag a native <input type="date">, or a grid of dates as buttons
Drawn signature a consent checkbox and a typed name, if your legal framework allows it

Price filter template with an optional slider, ready to paste:

<form action="/chaussures" method="get">
  <fieldset>
    <legend>Price</legend>
    <label for="prix-min">Minimum price (€)</label>
    <input id="prix-min" name="prix_min" type="number" inputmode="numeric" min="0" max="500" step="1" value="80">

    <label for="prix-max">Maximum price (€)</label>
    <input id="prix-max" name="prix_max" type="number" inputmode="numeric" min="0" max="500" step="1" value="120">
  </fieldset>
  <button type="submit">Apply price filter</button>
</form>

The GET form writes the filter into the URL, which also makes it shareable (see keep URLs stable (opens in a new tab)). A two-handle slider added in JavaScript can be synchronized with these fields.

Template of a list that can be reordered without dragging:

<ol id="etapes">
  <li>
    <span id="etape-1">Delivery</span>
    <button type="button" aria-describedby="etape-1" data-deplacer="haut">Move up</button>
    <button type="button" aria-describedby="etape-1" data-deplacer="bas">Move down</button>
  </li>
</ol>
<p role="status" id="annonce-ordre"></p>

<script>
  document.getElementById('etapes').addEventListener('click', (event) => {
    const bouton = event.target.closest('[data-deplacer]');
    if (!bouton) return;
    const ligne = bouton.closest('li');
    const voisine = bouton.dataset.deplacer === 'haut' ? ligne.previousElementSibling : ligne.nextElementSibling;
    if (!voisine) return;
    bouton.dataset.deplacer === 'haut' ? voisine.before(ligne) : voisine.after(ligne);
    bouton.focus();
    const position = [...ligne.parentElement.children].indexOf(ligne) + 1;
    document.getElementById('annonce-ordre').textContent = `${ligne.querySelector('span').textContent}: position ${position}`;
  });
</script>

Warning: a drag-based CAPTCHA (puzzle, slider) blocks agents as much as people who cannot perform that gesture. If you need bot protection on a purchase journey, prefer invisible verification and read check automatic blocking and CAPTCHAs (opens in a new tab).

WordPress

Versions WordPress 6.5 and later, WooCommerce 9 and 10, November 2026.

  • WooCommerce price filter: in the price filter block settings, enable editable input fields next to the slider when your version offers it; otherwise, add a GET form with the min_price and max_price parameters, which WooCommerce recognizes on shop pages.
  • Carousels and sliders (slider plugins, page builders): enable navigation arrows and dot pagination, and disable autoplay or display a pause button.
  • File upload forms: check that the plugin keeps a visible “Choose file” button in the drop zone.
  • Mega menus: choose a plugin or theme whose submenus open on click, with aria-expanded.

Shopify

Versions Online Store 2.0 themes, Liquid, November 2026.

  • Collection filters: the price filter in Shopify's Online Store 2.0 themes (Dawn and its derivatives) offers two numeric fields, “From” and “To”. If a Theme Store theme replaces it with a slider alone, add the fields back with the filter.v.price.gte and filter.v.price.lte parameters.
  • Product gallery: display clickable thumbnails and previous / next buttons; in the theme editor, avoid settings that hide thumbnails on mobile.
  • Slideshows: disable auto-rotation in the section settings, or keep the pause button visible.

Laravel

Versions Laravel 11 to 13.

With Livewire, reordering with buttons takes no custom JavaScript:

<ol>
    @foreach($etapes as $index => $etape)
        <li wire:key="etape-{{ $etape->id }}">
            <span id="etape-{{ $etape->id }}">{{ $etape->nom }}</span>
            <button type="button" wire:click="monter({{ $etape->id }})" aria-describedby="etape-{{ $etape->id }}" @disabled($loop->first)>Move up</button>
            <button type="button" wire:click="descendre({{ $etape->id }})" aria-describedby="etape-{{ $etape->id }}" @disabled($loop->last)>Move down</button>
        </li>
    @endforeach
</ol>

If you keep drag-and-drop sorting (SortableJS, Livewire's sort plugin), leave these buttons next to it. For filters, a GET form validated in the controller is enough.

Next.js

Versions Next.js 15 and 16 (App Router).

  • Drag and drop: with dnd-kit, enable the keyboard sensor (KeyboardSensor) and add move buttons anyway: the keyboard helps humans, the buttons help agents too.
  • Carousels: with Embla, Swiper or Keen Slider, display the navigation buttons and the dots as named <button> elements; with Swiper, enable the accessibility module.
  • Filters: a server component that reads searchParams and a GET form give filters that work without JavaScript, and therefore without gestures.
export default async function Page({ searchParams }: { searchParams: Promise<{ prix_min?: string; prix_max?: string }> }) {
  const { prix_min = '', prix_max = '' } = await searchParams;

  return (
    <form method="get">
      <label htmlFor="prix-min">Minimum price (€)</label>
      <input id="prix-min" name="prix_min" type="number" min={0} defaultValue={prix_min} />
      <label htmlFor="prix-max">Maximum price (€)</label>
      <input id="prix-max" name="prix_max" type="number" min={0} defaultValue={prix_max} />
      <button type="submit">Apply price filter</button>
    </form>
  );
}

Common mistakes

  • A price slider without a field: impossible to set precisely, for an agent as with a finger.
  • Mandatory drag and drop in a configurator or an appointment scheduler.
  • A drop zone without a button: the file field exists but is hidden with CSS, out of reach.
  • A carousel containing unique information (price, options, conditions) visible only by swiping.
  • Infinite scrolling without pagination: the next items do not exist until you scroll.
  • Opening a menu on hover only, with no reaction to click or focus.
  • A configurator built entirely in a <canvas>: no controls in the accessibility tree. See avoid information available only in Canvas (opens in a new tab).

Frequently asked questions

Can AI agents drag and drop?

Some tools allow it, such as Playwright MCP's drag action or the simple drag of Anthropic's computer use tool, but these gestures remain less reliable than a click or typing. The agent has to identify the handle, the target and the exact distance, then check the result. A button or field alternative removes this risk and also serves people who cannot drag.

Should you remove carousels and sliders?

No, there is no need to remove them. The rule is that they must not be the only way to act or to access a piece of information. A carousel with previous and next buttons and clickable thumbnails, a price slider accompanied by two numeric fields, drag sorting complemented by Move up and Move down buttons all suit humans, assistive technologies and AI agents.

What does WCAG say about pointer gestures?

WCAG 2.2 includes two dedicated criteria. Criterion 2.5.1, level A, requires a function triggered by a multipoint or path-based gesture to also be operable with a single pointer, without a path. Criterion 2.5.7, level AA, requires a function that uses a dragging movement to be operable without dragging, unless dragging is essential. Criterion 2.1.1 adds keyboard operation.

Does infinite scrolling get in the way of AI agents?

It can. An agent that reads the page text or the accessibility tree only sees items that are already loaded, and an agent working from screenshots has to scroll repeatedly without knowing when to stop. Add a Show more button and pagination links with distinct addresses: that way, the agent, the search engine and the visitor can all reach the entire list.

Updated on

Topic checklist (PDF)

And now?

In the “AI agent compatibility” topic

  1. Use semantic HTML and explicit labels
  2. Identify what each button does
  3. Provide clear error messages
  4. Keep URLs stable
  5. Avoid mandatory complex gestures
  6. Make component states accessible
  7. Display final prices, availability and options
  8. Simplify booking and checkout
  9. Document existing public APIs
  10. Use OpenAPI if relevant
  11. Evaluate MCP based on use cases
  12. Evaluate compatible agentic commerce protocols
  13. Check authentication and authorization
  14. Require confirmation for sensitive actions
  15. Test user journeys with browsing agents
  16. Prevent prompt injection and unauthorized interactions