Seizures and physical reactions
WCAG Guideline 2.3 (AA) and success criteria
Learn how to design content in a way that doesn’t cause seizures or physical reactions.
Last updated on
Limit content to 3 flashes or below (Level A, 2.3.1)
Some types of seizures can be triggered by flashing or flickering content. Red flashes are worse than other colours for people with photosensitive epilepsy or similar conditions. When possible, avoid using flashing or flickering content. If it’s necessary, it must not have more than 3 flashes in a one-second period. They also must meet the general and red flash thresholds defined by WCAG. These are specific brightness thresholds.
The general flash threshold is the maximum brightness of flashes. To meet this threshold, they must be below 20.0 candela per square meter (cd/m²). The red flash threshold is even dimmer at below 6.0 cd/m².
Controlling flash speed
You can use Cascading Style Sheets (CSS) to define the duration and time between flashes. By adjusting the values of animation-duration and animation-timing-function, you can control the flash speed.
For example:
/* Define the animation properties */
@keyframes flash {
0% { opacity: 0; }
50% { opacity: 1; }
100% { opacity: 0; }
}
/* Apply the animation to an element */
.flashing-element {
animation-name: flash;
animation-duration: 1s; /* duration of each flash */
animation-iteration-count: infinite;
animation-timing-function: linear; /* interval between each flash */
}
In this example, the flash animation has a duration of 1 second. The animation-timing-function property is set to linear, meaning the time interval between flashes is constant.
Controlling the brightness of flashes
You can also use CSS to adjust the brightness. One way to do this is by adjusting the opacity using CSS keyframe animations. By setting it to a lower value during the animation, you can reduce the overall brightness to meet the thresholds.
How to use flashes
- Do not include elements in your web pages that produce rapid or excessive flashing effects. This refers to quick changes in brightness or colour
- Make sure any flashing content, such as animations, videos or visual effects, does not exceed 3 flashes within a one-second time period
- Consult with individuals who have a history of photosensitive epilepsy or are prone to seizures