Search topics
Pulsing buttons, glowing badges and endless animations
A call-to-action button pulses to draw the eye, and the pulse repeats without end, so it keeps moving beside the rest of the page while it is open.
animation: pulse 1.5s ease-out infinite; The problem
People with attention difficulties, and people reading beside the button, keep having their eye pulled back to a pulse that never stops, and nothing on the page stops it
The home page of a project-planning app has one big button, "Start free trial", beside the price and three lines on what the plan includes. To make sure nobody misses it, the button pulses: a ring spreads out from it and fades, every second and a half, from the moment the page loads for as long as it stays open. It is a few lines of CSS, copied from a "pulse button" snippet, and the snippet ends with infinite. The same thing turns up all over the web in other shapes: a "New" badge that glows, an arrow that bounces to say "scroll down", a chat bubble that wobbles, a skeleton placeholder that shimmers after the content has loaded, a decorative icon that spins.
Success criterion 2.2.2 Pause, Stop, Hide applies to moving, blinking or scrolling information that starts by itself, lasts more than five seconds, and is shown alongside other content. The pulse starts as the page loads, never ends, and sits beside the very text the visitor is reading, so the page needs a way to pause, stop or hide it, and it has none. Understanding 2.2.2 counts any content that conveys a sense of motion, animations included, and draws no line between information and decoration: the point is that the movement distracts from the rest of the page, whatever it is for. The criterion's own way out is the five seconds. Movement that stops by itself within five seconds needs no control, and techniques G11 and G152 describe exactly that: blinking that ends in under five seconds, and animated images set to stop after a few cycles. For a decoration, that is the easy fix.
The button is the one thing on the page designed to be looked at, so it sits right in the middle of what people read: the price, the plan, the terms.
2 of 10 groups affected
- No vision (not affected)
- Low vision (affected)
- Colour vision (not affected)
- No hearing (not affected)
- Hard of hearing (not affected)
- No speech (not affected)
- Motor (not affected)
- Reach, strength (not affected)
- Cognitive (affected)
- Seizures (not affected)
- Limited language, cognitive and learning abilities A pulse beside the text keeps pulling the eye back, so people with attention difficulties can't settle on the price and features they came to read, and nothing lets them make it stop.
- Limited vision With a screen magnifier, the pulse pulls the eye back each time it fires, and people who read close to the screen see the ring spread across the words beside the button.
The audit finds every running CSS animation, script animation and animated SVG that repeats without end or for more than five seconds, and flags it for a person to check, with its timing and whether a Pause button is near. It can't tell whether the movement is decoration or information, or whether it is essential, so it is a lead, not a finding. It doesn't see an animation a script starts again every few seconds by adding a class, or an animated GIF. AI tools usually wrap the pulse in a reduced-motion media query and stop there, which helps only the people who found that setting, or suggest a Pause button, which is far more than a decoration needs. Many "attention-grabbing button" snippets online end in infinite, so AI-written CSS often brings the failure with it.
Try it
Watch the button for five seconds, then point at it and press Tab
The readout counts how long the button has been moving.
On the broken side it never stops. "Stop demo" is the Learn page’s own button, not the app’s.
Broken Can you fix this?
Moved for: 0 s
The fix
Stop the animation within five seconds, or take it away
<a class="cta" href="/signup">Start free trial</a>What is wrong3 points
- The pulse never ends while people read beside it:
infinitemakes the ring spread again every 1.5 seconds for as long as the page is open, far past the five seconds that movement may run with no way to stop it. - It moves even for people who have asked for less motion: the animation isn't inside a
no-preferencequery, so it runs for every visitor. - Someone it distracts can't make it stop: nothing on the page pauses or stops it.
Three pulses, then still
<a class="cta" href="/signup">Start free trial</a>How it is fixed2 steps
- Change one value:
infinitebecomes3. Three cycles of 1.5 seconds are over in 4.5 seconds, so the pulse still draws the eye as the page opens, then the button rests and the visitor can read. - Write it inside
no-preference, so people who have asked for less motion never see it.
This fixes the Before and passes 2.2.2. It holds only while nothing starts the animation again: a script that re-adds the class every few seconds, or on every scroll, turns it back into movement without end. Keep cycles × duration under five seconds if you change either.
Why this fix: Make motion opt-in
All three pass 2.2.2. Three pulses keep what the design asked for, attention as the page opens, by changing one value, and the stop is built in. The still button costs nothing and distracts nobody, but the design has to do the work with size, colour and space instead. Movement on hover and focus never pulls anyone's eye from across the page, which is its point and its cost: it gives feedback, not attention. Choose three pulses when the motion is part of the brief, the still button when you can change the design, and hover and focus when the motion was only ever meant as feedback.
Count the five seconds from when the movement starts, across all its cycles: animation-iteration-count times animation-duration, plus any delay between repeats that a script adds. A pulse with a two-second delay and three 1.5-second cycles moves for 4.5 seconds, which passes.
The reduced-motion query is no substitute for an end. Many people who are distracted by movement never find that setting, and 2.2.2 asks for the page itself to stop. Writing the motion inside no-preference is still worth doing, because it costs nothing and helps people who have asked; see animations that ignore the reduced-motion setting.
The same fixes apply to every decoration that loops. Each needs an end, or no motion at all.
- A "New" or "Sale" badge that glows or blinks: a few cycles, or a still badge in a stronger colour.
- A "scroll down" arrow that bounces: two or three bounces, then still.
- A skeleton placeholder that shimmers: stop the shimmer when the content arrives, and fall back to a still grey block if loading takes long. What a screen reader hears while it loads is covered in skeleton screens that screen readers never announce.
- An SVG icon drawn with
<animateTransform repeatCount="indefinite">: giverepeatCounta number, or use a still icon. - An animated GIF or Lottie file that loops: export it to loop only a few times, or stop it from the player's own setting.
A spinner that shows something is loading is different. Understanding 2.2.2 treats a loading animation as essential while nothing on the page can be used, since it isn't shown alongside other content. A spinner beside content people can read, such as one in a button or a panel, has to stop when the loading does. If it can keep spinning for more than five seconds there, it falls under 2.2.2 like any other movement: after a few seconds, swap it for a still status in words, such as "Still loading…", or a progress bar that moves only as the work does.
Text that moves, such as a ticker or a rotating carousel, can't end within five seconds and still be read, so it needs a Pause button or no movement at all; that has its own guide: tickers, carousels and animations that can't be paused. So does footage that loops behind a hero: background videos that loop with no pause button.
Design ideas
Draw the eye once, then let people read
Five ways to make the Start free trial button stand out. The moving samples start when they scroll into view and stop within five seconds, and Replay runs one again; point at each button and Tab to it. Three pass because they stay still, stop by themselves or move only when asked; two stop here only because this page stops them.
In the design file
- Write next to every animation how many times it plays and how long each takes, under five seconds in total, such as 3 times 1.5 seconds.
- Draw the button as it looks once the animation has stopped.
- Draw the page for people who turn motion off, with nothing moving at all.
- Use one short movement each for hover and focus, and keep the focus ring.
Passes
- Solo $0/ month Get started
- Most popular Team $12/ month Start free trial
The plan card picked out Nothing moves, so 2.2.2 has nothing to ask. The plan to choose is the card with a 2px #1d4ed8 border, a soft tint, a Most popular badge on its edge (white on the blue, 6.70:1) and the only filled button; it needs a second plan beside it to stand out from.Rule of thumb: Let people stop anything that moves by itself
- $12 / month Start free trialA shine that crosses once A soft white sheen crosses the pill once, in 0.9 seconds, as the button comes into view, and then it rests. Coming into view counts as starting by itself, so what passes is the length: shine snippets usually repeat every few seconds, and a count of one keeps the look.
Rule of thumb: Move to show a change, then stop
- $12 / month Start free trialAn arrow that slides on hover and focus Still at rest. When the pointer arrives or Tab lands, the arrow slides 4px to the right in 0.2 seconds and stays there until the pointer or focus leaves, so the movement answers the person instead of calling across the page; it gives no pull as the page opens.
Rule of thumb: Move to show a change, then stop
Fails
- $12 / month Start free trialA gradient border that keeps circlingWCAG 2.2.2 A light runs round the pill every 2 seconds for as long as the page is open, beside the price people are reading, and nothing stops it; the same border held still keeps the look without the pull. This sample stops after two turns and doesn’t move under a reduced-motion setting; the pattern itself never stops.
Rule of thumb: Move to show a change, then stop
- $12 / month Start free trial
Loading reviews…
A skeleton that keeps shimmeringWCAG 2.2.2 The reviews never arrive, and their placeholder shimmers on beside a price and button people can already use; loading motion is essential only while nothing else on the page can be used. Stop it when loading stops, or after a few seconds show a still grey block or “Still loading…”. This sample stops after three sweeps and doesn’t move under a reduced-motion setting; the pattern itself never stops.Rule of thumb: Move to show a change, then stop
Verify the fix
5 checks.
Test with: Reduced motion, Keyboard, Mouse, Zoom
Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the design, the CSS framework or the animation library changes.
Limits
This is a starting pattern, not a guarantee for every application. It covers movement only: flashing more than three times in any one second is a separate check under 2.3.1, made with a flash analysis tool rather than by eye. Whether an animation is decoration or information, and whether the page is calm enough once it is still, still needs a person to judge.
This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.
References
- WCAG Understanding: pause-stop-hide (opens in a new tab)
- WCAG Technique G152 (opens in a new tab)
- WCAG Technique G11 (opens in a new tab)
- developer.mozilla.org: animation-iteration-count (opens in a new tab)
- developer.mozilla.org: prefers-reduced-motion (opens in a new tab)
- developer.mozilla.org: repeatCount (opens in a new tab)
EaseWeb service
Fixed it? Keep it from coming back.
I turn guides like this one into rules your coding agents follow and checks your CI runs. Then I retest by hand with a keyboard and screen readers, periodically.