Skip to main content
WCAGrules
Quick navigation

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: warned, and one press extends. Fails: silent expiry destroys work.

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.

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.

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.

Go somewhere useful

Find tools, resources and your workspace.

29 destinations