Skip to content
Accessibility

Animations on your website: subtle, calm and accessible

Reveals, sliders, marquees and countdowns: when motion helps a website, what the five-second rule of WCAG 2.2.2 means and how reduced motion settings work.

18 min read AnimationenBarrierefreiheitWCAGFlow DesignSlider

A card that glides in gently from below as you scroll, an image slider at the top of the home page, a marquee of customer logos, a counter running down to the end of an offer: motion is popular on small business websites because it makes a page feel alive. It can also do the opposite. Slow readers lose the thread in a changing picture, people who find it hard to concentrate get distracted, and some people get dizzy or develop headaches from large-scale movement. The W3C's Web Content Accessibility Guidelines (WCAG) set clear limits for this, most visibly a period of five seconds for motion that starts by itself (W3C, WCAG 2.2). This article shows what motion on a website is good for, which rules apply to reveals, sliders, marquees and counters, how the system setting for reduced motion works, and how to build animations that burden neither visitors nor loading time.

Motion in moderation: reveal, reduced motion, five-second limitOne scroll reveal with and without motion, next to the test for continuous movementTimeline of a revealExample: “Fade in from below”StartCard in place150 msDuration 600 ms02505007501000 msDelayDurationCurve: “Flow (soft out)”Reduce motion: offService24 pxCard slides in from belowReduce motion: onServiceCard is there at once, in fullWCAG 2.2.2 testPause, Stop, Hide (Level A)1Starts by itself?also when scrolled into viewyes2Runs longer than 5 s?Reveal (up to 2 s): noyes3Next to other content?Text, buttons, formsyesPause, stop or hidemust be possibleOne “no” and 2.2.2 does not apply.Self-updating content such as counters:skip question 2 (no 5 s exception).Sources: W3C, WCAG 2.2 and Understanding WCAG 2.2 (criterion 2.2.2); XICflow documentation, brand and design (reveal defaults)
  • Giving feedback: a button that gives way briefly when tapped, or a form that visibly turns into a confirmation after sending, shows that something has happened.
  • Showing origin: a menu that slides in from the side, or an answer that expands in the FAQ, makes clear where the new content comes from and how it goes away again.
  • Ordering a sequence: service cards that appear one after another as they scroll into view read as a sequence rather than a block.
  • Marking arrival: a single, calm reveal at the start of a section sets a rhythm while scrolling without delaying the content.

All four jobs have one thing in common: the motion is short, runs once and is followed by stillness. It accompanies the content, it does not replace it. Trouble starts where motion becomes a permanent state: the slider that shows a new message every few seconds, the marquee that runs across the screen without end, the background that shifts against the foreground while scrolling. Elements like these compete with the actual content for attention, and because the eye jumps to movement, they often win. As a rule of thumb: motion that answers a visitor's question can stay; motion that only exists to attract attention needs a good reason, a short duration and a way to stop it. What belongs on the first screen of a home page and what clutters it is covered in the article on the first screen of the home page.

What WCAG 2.2 says about motion

WCAG is not a law but a technical standard from the W3C against which accessibility can be tested.

Laws and standards refer to it; whether and how the German Accessibility Strengthening Act (BFSG) applies to your business is explained in the article on accessible websites under the BFSG. WCAG success criteria are arranged in levels: A is the base level, AA builds on it and includes A, AAA goes beyond (W3C, WCAG 2.2). Three criteria matter most for motion, and they sit at different levels.

Scroll table sideways

CriterionLevelWhat it coversWhat it means for your site
2.2.2 Pause, Stop, HideAMoving, blinking and scrolling content and self-updating content that starts by itself and sits next to other contentIf motion runs for longer than five seconds, visitors need a way to pause, stop or hide it; for self-updating content this applies regardless of duration
2.3.1 Three Flashes or Below ThresholdAFlashes and strong flickerNothing on the page flashes more than three times per second, unless the flashes stay below the defined thresholds
2.3.3 Animation from InteractionsAAAMotion triggered by an action, such as scrolling or clickingSuch motion can be switched off unless it is essential to the function or the message

Criterion 2.2.2 sits at base level A and is therefore part of every AA conformance. For moving, blinking and scrolling content its wording names three conditions: it starts automatically, it lasts more than five seconds, and it is presented in parallel with other content (W3C, WCAG 2.2). If all three apply, visitors need a mechanism to pause, stop or hide it, unless the motion is part of an activity where it is essential. For content that updates itself, such as a news line that changes at fixed intervals, the same duty applies without the exception for short durations; here visitors may alternatively control how often it updates (W3C, Understanding WCAG 2.2). Why five seconds? The W3C explains that this is long enough to get attention but short enough for a user to wait out the distraction (W3C, Understanding WCAG 2.2). According to the W3C's explanations, motion also starts by itself when it is triggered by an indirect interaction, such as scrolling an element into view or hovering over it with the mouse (W3C, Understanding WCAG 2.2). A reveal on scroll therefore falls under the criterion in principle, but is not affected as long as it comes to rest in less than five seconds. For reveals, this makes criterion 2.3.3 more important, as it deals explicitly with motion triggered by interactions.

