惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - Franky
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
IT之家
IT之家
J
Java Code Geeks
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
W
WeLiveSecurity
B
Blog RSS Feed
V2EX - 技术
V2EX - 技术
H
Heimdal Security Blog
S
Security @ Cisco Blogs
博客园 - 叶小钗
月光博客
月光博客
Webroot Blog
Webroot Blog
H
Hacker News: Front Page
N
News and Events Feed by Topic
P
Proofpoint News Feed
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Help Net Security
Help Net Security
S
Secure Thoughts
SecWiki News
SecWiki News
Last Week in AI
Last Week in AI
Hugging Face - Blog
Hugging Face - Blog
S
Schneier on Security
A
Arctic Wolf
博客园 - 司徒正美
T
Tor Project blog
T
Tenable Blog
量子位
D
DataBreaches.Net
PCI Perspectives
PCI Perspectives
T
The Exploit Database - CXSecurity.com
T
Threatpost
小众软件
小众软件
博客园 - 三生石上(FineUI控件)
Cloudbric
Cloudbric
T
The Blog of Author Tim Ferriss
N
News | PayPal Newsroom
Project Zero
Project Zero
S
Securelist
Forbes - Security
Forbes - Security
Hacker News - Newest:
Hacker News - Newest: "LLM"
B
Blog
L
LINUX DO - 热门话题
Security Archives - TechRepublic
Security Archives - TechRepublic
O
OpenAI News
C
Cisco Blogs
V
V2EX
P
Privacy & Cybersecurity Law Blog
Cisco Talos Blog
Cisco Talos Blog

TetraLogical Blog

Designing for people with reading disabilities - TetraLogical Designing for people who are D/deaf - TetraLogical Designing accessible documents - TetraLogical Introduction to creating accessible documents - TetraLogical Inclusive user research: vulnerable people - TetraLogical Designing for people who are blind - TetraLogical Designing for people with low vision - TetraLogical Meet the team: Niamh Madden - TetraLogical Designing for people with anxiety - TetraLogical Designing for people with disabilities - TetraLogical Accessible building blocks for the web videos - TetraLogical Common accessibility misconceptions - TetraLogical Common misconceptions about testing accessibility - TetraLogical Common misconceptions about implementing accessibility - TetraLogical Common misconceptions about WCAG - TetraLogical Common misconceptions about disability - TetraLogical Meet the team: Grace Snow - TetraLogical Sustainable accessibility in complex organisations: strategic foundations - TetraLogical Sustainable accessibility in complex organisations: organisational realities - TetraLogical Sustainable accessibility in complex organisations: external factors - TetraLogical Common misconceptions about screen readers - TetraLogical Guide to the Inclusive Design Principles - TetraLogical Meet the team: Ian Lloyd - TetraLogical Annotating designs using common language - TetraLogical Meet the team: Catriona Morrison - TetraLogical Championing inclusive language - TetraLogical Press release: TetraLogical launches accessible self-led training courses to help digital teams build confidence in accessibility - TetraLogical Why inclusive products are green products - TetraLogical Accessible Recruitment - TetraLogical Accessibility and the agentic web - TetraLogical Meet the team: Craig Abbott - TetraLogical Foundations: types of assistive technology and adaptive strategies - TetraLogical European Accessibility Act (EAA) FAQ - TetraLogical Screen reader HTML support tables - TetraLogical Interview with Lola Odelola - TetraLogical Understanding EN 17161 Design for All - TetraLogical Inclusive user research: building rapport - TetraLogical Foundations: Keyboard accessibility - TetraLogical Can generative AI write contextual text descriptions? - TetraLogical Understanding the European Accessibility Act (EAA) - TetraLogical Meet Josh: a sportsman who has spinal muscular atrophy - TetraLogical Meet Jonathan: a photographer who has ADHD - TetraLogical Foundations: grouping forms with `<fieldset>` and `<legend>` - TetraLogical XR Accessibility: for people with moving disabilities - TetraLogical Meet Andre: a music producer and blind screen reader user - TetraLogical Foundations: types of disability - TetraLogical Meet Lauren: a film editor who has ADHD - TetraLogical Meet Steve: a photographer who is deaf and low vision - TetraLogical Foundations: form validation and error messages - TetraLogical Meet Hasmukh: a blind cricketer and screen reader user - TetraLogical XR Accessibility: for people with hearing disabilities - TetraLogical XR Accessibility: for people with thinking disabilities - TetraLogical XR Accessibility: for people with seeing disabilities - TetraLogical Introduction to XR Accessibility - TetraLogical Foundations: labelling text fields with input and label - TetraLogical Design patterns and WCAG - TetraLogical Does WCAG 2.2 apply to native apps - TetraLogical Why are my live regions not working? - TetraLogical Building a culture of accessibility - TetraLogical When to use tabindex= Accessibility foundations - TetraLogical Meet the team: Demelza Feltham - TetraLogical Can generative AI help write accessible code? - TetraLogical Meet the team: Steve Faulkner - TetraLogical Meet the team: Gez Lemon - TetraLogical Keyboard accessibility myths and WCAG - TetraLogical Amendment to the Public Sector Accessibility Regulations - TetraLogical What Considerations for TV user interface accessibility - TetraLogical Meet the team: Alistair Duggin - TetraLogical Sticky content: focus in view - TetraLogical The only accessibility specialist in the room - TetraLogical Meet the team: Ian Pouncey - TetraLogical Meet the team: Dean Holden - TetraLogical Meeting WCAG Level AAA - TetraLogical Foundations: accessible names and descriptions - TetraLogical Inclusive XR: accessible augmented reality experiences - TetraLogical Foundations: pointer gestures - TetraLogical Meet the team: Graeme Coleman - TetraLogical Adding sign language to videos - TetraLogical Foundations: introduction to WAI-ARIA - TetraLogical Meet the team: Joe Lamyman - TetraLogical Inclusive XR: accessible 3D experiences - TetraLogical Foundations: visible focus styles - TetraLogical Foundations: target sizes - TetraLogical Meet the team: Henny Swan - TetraLogical Meet the team: Ela Gorla - TetraLogical Foundations: native versus custom components - TetraLogical Foundations: HTML semantics - TetraLogical Accessibility and supporting Internet Explorer - TetraLogical Meet the team: Felicity Miners-Jones - TetraLogical Accessibility and QR codes - TetraLogical Inclusive user research: recruiting participants - TetraLogical Research insight: accessibility of images - TetraLogical Meet the team: Léonie Watson - TetraLogical Android accessibility: roles and TalkBack - TetraLogical Accessible design systems - TetraLogical Meet the team: Patrick H. Lauke - TetraLogical Inclusive user research: analysing findings - TetraLogical How to write user stories for accessibility - TetraLogical
Foundations: animations and flashing content - TetraLogical
2022-01-10 · via TetraLogical Blog

