Skip to content
easeweb
Search topics

Striped backgrounds and op-art hero images that seem to move

A hero background of fine black and white stripes never flashes, yet a still pattern this large can seem to move and can trigger seizures.

Best practice
No WCAG criterion requires it
Related WCAG 2.2
SC 2.3.1A
Required by
Not required by Section 508 or EN 301 549
Broken background: repeating-linear-gradient(90deg, #111 0 8px, #fff 8px 16px);
The accessibility problem illustrated: Seizures:Why won't it keep still?
01

The problem

People with pattern-sensitive epilepsy can't look at the home page safely, and many others see its stripes shimmer, and some get a headache

02

Try it

Apply each fix and see which limit it brings the stripes under

A large striped area is itself the hazard, so the broken hero is covered. Press “Show the stripes” to look briefly. The fixes are safe to view.

Broken Can you fix this?

BrokenFine black and white stripes
Covered: stripes like these fill the whole hero

The summer edit

Linen, cotton and canvas, made to last.

Shop the edit
MeasuredThis heroUnder the limit at
Stripes across0 pairs5 pairs or fewer
Contrast99%Under 10% of white
Area0%A quarter of a 341 × 256 view

Under the limits One measure is under, so the pattern is too. WCAG 2.3.1 passes either way: nothing flashes.

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Use a few broad stripes, or keep fine ones soft or small

Before
BrokenFine black and white stripes
<section class="hero">  <div class="hero-card">    <h1>The summer edit</h1>    <p>Linen, cotton and canvas, made to last.</p>    <a href="/summer">Shop the edit</a>  </div></section>
What is wrong4 points
  • The stripes are 8 pixels wide and repeat every 16, so the hero holds 80 light-dark pairs at 1,280 pixels wide, and more on a wider screen.
  • Black against white is close to the strongest contrast a screen can show.
  • They fill the whole hero around the card, far more than a quarter of a 341 × 256 pixel field.
  • Nothing moves, so no checker reports it.
After

A few broad stripes

<section class="hero">  <div class="hero-card">    <h1>The summer edit</h1>    <p>Linen, cotton and canvas, made to last.</p>    <a href="/summer">Shop the edit</a>  </div></section>
How it is fixed2 steps
  1. Give the stripe widths in percentages of the hero: 12.5% each, so one light-dark pair is a quarter of its width. The hero holds four pairs at any screen width, under the five both sets of guidelines count from.
  2. Keep the black and white. Each pair is now 320 pixels wide on a 1,280-pixel screen, about 7 degrees at arm's length: far coarser than the spacing that troubles people most.

This fixes the Before at every width and zoom, and keeps the bold black and white look. 2.3.1 still passes, since nothing flashes.

04

Verify the fix

5 checks, no mouse.

Test with: Zoom, Contrast measurement, Flash analysis

0 of 5 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat after the design, a campaign image or the pattern library changes.

Limits

This is a starting pattern, not a guarantee for every application, and not medical advice. The thresholds were written for television viewed across a room, and carrying them to a web page, through WCAG's own estimate of a 10-degree field, is this guide's reading; a phone held close or a large monitor changes how much of the view a pattern fills. Keeping under them lowers the risk without removing it: the pattern guidelines Wilkins, Emmett and Harding proposed in 2005 are estimated to protect at least two thirds of susceptible people, not all, and some people react to patterns that pass. The audit has no check for patterns, so every one needs a person's eye.

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, and nothing here is medical advice.

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.

See the service