Animation makes interfaces feel alive, but the wrong motion can make some users physically ill or, in rare cases, trigger a seizure. This checker reads your CSS, finds the rules that move things, and flags the ones most likely to cause harm, while reminding you to give users a way to opt out.
How it works
The tool splits your CSS into top-level blocks (selectors, @keyframes and @media queries) using a brace-aware scanner, then inspects the declarations inside each one.
Vestibular risk (WCAG 2.3.3)
These transform patterns are flagged because they create the large or disorienting motion that bothers people with vestibular conditions:
- Rotation — any
rotate,rotateX/Y/Zorrotate3d. - Large translation — a
translateover about 150px, or any motion expressed invhorvw(full-viewport sliding). - Strong scale — a
scalefactor at or above 1.5, or at or below 0.5. - Parallax / depth —
perspective,translateZorrotate3d.
Seizure risk (WCAG 2.3.1)
For infinite animations the tool reads the duration and estimates a cycle rate:
cyclesPerSecond = 1000 / durationMs
If that exceeds 3 Hz, the rule is flagged as a potential flash hazard, since anything flashing faster than three times per second can trigger photosensitive seizures.
The opt-out check
The whole stylesheet is searched for a @media (prefers-reduced-motion: reduce) query. If none exists, that is reported prominently, because without it sensitive users have no way to turn motion off.
Example
.loader { animation: spin 0.2s linear infinite; }
A 0.2s infinite loop runs at 5 Hz, above the 3 Hz threshold, so it is flagged as a seizure risk. Slow it down, or better, disable it under reduced-motion.
Tips
- Default to subtle motion: short fades and small movements rarely cause problems.
- Gate every non-essential animation behind
prefers-reduced-motion: reduceand set it tononeor a minimal fade there. - Avoid full-screen slides, spinners that never stop, and large zoom-in reveals on scroll.
- This is a static heuristic, not a luminance measurement. Confirm borderline cases by actually watching the animation. All analysis is local to your browser.