Stop animated GIFs blinking within five seconds
An animated GIF's running time is simple arithmetic. Frames multiplied by frame rate multiplied by repetitions. G152 says set those numbers so the blinking stops within five seconds, after which the image holds still. Export with an infinite loop and the animation never stops, which is the default in most tools and the reason this keeps happening. This is a sufficient technique for 2.2.2 Pause, Stop, Hide at Level A. The blinking clause in that rule has no exception for small, decorative, or off to one side, so a tiny blinking badge in a sidebar is in scope exactly like a full-width banner. Content that keeps blinking past five seconds with no way to stop it is W3C's documented failure for the same rule.
How we find it in an audit
Our reviewers watch each page for a full minute and note anything still moving. Automated tools do not see animation. This is eyes on the screen. Advertising slots, promotional badges and third-party widgets are the usual sources, and they often arrive after launch with nobody reviewing them.
How affected users experience it
Repetitive blinking beside text is an attention tax that people with ADHD and other attention-related disabilities cannot opt out of. People with vestibular disorders can be made nauseous by it. For anyone reading with a magnifier, a blinking element inside the viewport dominates the small area they can see. And blinking fast enough, over a large enough area, becomes a seizure risk covered by a separate rule.
Passes vs. fails
Passes
The GIF is exported with a loop count that ends the blinking within five seconds, after which it holds a static frame.
Fails
A promotional GIF blinks 'SALE' on an infinite loop beside the article the reader is trying to get through.
How this gets tested
The W3C publishes test rules that define what a checker looks for here.
- Text content that changes automatically can be paused, stopped or hiddenSomeone has to look
Other ways to satisfy this rule
11 guides on this site are filed under 2.2.2 Pause, Stop, Hide. W3C lists this one as sufficient for that rule on its own. Implement it correctly, in a way your readers' software actually supports, and the rule is met.
- G4sufficientLet users pause moving content and resume it
- G11sufficientStop any blinking within five seconds
- G186sufficientAdd a stop control for moving content
- G191sufficientOffer a blink-free reload of the page
- SCR22sufficientStop scripted blinking within five seconds
- SCR33sufficientGive scrolling content a pause and a resume
This guide is our interpretation of W3C technique G152: Setting animated gif images to stop blinking after n cycles (within 5 seconds). W3C publishes its techniques as guidance rather than as the standard, and says so on every one of them. The success criterion is what conformance is measured against, and a technique is one documented way to meet it.