Content that flashes or flickers can trigger seizures in people who are susceptible, and should be avoided.
Techniques
The best technique for addressing this issue is to avoid using content that flashes or flickers. A general rule is if content flashes more than three times per second, it’s potentially dangerous and should be avoided.
The W3C Web Content Accessibility Guidelines 2.1 have two success criteria related to this issue: Success Criterion 2.3.1 (Level A) allows flashing if it’s dim and confined to a small area, and provides a precise formula for measuring compliance. Success Criterion 2.3.2 (Level AAA) is more strict, and forbids flashing at all.
The Trace Center at the University of Maryland has developed a Photosensitive Epilepsy Analysis Tool (PEAT) for measuring whether websites, software applications, or videos are likely to cause seizures. The Trace Center acknowledges on their website that PEAT is “old in the tooth”, and has not been actively maintained as new video formats have emerged. Promisingly, their website also says “We are working on a new fully-open-source version that will be updated for new technologies (the current version is open-source except for a proprietary analysis engine we purchased the rights to use). It will also be free to use. No ETA for it as yet.”
Meanwhile, if you have content that you think might flash more than three times per second, assume it does and take steps to eliminate all doubt.