Accessibility
a11y/no-flash
Nothing flashes more than three times in any one second, unless the flash is small and below the general and red thresholds.
criticalmanualWCAG 2.3.1 · Afe-a11y-media
Why
Flashing between light and dark more than three times a second can trigger seizures in people with photosensitive epilepsy. It is one of the few accessibility failures that can cause physical harm.
Fix
Keep alternating light and dark animations slower than three cycles per second, and avoid saturated red flashes. Check videos and game effects with a flash analysis tool before release, and wrap any strong effect in @media (prefers-reduced-motion: no-preference).
Examples
/* bad: a full-screen alert blinking eight times a second */
.alarm { animation: blink 125ms steps(2) infinite; }
/* good: a slow pulse, off when people ask for less motion */
@media (prefers-reduced-motion: no-preference) { .alarm { animation: pulse 2s ease-in-out 3; } }Sources
Facts
- Id
a11y/no-flash- Severity
- critical
- Check
- manual a person reviews it; the report lists it as a checklist
- Applies to
page- WCAG 2.2
- 2.3.1, level A
- Taught by the skill
fe-a11y-mediaMedia, motion and flashing- Since version
- 0.1.0
Read it in the terminal
npx github:dawidolko/frontend-skills explain a11y/no-flash