Reduced motion is Level AAA

Criterion 2.3.3, under which motion triggered by interaction can be switched off, sits at Level AAA (W3C, WCAG 2.2). If you aim for AA conformance, you do not have to meet it, and a website should not present its support for reduced motion as a legal obligation. It is still worth doing: it takes a few lines of CSS and helps exactly the people for whom motion is physically hard to bear.

Who listens to reduced motion

Phones, tablets and computers have a setting in their accessibility options that lets people ask for less motion. A website reads it through the CSS query prefers-reduced-motion.

According to the specification, the value reduce means that the user prefers an interface that removes or replaces the kinds of motion-based animation that trigger discomfort for people with vestibular motion sensitivity or distraction for people with attention deficits (W3C, Media Queries Level 5). Vestibular refers to the balance organ in the inner ear; according to the W3C, reactions range from dizziness to nausea and headaches (W3C, Understanding WCAG 2.2). Browsers support the query widely, yet only about half of all pages use it in their CSS. The HTTP Archive's Web Almanac analysed for 2025 which user preference queries appear in websites' CSS: prefers-reduced-motion is the most widely used, appearing on 49.99 percent of desktop and 50.55 percent of mobile pages (HTTP Archive Web Almanac 2025). Put the other way round: the query does not appear in the CSS of roughly every second page. If such a page has animations and does not check the setting by script either, they run the same for every visitor, including those who have explicitly asked their device for less motion. A pattern that serves both cases from the start looks like this:

Reveal only when motion is welcome
/* Starting point: content is visible, even without a script */
.reveal {
  opacity: 1;
  transform: none;
}

/* Only with a running script and no wish for less motion */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    transition: opacity 600ms ease-out, transform 600ms ease-out;
  }
  .js .reveal:not(.in-view) {
    opacity: 0;
    transform: translateY(24px);
  }
}

Two things make this pattern robust. First, the starting state is visible: elements are only hidden before their reveal once a script on the page has set the class js and the visitor has not asked for reduced motion. If the script fails or the setting is active, the content is there at once. Second, the reveal only changes opacity and position. A common mistake is the opposite: content is set to invisible in the stylesheet and waits for a script to bring it out. If the script loads slowly or not at all, the section stays empty and the visitor sees a gap.

Reducing is not banning

Reduced motion does not demand that every change disappears. The W3C does not count changes of colour and opacity that leave the size, shape and position of an element unchanged as motion animation (W3C, Understanding WCAG 2.2). A gentle cross-fade can therefore stay while gliding, zooming and tilting are dropped. If you prefer to keep it simple, switch off all reveals when the setting is active.

Reveals on scroll: duration, delay, curve

A widespread form of motion on business websites is the reveal on scroll: a section comes into view and its elements appear with a short movement. Whether this feels calm or restless depends on three settings and a handful of rules.

Duration

How long the movement runs. Short movements feel decisive, long ones feel sluggish and hold the reader up. The defaults in XICflow range from 550 to 800 milliseconds depending on the movement (XICflow documentation).

Delay

The waiting time before the start. It staggers elements so that cards appear one after another rather than all at once. Kept short, it creates order; set generously, it leaves visitors looking at empty space.

Curve

How the speed changes over time, known as easing. A curve that starts briskly and eases out feels natural, because things in the real world slow down before they come to rest. Uniform motion, by contrast, feels mechanical.

  • One consistent type of movement per page instead of effects that change from section to section and look like a sample catalogue.
  • Only move elements that open a section or form a sequence: heading, cards, image. Body text appears without its own movement so that it can be read straight away.
  • Each reveal runs exactly once. Visitors who scroll back up see the finished section, not the same movement again.
  • Short distances instead of long journeys: the "Fade in from below" movement in XICflow shifts an element by 24 pixels (XICflow documentation) and feels like a breath; a flight across the screen, by contrast, feels like an event and is hard on people with motion sensitivity.
  • Forms, prices and contact details appear without delay. What a visitor needs to get in touch does not wait for an animation.

Sliders, marquees and counters: the five-second limit

Unlike a reveal, sliders, marquees and counters keep running while the visitor reads. These are exactly the cases criterion 2.2.2 is meant for.

