Some people get dizzy, sick or a headache from movement on a screen: a background sliding at a different speed from the text, a page that zooms as you scroll, a carousel that never stops. For them a flashy website isn’t annoying, it’s unusable, and the symptoms can last well after they close the tab.
Making a site safe for them doesn’t mean making it static. Every major operating system has a setting to reduce motion, and CSS can read it with the prefers-reduced-motion media query. This guide covers who motion affects, what the accessibility rules require, which effects cause the most trouble, and the CSS and JavaScript to tone them down, plus a toggle for visitors who want less motion on your site alone.
Who motion on the web affects
The largest group is people with vestibular disorders. The vestibular system, in the inner ear and the brain, keeps track of balance and movement. When the eyes report movement the body doesn’t feel, a damaged or sensitive system can answer with dizziness, nausea, headaches or a loss of balance.
It isn’t rare. A US national health survey found signs of vestibular dysfunction in about 35% of adults aged 40 and over (Agrawal and others, 2009). Not all of them are troubled by screens, but it’s a large group, and it grows with age.
Movement on screen also affects:
- People with migraine, for whom motion and flicker can bring on or worsen an attack.
- People recovering from a concussion, who are often sensitive to screens and motion for weeks.
- People with photosensitive epilepsy, for whom flashing, rather than movement, can trigger a seizure.
- People with attention-related conditions, for whom constant movement pulls focus from the content.
What the accessibility rules require
Three success criteria in the Web Content Accessibility Guidelines (WCAG 2.2) deal with movement and flashing:
| Criterion | Level | What it asks for |
|---|---|---|
| 2.2.2 Pause, Stop, Hide | A | Anything that moves, blinks or scrolls on its own for more than five seconds, alongside other content, can be paused, stopped or hidden. |
| 2.3.1 Three Flashes or Below Threshold | A | Nothing flashes more than three times in any one second, unless the flashes stay below the general and red flash thresholds. |
| 2.3.3 Animation from Interactions | AAA | Motion set off by an interaction, like scrolling, can be turned off, unless it’s essential. |
Laws and contracts usually ask for Level A and AA. In the EU, the European Accessibility Act has applied to many consumer websites and apps since June 2025, and compliance is generally measured against WCAG 2.1 Level AA. That makes the first two criteria requirements, not nice-to-haves.
2.3.3 is Level AAA, so it’s rarely mandatory, but it’s cheap to meet: the W3C lists the prefers-reduced-motion query as a way to satisfy it, in technique C39.
Common motion triggers on websites
Not all animation is a problem. A button that darkens on hover or a menu that fades in is fine for almost everyone. The trouble comes from motion that’s large, fast, repeated, or not asked for:
| Effect | Why it causes trouble | A safer version |
|---|---|---|
| Parallax scrolling | Layers sliding at different speeds suggest movement the body doesn’t feel | Scroll the layers together |
| Scroll-jacking | The page takes over how fast and how far you scroll | Leave scrolling to the browser |
| Zooming or sliding page transitions | The whole view moves at once | A short crossfade |
| Scroll-triggered reveals | Many elements slide or scale into place as you scroll | Fade them in without the movement |
| Autoplaying video and carousels | Motion the visitor didn’t start, often with no way to stop it | Start paused, or show a pause button |
| Looping animations and spinners | Constant motion at the edge of vision | Stop after one run, or use a progress bar |
| Animated GIFs | Browsers give no way to pause them | A still image, or a video with controls |
The prefers-reduced-motion media query
prefers-reduced-motion reports the visitor’s system setting. It has two values: reduce, when they’ve asked for less motion, and no-preference. Every current browser supports it. Visitors switch it on in their system settings:
- macOS: System Settings → Accessibility → Display → Reduce motion
- iPhone and iPad: Settings → Accessibility → Motion → Reduce Motion
- Windows 11: Settings → Accessibility → Visual effects → turn off Animation effects
- Android: Settings → Accessibility → Remove animations (the exact place varies by phone)
Make motion an enhancement
The safest pattern is to write the calm version first and add movement only for visitors who haven’t asked for less. If anything goes wrong, they get the calm version.
CSS
/* Everyone: the card fades in where it sits. */
.card {
animation: fade 400ms ease-out both;
}
/* Only visitors who haven't asked for less motion: it rises as it fades. */
@media (prefers-reduced-motion: no-preference) {
.card {
animation-name: rise;
animation-duration: 600ms;
}
}
@keyframes fade {
from {
opacity: 0;
}
}
@keyframes rise {
from {
opacity: 0;
transform: translateY(1.5rem);
}
}Notice that the reduced version still fades. Reduced motion doesn’t have to mean no animation: fades and colour changes rarely cause symptoms. It’s movement across the screen, scaling, spinning and parallax that do, so those are what to take away.
Keep the motion you keep gentle
For visitors who see the full version, a few habits keep motion comfortable:
- Move things a short distance, not across the screen.
- Play an animation once (
animation-iteration-count: 1) rather than looping it. - Choose a calm curve for
animation-timing-function, like an ease-out, over bounces and elastic overshoots. - Keep
transition-durationshort for small changes, and animate one thing at a time rather than the whole page.
Smooth scrolling
Smooth scrolling to an anchor carries the whole page past the reader’s eyes. Turn it on only for visitors who haven’t asked for less motion; everyone else jumps straight there.
CSS
@media (prefers-reduced-motion: no-preference) {
html {
scroll-behavior: smooth;
}
}Scroll-driven animations and view transitions
Two newer CSS features make movement easy to add, so they need the same care. Keep scroll-driven animations inside the no-preference query, and turn view transitions into an instant swap:
CSS
@media (prefers-reduced-motion: no-preference) {
.reveal {
animation: rise linear both;
animation-timeline: view();
animation-range: entry 0% cover 30%;
}
}
@media (prefers-reduced-motion: reduce) {
::view-transition-group(*),
::view-transition-old(*),
::view-transition-new(*) {
animation: none !important;
}
}A safety net for everything else
Older sites collect animations from themes, plugins and libraries faster than anyone can fix them one by one. A global rule catches what the targeted styles miss:
CSS
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
animation-delay: 0s !important;
transition-duration: 0.01ms !important;
transition-delay: 0s !important;
scroll-behavior: auto !important;
}
}It shortens animations instead of removing them, so each one still lands on its final state and still fires its end event, which scripts may be waiting for. But it’s blunt: it also flattens the fades that do no harm. Use it as a stopgap while you add targeted styles, and test anything that depends on timing.
Reducing motion in JavaScript
Motion started from JavaScript needs the same check. matchMedia reads the setting, and its change event fires if the visitor switches it while the page is open:
JS
const reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)')
const video = document.querySelector('.hero-video')
function applyMotionPreference() {
if (reduceMotion.matches) {
video.pause()
} else {
video.play()
}
}
applyMotionPreference()
reduceMotion.addEventListener('change', applyMotionPreference)Leave the autoplay attribute off the video, so it only starts when the script says so. Animation libraries have the check built in:
- Motion (formerly Framer Motion): wrap the app in
MotionConfigwithreducedMotion="user"and it turns off transform and layout animations for those visitors while keeping opacity and colour changes. TheuseReducedMotionhook reads the setting inside a component. - GSAP:
gsap.matchMedia()runs different animations for each media query and cleans them up when the setting changes. - The Web Animations API: check
reduceMotion.matchesbefore callingelement.animate().
Animated GIFs
A GIF can’t be paused, but the browser can choose not to load it:
HTML
<picture>
<source srcset="demo.gif" media="(prefers-reduced-motion: no-preference)" />
<img src="demo-still.png" alt="The dashboard filtering a list of orders" />
</picture>Visitors who asked for less motion get the still frame. For anything longer than a few seconds, a <video> with controls is better still: anyone can pause it, and it’s usually far smaller than the GIF.
Giving visitors control
The system setting doesn’t reach everyone. Many people don’t know it exists, some use a work computer they can’t change, and some only want less motion on one site. Two controls cover them.
A pause button for anything that moves on its own
WCAG 2.2.2 requires one for movement that lasts more than five seconds: carousels, background videos, tickers, looping illustrations. Make the button visible, give it a name a screen reader can announce (“Pause animation”, not an icon alone), and pause a carousel while the pointer or keyboard focus is inside it.
A reduce-motion toggle for your site
A site setting lets anyone turn motion down, whatever their system says. Save the choice, and read it back in the <head> so it applies before the first paint:
HTML
<script>
try {
if (localStorage.getItem('motion') === 'reduce') {
document.documentElement.dataset.motion = 'reduce'
}
} catch {}
</script>The toggle itself is a button that reports whether it’s pressed:
HTML
<button type="button" id="motion-toggle" aria-pressed="false">Reduce motion</button>JS
const button = document.getElementById('motion-toggle')
const root = document.documentElement
button.setAttribute('aria-pressed', String(root.dataset.motion === 'reduce'))
button.addEventListener('click', () => {
const reduce = root.dataset.motion !== 'reduce'
if (reduce) root.dataset.motion = 'reduce'
else delete root.dataset.motion
button.setAttribute('aria-pressed', String(reduce))
try {
localStorage.setItem('motion', reduce ? 'reduce' : 'full')
} catch {}
})Then change the enhancement from earlier, so movement runs only when both the system and the visitor allow it:
CSS
@media (prefers-reduced-motion: no-preference) {
:root:not([data-motion='reduce']) .card {
animation-name: rise;
animation-duration: 600ms;
}
}Put the toggle where people look for settings: in the footer, in an accessibility or settings menu, or beside a large animated section. The aria-pressed state tells screen reader users whether it’s on.
Testing your site with reduced motion
- Turn the setting on on your own computer and phone, and use the site as a visitor would: scroll every page, open the menus, follow the links.
- Chrome and Edge: in DevTools, open the Command Menu (Ctrl+Shift+P, or Cmd+Shift+P on a Mac), run “Show Rendering”, and set “Emulate CSS media feature prefers-reduced-motion” to reduce.
- Firefox: in
about:config, addui.prefersReducedMotionas a number set to 1. - Automated tests: Playwright’s
page.emulateMedia()takesreducedMotion: 'reduce', so a test can fail if a carousel still plays on its own.
With the setting on, go through the site and check that:
- Nothing slides, zooms, spins or moves in depth unless the visitor asks for it.
- Videos, carousels and tickers start paused, or can be paused.
- Anchor links jump instead of gliding.
- Page transitions crossfade or swap instantly.
- Nothing flashes more than three times a second.
- Everything that animates in ends up visible and in its place.
Automated checkers can’t judge most of this; it takes a person. If you can, ask someone with a vestibular disorder to try the site. They’ll notice what you won’t.
None of this takes much code: a media query around your movement, a fade in its place, a pause button and a toggle. Done well, most visitors won’t notice anything changed, and the ones who needed it can use the site.