Dostępność
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.
krytycznaręczneWCAG 2.3.1 · Afe-a11y-media
Dlaczego
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.
Poprawka
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).
Przykłady
/* 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; } }Źródła
Fakty
- Identyfikator
a11y/no-flash- Waga
- krytyczna
- Sprawdzanie
- ręczne ocenia człowiek; raport podaje to jako listę kontrolną
- Dotyczy plików
page- WCAG 2.2
- 2.3.1, poziom A
- Uczy jej skill
fe-a11y-mediaMedia, motion and flashing- Od wersji
- 0.1.0
Przeczytaj w terminalu
npx github:dawidolko/frontend-skills explain a11y/no-flash