Dostępność
a11y/pause-auto-motion
Anything that moves, blinks, scrolls or updates by itself for more than 5 seconds has a visible pause or stop control.
poważnaręczneWCAG 2.2.2 · Afe-a11y-media
Dlaczego
Looping background video, auto-advancing carousels, tickers and animated illustrations pull attention away from the text. People with attention or reading difficulties cannot focus, and screen magnifier users lose content that moves out of view.
Poprawka
Give every looping or auto-advancing element a visible pause button that keeps its state, pause carousels on hover and focus (fe-a11y-carousel-toast), and start nothing by default when prefers-reduced-motion: reduce matches. Animated GIFs longer than 5 seconds become <video> with controls.
Przykłady
<!-- good -->
<video id="hero-video" autoplay muted loop playsinline src="hero.mp4"></video>
<button type="button" aria-pressed="false" id="pause-hero">Pause background video</button>Źródła
Fakty
- Identyfikator
a11y/pause-auto-motion- Waga
- poważna
- Sprawdzanie
- ręczne ocenia człowiek; raport podaje to jako listę kontrolną
- Dotyczy plików
page- WCAG 2.2
- 2.2.2, poziom A
- Ten sam problem w
- axe-core
marquee, axe-coreblink - Uczy jej skill
fe-a11y-mediaMedia, motion and flashing- Od wersji
- 0.1.0
Przeczytaj w terminalu
npx github:dawidolko/frontend-skills explain a11y/pause-auto-motion