Posted on by Patrick H. Lauke in Design and development

Tags: Foundations, WCAG

Animation and movement can add to the visual appeal of content, but poorly designed animations can cause problems for many people unless they are implemented correctly.

The types of issues animations and flashing content can cause are:

  • Seizures can be triggered in people with photosensitive epilepsy by rapidly flashing or bright lights, with red and high-contrast flashes carrying the most risk
  • Symptoms like motion sickness, headaches and nausea can be triggered in people with vestibular disorders when looking at large animations
  • Concentration may be difficult or impossible for people with cognitive disabilities that affect attention and focus
  • Distraction for people with low vision browsing with screen magnification where movement can take up all or large parts of the screen

Adding animations or flashing content

The first thing to consider is whether you need to use animation or flashing content. Only include them if they enhance the user experience without causing undue distraction. Make sure that animations and flashing are only used as additional “eye-candy”, and give people control over the animations and movement. For example movement can be removed or suppressed without affecting the meaning of the content and without loss of important information.

Rules for animations

Avoid using animated content that starts automatically — for example on page load, or animation triggered by any event outside of direct user interaction such as a timer or external event — and lasts for longer than five seconds.

If the use of animated content is unavoidable, add a mechanism for people to pause/hide the animation. Generally, the mechanism can be a control/button on the page itself, or an option in a site-wide user account profile or set of preferences. This is particularly important for large “hero” type animated panels, or panels that use auto playing video.

'Video Hero Banner - Simple. Accessible. Performant.' showing a video background and a pause button

In the case of more minor animations, for example animated effects on controls, designed to catch people’s attention, where it wouldn’t be possible to add separate play/pause controls, consider stopping the animation effect after five seconds.

Consider keeping the animation effect very subtle for animations that happen due to user interaction — such as parallax scrolling effects or animations that start once a control has been triggered. Avoid excessively fast and big movements that last for more than a few seconds.

A 'Loading' button with a spinner icon

Another suggestion is to take advantage of the prefers-reduced-motion media query. CSS-based animations can be set to only play if a person has not enabled the relevant reduced motion setting in their browser/operating system. See for instance Defensive prefers-reduced-motion use - no motion first design).

/* non animated styles */

@media (prefers-reduced-motion: no-preference) {
  /* specific animation styles, only shown if the browser
     supports the media query and an explicit preference
     for reduced motion has not been set*/
}

You can also provide explicit fallback/alternative styles that come into effect if a person did enable the setting for reduced motion:

@media (prefers-reduced-motion: reduce) {
  /* alternative styles when a preference for
     reduced motion has been set*/
}

This media query feature can also be queried from JavaScript, and can be used to inform the default state of any custom play/pause buttons that are added to animations.

const mqList = window.matchMedia('(prefers-reduced-motion:no-preference)');

if (mqList.matches) {
  /* the browser supports the media query, and no preference
     for reduced motion has been set.
     consider it safe to start playing animations by default */
} else {
  /* the browser either doesn’t support the media query, or an
     explicit preference for reduced motion has been set.
     start off with animations paused */
}

Rules for flashing content

Even if you provide explicit play/pause controls for animations, or take advantage of the prefers-reduced-motion media query, there are additional requirements if your animations include flashing content. People may be severely affected by flashing content even before they get a chance to pause/stop an animation or explicitly set a preference in their browser. In extreme cases, a severe seizure can put someone in hospital, so there are critical rules to follow when using content that flashes:

  • Content must not flash more than 3 times per second
  • Do not flash red or colours on the red spectrum
  • Keep the area of flashing content small

The safest option is usually to avoid flashing altogether. If it’s absolutely necessary to flash content, make sure the flashing frequency is very low.

Tips for animations and flashing content

When designing animations and movement consider it's goal:

  • Animation to communicate change on a page such as an accordion opening, is better than animation intended to disrupt and grab attention such as a flashing advert
  • Animation caused by a person interacting with the page is better than animation that occurs automatically

For flashing content:

  • Check any videos you host to not have flashing content, if they do add a warning at the start of the video

More information

Next steps

Read more accessibility foundations posts or sign up for Accessibility Unlocked, our free six-day newsletter series designed to help you kick-start accessibility.