prefers-reduced-motion: motion that ignores the reduce motion setting
Parallax, looping animation and autoplay can make people with vestibular disorders ill. squirrel flags motion on pages with no prefers-reduced-motion handling.
What reduced motion is
Every major operating system has a reduce motion setting, and browsers expose it to pages as the media query @media (prefers-reduced-motion: reduce). Parallax heroes, scroll-triggered fade-ins, auto-advancing carousels and looping animation can make people with vestibular disorders dizzy or nauseous. A page that animates without ever reading that query ignores the setting completely.
This rule declares one WCAG criterion: 2.3.3 Animation from Interactions (Level AAA), which asks that motion animation triggered by interaction can be disabled, and for which technique C39 uses prefers-reduced-motion. It does not declare 2.2.2 Pause, Stop, Hide (Level A), which asks that moving content that starts automatically and lasts more than five seconds can be paused: the rule never looks for a pause control, which may exist. So it reports missing reduced-motion handling, not a WCAG failure. 2.3.3 covers motion that interaction starts, such as scroll-triggered effects, parallax and smooth scrolling; looping animation, autoplay video, marquees and auto-advancing carousels start on their own, so for those findings 2.3.3 is the nearest criterion, not an exact match.
What squirrel checks
The rule reads the page markup, inline <style> blocks, inline scripts, same-site scripts the audit fetched, and a summary of each same-site stylesheet the audit fetched. It runs in the CLI and in HTTP-only audits.
Third-party stylesheets are not read, so a page that links one (a theme on a CDN, for example) gets a partial result, except sheets from font-only hosts (fonts.googleapis.com, fonts.bunny.net, use.typekit.net, p.typekit.net, api.fontshare.com), which hold only @font-face rules and are ignored.
A page has a motion signal when it has any of:
- a looping CSS animation (
animation,-webkit-animationoranimation-iteration-countset toinfinite) in an inlinestyleattribute, or in an inline<style>or read stylesheet rule whose selector matches an element on the page (so an unused.fa-spinrule from an icon font does not count) scroll-behavior: smoothin a rule whose selector matches an element on the page;html,:root,bodyand*always match, so an unused.scroll-smoothutility class does not count- a
<video>with bothautoplayandloop <marquee>- a motion library: AOS (
data-aos), GSAP ScrollTrigger, Lottie players, animate.css or WOW.js, parallax (data-parallax, Rellax, Jarallax), Locomotive Scroll or Lenis. Library names are matched only in the path of a<script src>or a stylesheet, preload or modulepreload link, never in canonical, alternate or icon links, a hostname or a query string - a carousel set to auto-advance (
data-autoplaywith a value other than empty,false,0oroff, or Swiper, Slick, Splide or Flickityautoplayoptions)
Handling counts only when the page has one of:
-
an
@mediarule whose condition containsprefers-reduced-motion, in an inline<style>or a read stylesheet (a comment, body text or string that mentions it does not count) -
an inline or read script that calls
matchMediaand containsprefers-reduced-motion(window.matchMedia("(prefers-reduced-motion: reduce)"), or GSAP’sgsap.matchMedia()) -
a
<link rel="stylesheet">or<style>whosemediaattribute containsprefers-reduced-motion; the motion in that sheet is gated, so it is not counted either -
A warning means the page has a motion signal and none of the CSS and scripts the audit read handles reduced motion, and everything the page references was read.
-
An info result means the same, but a referenced stylesheet (including a third-party one) or a same-site script was not read, so the handling may live there. The message says the check was partial.
-
A skipped
reduced-motion-unverifiedcheck means a linked stylesheet was not read (a fetch error, the 20-stylesheet limit, or a file over 1 MB) where the rule would otherwise have passed. The rule never passes when it could not read every stylesheet the page links. -
Each motion source is one finding across the site, listing the pages it appears on, because motion usually comes from a shared template.
Not reported: hover and focus transition rules, a single non-looping entrance animation, animated GIFs (see animated-content), and motion that only runs inside @media (prefers-reduced-motion: no-preference).
Stylesheet reading is bounded: a file over 1 MB is not read and counts as partial, and parsing stops at a fixed number of rules per file.
How to fix it
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation: none !important;
scroll-behavior: auto !important;
transition: none !important;
}
}In script, check the query before starting scroll animation or autoplay:
const reduce = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
if (!reduce) AOS.init();Some libraries expose an option for this (AOS has disable: "mobile" or a function), so check the library docs before writing your own.
| Rule ID | a11y/reduced-motion |
| Category | Accessibility |
| Scope | Per-page |
| Severity | warning |
| Weight | 3/10 |
Enable / disable
Disable this rule
[rules]
disable = ["a11y/reduced-motion"]Disable all Accessibility rules
[rules]
disable = ["a11y/*"]Check names by outcome
Each check name this rule can emit, by what it means to a tool comparing two audits. A problem check is a finding. A clean check says the rule ran over what it covers and found nothing; it clears the problem checks listed beside it, so a finding is fixed when the rule ran over the same scope and a clean check took its place. A not checked check says the rule did not evaluate, and never clears a finding.
| Check name | Outcome | Clears |
|---|---|---|
reduced-motion-aos | Problem | |
reduced-motion-gsap-scrolltrigger | Problem | |
reduced-motion-lottie | Problem | |
reduced-motion-animate-wow | Problem | |
reduced-motion-parallax | Problem | |
reduced-motion-smooth-scroll-lib | Problem | |
reduced-motion-carousel-autoplay | Problem | |
reduced-motion-marquee | Problem | |
reduced-motion-autoplay-video | Problem | |
reduced-motion-css-infinite-animation | Problem | |
reduced-motion-css-smooth-scroll | Problem | |
reduced-motion-unverified | Not checked | |
reduced-motion | Clean | reduced-motion-aos, reduced-motion-gsap-scrolltrigger, reduced-motion-lottie, reduced-motion-animate-wow, reduced-motion-parallax, reduced-motion-smooth-scroll-lib, reduced-motion-carousel-autoplay, reduced-motion-marquee, reduced-motion-autoplay-video, reduced-motion-css-infinite-animation, reduced-motion-css-smooth-scroll |
WCAG success criteria
The WCAG success criteria this rule’s findings map to. These automated checks cover part of WCAG; passing them does not mean a site conforms. Run squirrel audit --wcag-level AA to keep only the accessibility rules mapped to a criterion at Level A or AA.
| Criterion | Level | Introduced in |
|---|---|---|
| 2.3.3 Animation from Interactions | AAA | WCAG 2.1 |