Rule
Pausable moving content
Moving content must be pausable.
- Rule
pause-stop-hide- WCAG 2.2
- 2.2.2 Pause, Stop, Hide (opens in a new tab) (Level A)
- Severity
- Serious
What it checks
Two kinds of moving content are looked at. A <marquee> is sent for review unless scrollamount="0" holds it still. A running animation that repeats for ever and moves its element, or makes it blink, is sent for review when the element carries text, including text a pseudo-element generates.
Movement counts when the keyframes change position: a transform, a translate, an offset path, the inset properties, margins or background position. Blinking counts when the element is hidden and shown again, or its opacity swings between nearly invisible and nearly full. Colour cycles, gentle pulses, and spinners or shapes with no text are left alone, as are animations driven by scrolling, which do not start by themselves.
When a person decides
This rule never fails. An endless animation settles that the motion starts by itself and lasts longer than five seconds. The pause, stop or hide control the criterion asks for can be any button on the page, though, and markup cannot tell a pause button from any other. A person checks that one exists and reaches the moving content.
Example
Sent to review
<style>
.ticker { animation: scroll 12s linear infinite; }
@keyframes scroll { from { transform: translateX(20%); } to { transform: translateX(-20%); } }
</style>
<p class="ticker">Trains to the airport are delayed by 20 minutes.</p>
Passes
<style>
.ticker { animation: scroll 12s linear infinite paused; }
.ticker.playing { animation-play-state: running; }
@keyframes scroll { from { transform: translateX(20%); } to { transform: translateX(-20%); } }
</style>
<button type="button" aria-pressed="false">Play headlines</button>
<p class="ticker">Trains to the airport are delayed by 20 minutes.</p>
The engine is tested against both examples.
How to fix it
Give moving text a visible pause or stop button that reaches it, or let it start only when asked. Stopping it under prefers-reduced-motion: reduce helps too.
Check your own pages
This rule runs in every pour audit: the browser extension, the bookmarklet, the command line and the editor. Get pour, free.