University of Maryland

News

A case study of a strobe GIF and photosensitive epilepsy

October 10th, 2022

Photosensitive epilepsy is a condition that can cause seizures when affected people view flickering lights, flashing in videos and video games, and bold, regular patterns. It is estimated that 1 in 4000 people have photosensitive epilepsy with it being most common in adolescents.

The Trace R&D Center (in the College of Information Studies at the University of Maryland) is doing research and building tools to check videos that might be hazardous. The current Photosensitive Epilepsy Analysis Tool (PEAT) is available for free for analyzing content from the web. We are working towards a new open-source version of PEAT, but there is no timeline for release yet.

An animated GIF of a spinning beacon light provides an interesting case. Below is a still from the GIF. (The animated GIF (flash warning!) is available.)

A still frame of an animated GIF of a spinning beacon light.

The Web Content Accessibility Guidelines (WCAG) 2.1 has guidance on flashing in Success Criteria 2.3.1. Basically, an animation or video is hazardous if the flashing is simultaneously too intense AND too fast AND too large.

Let’s start out with a manual inspection.

Is the flashing intense enough to be a hazard? Yes!

This needs no calculations. Going from white to dark is more than enough to meet the WCAG luminance threshold. Also, since the rotating light is red, it is likely to exceed the red flash threshold as well.

Is the flashing fast enough to be a hazard? Maybe.

The GIF has 17 frames that loop with 20 ms (milliseconds) between frames, meaning each loop and rotation of the light takes 340 ms. With 2.9 loops of the GIF per second, it falls below the WCAG threshold of 3 flashes per second. However, because of the rotation and the internal reflections within the strobing beacon, there may still be a hazard at a smaller scale.

Is the image large enough to be a hazard? Not at native size.

In WCAG, 25% of the pixels flashing within a 341 x 256 pixel rectangle is potentially hazardous. Thus, there may be a hazard if 21,824 pixels or more are involved with flashing. Since the image is only 128 pixels square natively (16,384 pixels total), it is too small natively to be a hazard.

However, if the image were to be made larger or scaled up on a page, then it might be hazardous.

Testing with Trace’s Photosensitive Epilepsy Analysis Tool – PEAT

To check the GIF, we made looping AVI videos of the beacon light at normal size, twice size, and triple size. This can be done by recording a browser using PEAT or through tools like Photoshop. Because of frame rate limitations of the current PEAT software* (only 25 or 30 fps, or frames per second, is accepted), we constructed the video by skipping every other frame to get a frame rate of 25 fps (instead of the original 50 fps). The following image shows the PEAT results for the triple-sized video.

Screenshot of the PEAT software showing a still from the GIF and a failing analysis.

The PEAT results shows that the triple-sized GIF exceeds both luminance flash and red flash thresholds.

The result

A single, spinning beacon light GIF is not hazardous at its native size (or smaller).

However, the size is the only factor that makes it non-hazardous.

  • If the spinning beacon were used in an enlarged size on a website, it would pose a hazard depending on its displayed size.
  • If multiple looping GIFs were displayed close together, it might also pose a hazard.

* NOTE: A new version of PEAT is under development

By Dr. J. Bern Jordan, an assistant research scientist in the College of Information Studies (iSchool) at the University of Maryland and core faculty at Trace R&D Center

Learn more about PEAT, photosensitive seizure disorders, and other Software and Tools available from the Trace R&D Center.