A slider that shows the next slide by itself every few seconds starts automatically, sits next to other content and does not stop after five seconds; it therefore needs a way to pause it (W3C, WCAG 2.2). The same applies to a marquee of services or customer logos that runs endlessly, and to a looping background video. How to add videos with subtitles and without loading ballast is shown in the article on videos on your website. What matters is what the pause looks like. The W3C makes clear that an animation that only stops while focus is on it and starts again afterwards does not count as a mechanism to pause, because it makes the page unusable during the pause (W3C, Understanding WCAG 2.2). The same reasoning applies to a marquee that only stands still under the mouse pointer, and anyone using a finger or a keyboard has no mouse pointer anyway. What works is a visible "Pause" button that can be reached by keyboard and announces its state, or motion that ends by itself within five seconds. If a page has several moving elements, the W3C recommends a single control that pauses all of them at once (W3C, Understanding WCAG 2.2).

Scroll table sideways

ElementStarts by itself?What 2.2.2 requires
Reveal when scrolled into viewYes, through scrollingNothing, as long as it comes to rest within five seconds
Slider with automatic advanceincluded Pause, stop or hide
Slider that only advances on clicknot included No pause needed; keyboard operation of the arrows is required by criterion 2.1.1
Marquee of logos or servicesincluded Pause, stop or hide
Countdown to the end of an offerYes, it updates itselfPause, hide or adjustable frequency, with no exception for short durations
Loading indicator while nothing can be usedincluded Can count as essential if it shows progress
Looping background videoincluded Pause, stop or hide

With sliders it is also worth asking whether they earn their space. Whatever sits on a later slide is seen only by visitors who wait or click on; for the core message of a page, that is an uncertain place. If you want to show customer testimonials or project photos, a slider for browsing works well: the visitor decides when the next slide comes, and 2.2.2 does not apply in the first place. Other points then count, such as arrows that can be reached by keyboard and have a clearly visible focus. Which contrasts buttons and focus outlines need is explained in the article on brand colours with sufficient contrast.

A counter is motion too

A countdown to the end of an offer updates itself and therefore falls under the second part of 2.2.2, which has no exception for short durations (W3C, Understanding WCAG 2.2). A written date often carries the same information without motion: "Offer valid until the end of November". If you use a counter, check whether visitors can hide or pause it. And the deadline has to be real: a counter that starts again after it runs out suggests a scarcity that does not exist. What a genuine cut-off date looks like on a page is shown in the article on remaining budgets at year end.

What may stay

The movement created by scrolling itself is essential and allowed according to the W3C, because the visitor controls it. Anything a page adds on top of scrolling should step back as soon as someone asks for less motion.

Motion that does not cost loading time

Animations also affect the technology underneath. Movements using the CSS properties transform and opacity only change how an element looks, not the layout of the page.

Animating width, height, spacing or position via top and left, on the other hand, forces the browser to recalculate the layout and pushes surrounding content around. The Web Almanac calls such animations non-composited and describes how they contribute to layout shifts. They are common: they appear on 40 percent of mobile pages and 44 percent of desktop pages (HTTP Archive Web Almanac 2025). Then there is weight. A reveal does not need a library: a few lines of CSS and a small observer that reports when an element comes into view are enough. Slider and animation libraries loaded for a handful of effects are part of the ballast described in the article on PageSpeed 100 with static delivery. Just as important: an animation must not delay the largest element on the first screen. A heading or hero image that only appears after a reveal makes the page feel slower and can worsen the measured loading value. The same principle applies to fonts that make text jump as they load; how to avoid that is shown in the article on website fonts.

  1. Go through the home page and two important subpages and note every element that moves without you doing anything: sliders, marquees, counters, videos, animated backgrounds.
  2. Time each of these elements. If it runs for longer than five seconds next to text or controls, look for the button to pause it (W3C, WCAG 2.2).
  3. Reach and use that button with the keyboard only. Motion that only stops under the mouse pointer is not enough.
  4. Switch on reduced motion in the accessibility settings of your phone or computer and reload the page. Reveals should disappear or turn into a simple cross-fade, and all content should be visible at once. The developer tools of common browsers can also simulate the setting.
  5. Switch off JavaScript in the browser and reload the page. If a section is missing, its visibility depends on a script.
  6. Check embedded videos and animated graphics for fast flicker. Anything that flashes more than three times per second does not belong on the page (W3C, WCAG 2.2).
This article is based on data from: W3C, Web Content Accessibility Guidelines (WCAG) 2.2, success criteria 2.1.1, 2.2.2, 2.3.1 and 2.3.3 (W3C Recommendation of 12 December 2024) and the accompanying explanations Understanding WCAG 2.2; W3C, Media Queries Level 5 (Working Draft of 19 February 2026); HTTP Archive Web Almanac 2025, chapters Accessibility and Performance; XICflow documentation, chapters Brand and design and Blocks, retrieved in October 2026.