SlideShare una empresa de Scribd logo
1 de 50
Making Accessible Web Animations
CSUN 2020
Julie Grundy
Digital Accessibility Consultant
@stringy
12 March 2020Slides: http://bit.ly/mawa3
New animation tools
• CSS transitions and keyframes
• CSS queries
• Web Animations API for JavaScript
Inaccessible Animations
Attention deficits
35% of adults aged 40 years or older
in the United States—approximately
69 million Americans—have
experienced some form of vestibular
dysfunction.
Vestibular Disorders Association
www.vestibular.org
Seizures and
migraines
Why animate?
Animation has brain benefits!
Val Head
Source: Designing Interface Animation, 2016
Visual processing
Visual processing
Margaret Livingstone, The Biology of Seeing
Where System
What System
What System
• Colour
•Shapes
• Objects
•Faces
Margaret Livingstone, The Biology of Seeing
Where System
• Motion
•Edges
• Contrast
Source: Margaret Livingstone, The Biology of Seeing
By JJ Harrison (https://www.jjharrison.com.au/) - Own work, CC BY-SA
4.0
Animation itself is a visual
representation of change over time
Rachel Nabors
Source: Animation At Work, 2017
Two systems
Where System
What System
Differences
Feedback
Orientation
The best of both worlds
Give your users control over
animation with a toggle or setting
www.variablefonts.dev
Respect your user's OS or browser
settings for reduced motion
/* Type query */
@media screen and (min-width: 900px) {}
/* User preference query */
@media (prefers-reduced-motion: reduce) {}
Media queries
.modal-dialog {
transition: transform 1s ease-out;}
.modal-zoom .modal-dialog {
transform: scale(0.1);
}
@media (prefers-reduced-motion: reduce) {
.modal-zoom .modal-dialog {
transition: none;
}
}
Prefers reduced motion
Support
Source: www.caniuse.com
Don't flash too quickly
How quickly?
www.bigassmessage.com
How quickly?
www.bigassmessage.com
Flash speed
Web pages do not contain anything that flashes
more than three times in any one second period,
or the flash is below the general flash and red flash
thresholds.
WCAG SC 2.3.1
Flash speed
Web pages do not contain anything that flashes
more than three times in any one second period,
or the flash is below the general flash and red flash
thresholds.
WCAG SC 2.3.1
Hide things for everyone,
not just mouse users
function makeUnfocusable(where) {
// find all the focusable elements
const focusableThings = where.querySelectorAll(focusableElements)
}
Manage tabindexes
function makeUnfocusable(where) {
// find all the focusable elements
const focusableThings = where.querySelectorAll(focusableElements)
// turn them into an array
focusableThings = Array.prototype.slice.call(focusableThings)
}
Manage tabindexes
function makeUnfocusable(where) {
// find all the focusable elements
const focusableThings = where.querySelectorAll(focusableElements)
// turn them into an array
focusableThings = Array.prototype.slice.call(focusableThings)
// loop through the array to change their tabindex values
focusableThings.forEach(function(thing) {
thing.setAttribute('tabindex', '-1')
})
}
Manage tabindexes
// animate closed by adding a CSS class
sbSidebar.classList.add('closed-sidebar')
Adding display: none …
// animate closed by adding a CSS class
sbSidebar.classList.add('closed-sidebar')
// update button content, ARIA, etc
updateButtonState(sbToggler)
Adding display: none …
// animate closed by adding a CSS class
sbSidebar.classList.add('closed-sidebar')
// update button content, ARIA, etc
updateButtonState(sbToggler)
// add display: none via a CSS class
sbSidebar.classList.add('hidden-all')
.hidden-all { display: none; }
Adding display: none …
// animate closed by adding a CSS class
sbSidebar.classList.add('closed-sidebar')
// update button content, ARIA, etc
updateButtonState(sbToggler)
// add display: none via a function
sbSidebar.addEventListener('transitionend', hideMe(sbContent))
function hideMe(me) {
me.classList.add('hidden-all')
}
.hidden-all { display: none;}
Adding display: none …
// remove display: none ASAP
sbContent.classList.remove('hidden-all')
// animate open
sbSidebar.classList.toggle('closed-sidebar')
// update button
updateButtonState(sbToggler)
Removing display: none
Accessible Animations
• Give your users control with a toggle or setting
• Respect settings for reduced motion
• No more than 3 flashes per second
• Make sure hidden content is hidden from
everyone
Let’s chat
@Intopi
a
Intopia intopia.digital
hello@intopia.digita
l
Slides: http://bit.ly/mawa3
Twitter: @stringy

Más contenido relacionado

Similar a Making Accessible Web Animations

Structured Data Presentation
Structured Data PresentationStructured Data Presentation
Structured Data Presentation
Shawn Day
 
PHYSICALLY-BASED MODELLING OF ROBOTIC EXPLORERS EMPLOYING TH
PHYSICALLY-BASED MODELLING OF ROBOTIC EXPLORERS EMPLOYING THPHYSICALLY-BASED MODELLING OF ROBOTIC EXPLORERS EMPLOYING TH
PHYSICALLY-BASED MODELLING OF ROBOTIC EXPLORERS EMPLOYING TH
Darin Rajan
 

Similar a Making Accessible Web Animations (20)

Java getstarted
Java getstartedJava getstarted
Java getstarted
 
Fem presentation
Fem presentationFem presentation
Fem presentation
 
Make your Backbone Application dance
Make your Backbone Application danceMake your Backbone Application dance
Make your Backbone Application dance
 
Metron seas collaboration
Metron seas collaborationMetron seas collaboration
Metron seas collaboration
 
Structured Data Presentation
Structured Data PresentationStructured Data Presentation
Structured Data Presentation
 
An Event Apart Boston: Principles of Unobtrusive JavaScript
An Event Apart Boston: Principles of Unobtrusive JavaScriptAn Event Apart Boston: Principles of Unobtrusive JavaScript
An Event Apart Boston: Principles of Unobtrusive JavaScript
 
SaturdaysAI: CNN in Underwater Robotics and eHealth
SaturdaysAI: CNN in Underwater Robotics and eHealthSaturdaysAI: CNN in Underwater Robotics and eHealth
SaturdaysAI: CNN in Underwater Robotics and eHealth
 
Introduction to Information Visualization (Part 1)
Introduction to Information Visualization (Part 1)Introduction to Information Visualization (Part 1)
Introduction to Information Visualization (Part 1)
 
Query by Image (이미지로 이미지 검색하기)
Query by Image (이미지로 이미지 검색하기)Query by Image (이미지로 이미지 검색하기)
Query by Image (이미지로 이미지 검색하기)
 
Lecture 2.B: Computer Vision Applications - Full Stack Deep Learning - Spring...
Lecture 2.B: Computer Vision Applications - Full Stack Deep Learning - Spring...Lecture 2.B: Computer Vision Applications - Full Stack Deep Learning - Spring...
Lecture 2.B: Computer Vision Applications - Full Stack Deep Learning - Spring...
 
Thinking Outside the Synchronisation Quadrant
Thinking Outside the Synchronisation QuadrantThinking Outside the Synchronisation Quadrant
Thinking Outside the Synchronisation Quadrant
 
(deep) reinforcement learning - CAB420
(deep) reinforcement learning - CAB420(deep) reinforcement learning - CAB420
(deep) reinforcement learning - CAB420
 
Photosynth - a 3d photo experience!
Photosynth - a 3d photo experience!Photosynth - a 3d photo experience!
Photosynth - a 3d photo experience!
 
Advanced #6 clean architecture
Advanced #6  clean architectureAdvanced #6  clean architecture
Advanced #6 clean architecture
 
SAX-VSM
SAX-VSMSAX-VSM
SAX-VSM
 
Android architecture components - how they fit in good old architectural patt...
Android architecture components - how they fit in good old architectural patt...Android architecture components - how they fit in good old architectural patt...
Android architecture components - how they fit in good old architectural patt...
 
Designing Usable Interface
Designing Usable InterfaceDesigning Usable Interface
Designing Usable Interface
 
Using Semantics to personalize medical research
Using Semantics to personalize medical researchUsing Semantics to personalize medical research
Using Semantics to personalize medical research
 
PHYSICALLY-BASED MODELLING OF ROBOTIC EXPLORERS EMPLOYING TH
PHYSICALLY-BASED MODELLING OF ROBOTIC EXPLORERS EMPLOYING THPHYSICALLY-BASED MODELLING OF ROBOTIC EXPLORERS EMPLOYING TH
PHYSICALLY-BASED MODELLING OF ROBOTIC EXPLORERS EMPLOYING TH
 
Multi-modal embeddings: from discriminative to generative models and creative ai
Multi-modal embeddings: from discriminative to generative models and creative aiMulti-modal embeddings: from discriminative to generative models and creative ai
Multi-modal embeddings: from discriminative to generative models and creative ai
 

Más de Intopia

Más de Intopia (20)

The value of measuring your accessibility maturity
The value of measuring your accessibility maturityThe value of measuring your accessibility maturity
The value of measuring your accessibility maturity
 
Annotating designs for accessibility
Annotating designs for accessibilityAnnotating designs for accessibility
Annotating designs for accessibility
 
Making Content Creation Tools Accessible
Making Content Creation Tools AccessibleMaking Content Creation Tools Accessible
Making Content Creation Tools Accessible
 
Annotating designs for accessibility
Annotating designs for accessibilityAnnotating designs for accessibility
Annotating designs for accessibility
 
The why, when and how of including people with disability in the design process
The why, when and how of including people with disability in the design processThe why, when and how of including people with disability in the design process
The why, when and how of including people with disability in the design process
 
Annotating designs for accessibility
Annotating designs for accessibilityAnnotating designs for accessibility
Annotating designs for accessibility
 
Digital accessibility and learning opportunities
Digital accessibility and learning opportunitiesDigital accessibility and learning opportunities
Digital accessibility and learning opportunities
 
Accessible procurement: Stories from the trenches
Accessible procurement: Stories from the trenchesAccessible procurement: Stories from the trenches
Accessible procurement: Stories from the trenches
 
From Empathy to Research with People with Disability
From Empathy to Research with People with DisabilityFrom Empathy to Research with People with Disability
From Empathy to Research with People with Disability
 
Designing for people with cognitive impairments
Designing for people with cognitive impairmentsDesigning for people with cognitive impairments
Designing for people with cognitive impairments
 
How to create a kick ass business case for accessibility
How to create a kick ass business case for accessibilityHow to create a kick ass business case for accessibility
How to create a kick ass business case for accessibility
 
Personalised technical accessibility training: a case study
Personalised technical accessibility training: a case studyPersonalised technical accessibility training: a case study
Personalised technical accessibility training: a case study
 
Using the black art of marketing to sell accessibility
Using the black art of marketing to sell accessibilityUsing the black art of marketing to sell accessibility
Using the black art of marketing to sell accessibility
 
Design Systems that supports inclusive experiences
Design Systems that supports inclusive experiencesDesign Systems that supports inclusive experiences
Design Systems that supports inclusive experiences
 
Using cognitive walkthroughs for a task-oriented accessibility review
Using cognitive walkthroughs for a task-oriented accessibility reviewUsing cognitive walkthroughs for a task-oriented accessibility review
Using cognitive walkthroughs for a task-oriented accessibility review
 
WCAG 2.1 update for designers
WCAG 2.1 update for designersWCAG 2.1 update for designers
WCAG 2.1 update for designers
 
Creating accessible design systems - OZeWAI 2018
Creating accessible design systems - OZeWAI 2018Creating accessible design systems - OZeWAI 2018
Creating accessible design systems - OZeWAI 2018
 
Investing in your family's future - OZeWAI 2018
Investing in your family's future - OZeWAI 2018Investing in your family's future - OZeWAI 2018
Investing in your family's future - OZeWAI 2018
 
WCAG 2.1 for Designers - OZeWAI 2018
WCAG 2.1 for Designers - OZeWAI 2018WCAG 2.1 for Designers - OZeWAI 2018
WCAG 2.1 for Designers - OZeWAI 2018
 
Even more accessible! What WCAG 2.1 means for designers - Web Directions Summ...
Even more accessible! What WCAG 2.1 means for designers - Web Directions Summ...Even more accessible! What WCAG 2.1 means for designers - Web Directions Summ...
Even more accessible! What WCAG 2.1 means for designers - Web Directions Summ...
 

Último

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Making Accessible Web Animations