walkthrough
Back to blog

Check reduced motion before reusing an animation

Record a menu with and without reduced motion. Give your coding agent both references and test both versions in your app.

By 3 min read

The same menu opening twice: sliding down with no motion preference, fading in place with reduce motion turned on.
The same menu opening twice: sliding down with no motion preference, fading in place with reduce motion turned on.

Suppose you want to adapt a sliding menu into your app. You record it and ask your coding agent to match the movement.

Now turn on Reduce motion and open your version. Same slide. Same bounce. But the original site might not do that for those users. Maybe it just fades.

The recording is not wrong. It is only one version of the menu. You recorded with motion on, so you got the motion-on version.

The setting is real and it is easy to miss

Most systems have a switch for this. On macOS and iOS it is called Reduce motion. On Windows it is called Animation effects. Browsers pass it to the page as a media feature called prefers-reduced-motion.

It has two values. reduce means the person asked for less motion. no-preference means they did not say anything. Note the word: reduce, not none. MDN is clear that this does not mean every animation must go.

Why people turn it on

The W3C explains it in its guide for success criterion 2.3.3. For people with vestibular disorders, movement that is not needed can cause distraction, dizziness, headaches and nausea. Parallax scrolling and big sliding panels are the usual examples.

That criterion is Level AAA. Include reduced motion in your request to the agent and check it in the result.

What usually changes when motion is reduced
EffectMotion onA common reduced version
Menu or dropdownSlides or scales from the triggerShort fade, no movement
Page or modal transitionSlides in from a sideCross-fade or instant
Parallax backgroundMoves slower than the pageFixed, moves with the page
Autoplay hero animationLoopsStill frame, play on request
Spinner or progressSpinsUsually kept. It tells you something is happening

These are patterns, not rules. The last row matters: if a motion carries meaning, keeping it can be the right call.

CSS handles half of it

If the animation lives in CSS, the fix is small. Put the movement behind @media (prefers-reduced-motion: no-preference), or add a reduce block that swaps it for a fade. The W3C lists this as technique C39.

JavaScript is the part people forget. A media query in your stylesheet does not change an animation you start with element.animate() or a motion library. Your code has to check matchMedia('(prefers-reduced-motion: reduce)') itself. Some libraries do this for you, some do not, so check yours.

What a recording can and cannot tell you

When you record an interaction, the browser plays it with your current setting. So a recording made with motion on shows the motion-on path. It does not show what the site does for reduce. It might have a nice fade. It might have nothing.

If you want to know, record it twice: once normal, once with Reduce motion turned on. Chrome DevTools can also emulate the setting in the Rendering panel, so you do not need to change your whole system.

What to ask your agent

  1. Copy the recorded motion for no-preference.
  2. Add a reduce version. Use the second recording if you have one. If not, say so and use a short fade.
  3. If the motion runs in JavaScript, check the media query there too.
  4. Test both. In Playwright you can set reducedMotion: 'reduce' on the page.

Walkthrough can include captured timing and keyframes in the selected evidence. Check what was captured before asking your agent to use it. The reduced-motion version still needs a second recording or an explicit requirement.

Sources

  1. MDN: prefers-reduced-motiondeveloper.mozilla.org
  2. W3C: Understanding SC 2.3.3 Animation from Interactionsw3.org
  3. W3C technique C39: prefers-reduced-motionw3.org
  4. MDN: Element.animate()developer.mozilla.org
  5. Playwright: emulation (reducedMotion)playwright.dev

Reference links for this article.

Bring one interaction to your app.

Choose a menu or dialog you want to adapt. Capture it in Walkthrough, export the selected evidence to your coding agent, and check the result in your own app.

Open Walkthrough