Rapid brightness changes or flashing effects


A flash in web accessibility refers to a rapid and intense change in brightness between two opposite visual states. When this type of flickering exceeds 3 occurrences per second and crosses certain intensity thresholds, it can trigger photosensitive epilepsy seizures. WCAG standards impose strict limits to protect users.


On December 16, 1997, a sequence of red-blue flashes in a Pokémon episode sent 685 Japanese children to the hospital. Seizures and loss of consciousness by the hundreds. The cause: light alternations at approximately 12 Hz for four seconds. This is the founding incident of anti-flash rules on screens.

#What WCAG forbids

Criterion 2.3.1 (Level A) sets a clear rule: no content must flicker more than three times per second, unless the flash remains below the thresholds for general luminance and saturated red.

Red is treated separately. People with photosensitive epilepsy are more reactive to it than to any other color.

This criterion is part of WCAG's non-interference requirements: even if your page targets only Level A, 2.3.1 applies to all content without exception. A compliant carousel does not exempt a video that flashes.

#Pitfalls developers overlook

Videos are not the only culprits. An animated GIF, an aggressive CSS transition, a canvas that redraws rapidly, a JavaScript animation: any content capable of alternating between light and dark at high frequency is at risk. The MDN documentation lists seven technologies at risk.

Confusing "flickering" with "flashing." A text cursor flickers. That is not a flash. A flash involves a change in luminance intense enough to occupy a significant area of the screen. This distinction matters for conformance testing.

Forgetting prefers-reduced-motion. It is not sufficient to comply with 2.3.1, but it is an additional layer of protection. Users who activate this preference in their operating system are signaling a real need:

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

#How to test

The Trace Center provides PEAT (Photosensitive Epilepsy Analysis Tool), a free tool that analyzes videos and screenshots to detect at-risk sequences. Netflix uses it internally to verify its productions before release.

#In summary

No more than three flashes per second. Be wary of saturated red. Test your videos and animations with PEAT. And respect prefers-reduced-motion: your users are asking you for a reason.

Share this article

Learn more