Flashing content checker

Content that flashes more than three times a second can cause a seizure, which is why WCAG 2.3.1 exists and why it is one of the few accessibility rules with a physical consequence rather than an inconvenient one. This examines every frame of a video against the general flash threshold and the separate, stricter rule for saturated red, and tells you the second it happens in. The video is never played back to you: the file is decoded with the picture hidden, so running this is safe for the people most likely to need it.

Drop in a video. Every frame is examined against the seizure thresholds in WCAG 2.3.1, and you get the second the worst of it happens in.

The video is never played back to you. It is decoded with the picture hidden, because a tool for finding content that causes seizures must not show that content to the person checking it.

Frequently asked questions

Is my video uploaded?

No. It is decoded in this tab by code that came with the page and never leaves the machine. The site’s security policy sets connect-src ‘none’, so the browser blocks network requests from these pages, so nothing could be sent even if the code tried. A video is also the sort of file that is slow and expensive to upload, so this is faster than the alternative as well as more private.

Why will it not show me the video?

Because this is a tool for finding content that can cause seizures, and the people most likely to run it are the people with the most reason not to watch it. There is no option to show it. Before this was built it was measured whether the browser would still hand over every frame with the picture hidden: it does, all 89 frames of a three-second clip, so nothing is given up by hiding it.

What exactly is a flash?

A pair of opposing changes in brightness: dark to light and back, or light to dark and back. Each change has to be at least a tenth of the full range in relative luminance, and the darker of the two states has to be below 80 percent of full brightness. A flicker between two bright whites is not a flash, because the eye is not being driven between light and dark, and counting it would fail half the video on the internet for nothing.

Why does a small strobe in a corner fail?

Because the standard is not written about the whole picture. The area threshold is a quarter of any 341 by 256 rectangle within the content, which at 1024 by 768 is a ninth of the screen, so about three percent of the frame is enough. A checker that averages the whole frame passes a corner strobe, and a corner strobe is exactly the sort of thing the rule was written for. This slides a window across every position in the frame.

What is the red rule for?

Saturated red provokes seizures at rates the general threshold allows, so it has a separate limit. A saturated red is one where red makes up at least eighty percent of the total of the three channels. Content can pass the general rule and fail this one, which is the case a checker without it will tell you is fine.

Why does it take as long as the video?

Because the browser is asked for every frame it shows, and it only shows them at the speed the video plays. Playing faster makes it present fewer frames than it decodes, and a frame that went past unexamined is a flash that might have been in it. Seeking through the file instead is slower still and lands on keyframes rather than on every frame.

What does it mean when it says it could not check the whole file?

That some frames went past without being examined. The browser reports how many frames it has shown, so the gap is counted exactly rather than guessed at, and a run with any gap in it says so instead of reporting a pass. This is the one check here where being wrong in the reassuring direction has a physical cost, so uncertainty comes out as uncertainty.

Does passing mean the content is safe?

It means nothing in it crossed the two thresholds, measured in proportions of the frame. The standard is written about somebody at a typical distance from a 1024 by 768 screen, and a phone held close or a projector across a hall are the same file filling very different amounts of the visual field. This also only examines video files: it cannot see a page where the flashing comes from CSS, a canvas or an advertisement.