SlideShare a Scribd company logo
Rethinking Accessibility
Related Best Practices
for CSS in the Modern
Age
Shwetank Dixit
Head – Accessibility Innovation and Research
BarrierBreak
About BarrierBreak
• Based in Mumbai, India.
• Accessibility auditing, tools and training.
• For profit enterprise with a social mission.
• One of the pioneers of accessibility
awareness in India.
• About 70-75% of our employees have a
disability of some kind.
About Me
• Head of Innovation and Research at
BarrierBreak
• Co-Editor of the HTML5 specification at W3C.
• Part of Web Platform WG, AGWG and more.
• Google Developer Expert.
• Previously at Opera as PM of Extensions and
part of Developer Relations.
Do you think this pie chart is
accessible?
Trends in web design
The web is growing more aesthetically pleasing, but at what cost?
Subtle
colors
• Unfortunately not caring about
contrast
• Some sites have a looping video
as a background, but with text
on top of it.
Gradients
Gradients are pretty popular as backgrounds too.
If care isn’t taken for proper contrast, then it makes it hard (and sometimes
impossible) to read.
Parallax
• Common design pattern in many
websites
• Sometimes the transitions are
too fast or cover too much of
the screen, causing strain.
Information online
We have a bunch of information online on accessibility for HTML, ARIA,
JavaScript etc.
CSS
Not too many people talk about these when talking accessibility
The inspiration for this talk
topic
BarrierBreak
CSS
Accessibility
Extension
CSS Techniques for WCAG
2.0
Inspiration
• BarrierBreak CSS Accessibility Extension
• CSS Techniques for WCAG 2.0
Color Contrast
Does this dress
look white and
gold? Or black
and blue?
Lots of controversy of the
color scheme of this
dress
It even had it’s own wikipedia page
WCAG 2.0, Section 1.4.1
Color is not used as the only visual means of conveying information,
indicating an action, prompting a response, or distinguishing a visual
element. (Level A)
WCAG 2.0, Section 1.4.1
(Continued)
Color is not used as the only visual means of conveying information,
indicating an action, prompting a response, or distinguishing a visual
element. (Level A)
WCAG 2.1, Section
1.4.11
The visual presentation of the following have a contrast ratio of at least 3:1 against adjacent color(s):
User Interface Components
Visual information used to indicate states and boundaries of user interface components, except for
inactive components or where the appearance of the component is determined by the user agent and not
modified by the author;
Graphical Objects
Parts of graphics required to understand the content, except when a particular presentation of graphics
is essential to the information being conveyed.
AT RISK!!!
Tools I use
• Contrast (Mac Paid App)
• Chrome Canary Devtools (Free) + Google Developer Accessibility Tools
Extension
• There are a number of similar tools which do pretty much the same
thing. It’s a matter of preference.
New in Chrome 65 (Canary as of now)
Open up color picker in devtools. Get color picker which can analyze color contrast ratio.
Chrome Accessibility Developer Tools
Extension
• Inspect Element -> Accessibility Properties -> Color Contrast Ratio
Sample Text
Sample Text
Font-Size
Can I just px already?
This debate got a lot of talk a while
ago
Source: https://hackernoon.com/rems-and-ems-and-why-you-probably-dont-need-them-
664b9ce1e09f
“My point: you don’t need in depth knowledge
and fancy tools for working out if rems and
ems are ‘better for accessibility’ — just imagine
that you are someone with bad eyesight”
Quote from the article - 1
“The above facts, to me, make it crystal clear
that browser text size adjustment is of no use
in the real world. And so I will not take this
setting into account in my decision
making process.”
Quote from the article - 2
With points and counter points
Source: https://medium.com/@jpdevries/rems-and-ems-and-why-you-probably-
need-them-ff99a0002cdd
Zooming
Not all devices implement zooming the same way
Browser zoom != font size preference
Zooming – watch out for
• Older browsers
• Televisions
• Some mobile browsers like Opera for Android (Text
reflow)
Views from a CSS WG member
Link to above screenshot on the web
CSS background
Images
Only for presentational content
Upcoming: CSS Paint
API
Generate presentational graphics using JS instead of using an image via
`url()`
Tutorial: https://developers.google.com/web/updates/2018/01/paintapi
CSS User Queries
Like media queries, but for the user’s preferences instead
Vestibular Disorder
Feeling of dizziness and nauseousness when large parts of the UI move
quickly.
Parallax
• Common design pattern in many
websites
• Sometimes the transitions are
too fast or cover too much of
the screen, causing strain.
Vestibular Disorder – causes (on the
web)
• Many sites have parallax based designs, which can tend to cause
discomfort to people with vestibular disorders.
• Can also be caused by certain animations moving quickly in the page.
prefers-reduced-motion
• Apply different styles for user’s who prefer reduced motion.
• Currently Safari only.
@media(prefers-reduced-motion){
...
}
prefers-reduced-motion
(continued)
• Listen if the user has changed preference for reduced motion at the OS
level
• Adjust UI accordingly
var reducedMotionQuery = matchMedia('(prefers-reduced-motion)');
function handleReduceMotionChangeEvent() {
if (motionQuery.matches) {
/*User has enabled 'reduced motion' preferences in the OS*/
/* adjust motion of 'transition' or 'animation' properties */
} else {
/* display animation with standard speed. Default UI elements. */
}
}
recuedMotionQuery.addListener(handleReduceMotionChangeEvent);
handleReduceMotionChanged();
Reduced motion – Things to keep in
mind
• Don’t disable or reduce all animation.
• Some animation might be essential to understanding the content
properly.
• Only reduce animation or movement of UI elements which are likely
to cause vestibular issues.
• Listen to user feedback on it.
Inverted colors
• This allows you to have apply a exclusive set of CSS which is only there for
people who have switched on inverted colors on the OS level.
• Safari only currently.
• Typical use case is for images, since inverted colors inverts images too.
@media (inverted-colors) {
...
}
Page as it appears by default
Page when colors are inverted, but
custom CSS is not applied
Page with optimal look on high
contrast
@media (inverted-colors) {
img {
filter: invert();
}
}
Windows High-Contrast Mode
@media (-ms-high-contrast: active) {}
@media (-ms-high-contrast: black-on-white) {}
@media (-ms-high-contrast: white-on-black) {}
Windows High-Contrast Mode -
Continued
Text is mapped to windowText
Hyperlinks is mapped to N/A, we apply
the color to <a>
Selected Text is mapped to highlightText
& highlight
Button Text is mapped to buttonFace
Background is mapped to window
Are we with the times?
1.3.2 - Meaningful Sequence
Level A
When the sequence in which content is presented affects
its meaning, a correct reading sequence can be
programmatically determined.
AKA,
DOM order should match visual
order
Additional Info: https://www.w3.org/WAI/GL/WCAG20-TECHS/css.html#C27
Can we?
In the age of Flexbox and CSS
Grid?
Flexbox (unchanged order
example)
<div class="flex">
<div class="item-one">
...
</div>
<div class="item-two">
...
</div>
</div>
.flex {
display: flex;
flex-direction: column;
}
Flexbox (changed order
example)
<div class="flex">
<div class="item-one">
...
</div>
<div class="item-two">
...
</div>
</div>
.flex {
display: flex;
flex-direction: column;
}
.item-one {
order: 1;
}
CSS Grid (unchanged order)
CSS Grid (changed order)
Ordering in the real world
While this should be the case, and we should push
for it ... in the real world, we need to see how
practical this advice is.
Source: https://www.w3.org/TR/css-flexbox-1/#order-accessibility
Firefox’s Flexbox ‘bug’
Firefox used to have a ‘bug’, where if the visual order is changed with flexbox,
the keyboard navigation followed the visual order instead of the DOM order.
This turned out to be good, even though its technically a bug which violated
the spec.
Firefox’s Flexbox ‘bug’
(continued)
It’s since been ‘fixed’ and now firefox’s behavior matches other
browsers.
How to fix problem of visual order not
matching focus
• This is a problem which needs fixing from the browsers as well as
somewhere in the specs
• I proposed an attribute which could specify how order should behave
(by default matching DOM order, but can be changed to match visual)
• Current debate whether we need a CSS fix for it or an HTML attribute
for it.
• Read more and comment on the WICG page for it.
Thanks!
• Shwetank Dixit
• shwetank@barrierbreak.com
• @shwetank
Further Reading and resources
• BarrierBreak CSS Accessibility Extension
• Accessibility Developer Tools Chrome Extension
• CSS Techniques for WCAG 2.0
• Google Web Fundamentals Tutorial on the CSS Paint API
• JP de Vries article: Rems, ems and why you probably need them
• Greg Whitworth’s article on how to use –ms-high-contrast
• The webkit.org article on responsive design for motion
• Leonie Watson on the Flexbox and Keyboard navigation disconnect.
• Proposal for a new HTML attribute (or CSS entry) for allowing DOM order to
follow visual order.

More Related Content

What's hot

OOP Approach to Design
OOP Approach to DesignOOP Approach to Design
OOP Approach to Design
axe777
 
Early prevention of accessibility issues with mockup & wireframe reviews
Early prevention of accessibility issues with mockup & wireframe reviewsEarly prevention of accessibility issues with mockup & wireframe reviews
Early prevention of accessibility issues with mockup & wireframe reviews
Aidan Tierney
 
Improving joomla's backend user experience
Improving joomla's backend user experienceImproving joomla's backend user experience
Improving joomla's backend user experienceLuke Summerfield
 
Responsive Design: Let's get Responsive!
Responsive Design: Let's get Responsive!Responsive Design: Let's get Responsive!
Responsive Design: Let's get Responsive!
Courtney Jordan
 
Jquery mobile
Jquery mobileJquery mobile
Jquery mobile
Predhin Sapru
 
Front end development best practices
Front end development best practicesFront end development best practices
Front end development best practices
Karolina Coates
 
Javascript library toolbox
Javascript library toolboxJavascript library toolbox
Javascript library toolboxSkysoul Pty.Ltd.
 
Designing Powerful Web Applications Using AJAX and Other RIAs
Designing Powerful Web Applications Using AJAX and Other RIAsDesigning Powerful Web Applications Using AJAX and Other RIAs
Designing Powerful Web Applications Using AJAX and Other RIAs
Dave Malouf
 
jQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesjQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesMark Roden
 
Web Design Project Report
Web Design Project ReportWeb Design Project Report
Web Design Project Report
MJ Ferdous
 
Castro Chapter 5
Castro Chapter 5Castro Chapter 5
Castro Chapter 5Jeff Byrnes
 

What's hot (12)

OOP Approach to Design
OOP Approach to DesignOOP Approach to Design
OOP Approach to Design
 
Early prevention of accessibility issues with mockup & wireframe reviews
Early prevention of accessibility issues with mockup & wireframe reviewsEarly prevention of accessibility issues with mockup & wireframe reviews
Early prevention of accessibility issues with mockup & wireframe reviews
 
Improving joomla's backend user experience
Improving joomla's backend user experienceImproving joomla's backend user experience
Improving joomla's backend user experience
 
Responsive Design: Let's get Responsive!
Responsive Design: Let's get Responsive!Responsive Design: Let's get Responsive!
Responsive Design: Let's get Responsive!
 
Template frameworks
Template frameworksTemplate frameworks
Template frameworks
 
Jquery mobile
Jquery mobileJquery mobile
Jquery mobile
 
Front end development best practices
Front end development best practicesFront end development best practices
Front end development best practices
 
Javascript library toolbox
Javascript library toolboxJavascript library toolbox
Javascript library toolbox
 
Designing Powerful Web Applications Using AJAX and Other RIAs
Designing Powerful Web Applications Using AJAX and Other RIAsDesigning Powerful Web Applications Using AJAX and Other RIAs
Designing Powerful Web Applications Using AJAX and Other RIAs
 
jQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPagesjQuery - the world's most popular java script library comes to XPages
jQuery - the world's most popular java script library comes to XPages
 
Web Design Project Report
Web Design Project ReportWeb Design Project Report
Web Design Project Report
 
Castro Chapter 5
Castro Chapter 5Castro Chapter 5
Castro Chapter 5
 

Similar to Rethinking accessibility related best practices for CSS in the modern age

Mobile Best Practices
Mobile Best PracticesMobile Best Practices
Mobile Best Practices
mintersam
 
Bootstrap for Beginners
Bootstrap for BeginnersBootstrap for Beginners
Bootstrap for Beginners
D'arce Hess
 
Stc 2015 preparing legacy projects for responsive design - technical issues
Stc 2015   preparing legacy projects for responsive design - technical issuesStc 2015   preparing legacy projects for responsive design - technical issues
Stc 2015 preparing legacy projects for responsive design - technical issues
Neil Perlin
 
Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18
Frédéric Harper
 
The future of BYU web design
The future of BYU web designThe future of BYU web design
The future of BYU web design
Nate Walton
 
SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013
Marc D Anderson
 
Modern Web Applications
Modern Web ApplicationsModern Web Applications
Modern Web Applications
Ömer Göktuğ Poyraz
 
Mobile Monday Presentation: Responsive Web Design
Mobile Monday Presentation: Responsive Web DesignMobile Monday Presentation: Responsive Web Design
Mobile Monday Presentation: Responsive Web Design
Cantina
 
Plan For Accessibility - TODCon 2008
Plan For Accessibility - TODCon 2008Plan For Accessibility - TODCon 2008
Plan For Accessibility - TODCon 2008
Denise Jacobs
 
Responsive web design with various grids and frameworks comparison
Responsive web design with various grids and frameworks comparisonResponsive web design with various grids and frameworks comparison
Responsive web design with various grids and frameworks comparison
DhrubaJyoti Dey
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
Vitaly Friedman
 
Lavacon 2014 responsive design in your hat
Lavacon 2014   responsive design in your hatLavacon 2014   responsive design in your hat
Lavacon 2014 responsive design in your hat
Neil Perlin
 
Startup Institute NYC: Styling
Startup Institute NYC: StylingStartup Institute NYC: Styling
Startup Institute NYC: Styling
Matthew Gerrior
 
Customizing ERModernLook Applications
Customizing ERModernLook ApplicationsCustomizing ERModernLook Applications
Customizing ERModernLook Applications
WO Community
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
Mike Wilcox
 
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptxLATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
chitrachauhan21
 
Is the mobile web enabled or disabled by design?
Is the mobile web enabled or disabled by design?Is the mobile web enabled or disabled by design?
Is the mobile web enabled or disabled by design?
Henny Swan
 
EXPERTALKS: Sep 2013 - Responsive Web Design
EXPERTALKS: Sep 2013 - Responsive Web DesignEXPERTALKS: Sep 2013 - Responsive Web Design
EXPERTALKS: Sep 2013 - Responsive Web DesignEXPERTALKS
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX Designers
Ashlimarie
 
Accessibility patterns testable requirements during early design
Accessibility patterns testable requirements during early designAccessibility patterns testable requirements during early design
Accessibility patterns testable requirements during early design
Aidan Tierney
 

Similar to Rethinking accessibility related best practices for CSS in the modern age (20)

Mobile Best Practices
Mobile Best PracticesMobile Best Practices
Mobile Best Practices
 
Bootstrap for Beginners
Bootstrap for BeginnersBootstrap for Beginners
Bootstrap for Beginners
 
Stc 2015 preparing legacy projects for responsive design - technical issues
Stc 2015   preparing legacy projects for responsive design - technical issuesStc 2015   preparing legacy projects for responsive design - technical issues
Stc 2015 preparing legacy projects for responsive design - technical issues
 
Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18Responsive Web Design - Web & PHP Conference - 2013-09-18
Responsive Web Design - Web & PHP Conference - 2013-09-18
 
The future of BYU web design
The future of BYU web designThe future of BYU web design
The future of BYU web design
 
SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013SEF 2014 - Responsive Design in SharePoint 2013
SEF 2014 - Responsive Design in SharePoint 2013
 
Modern Web Applications
Modern Web ApplicationsModern Web Applications
Modern Web Applications
 
Mobile Monday Presentation: Responsive Web Design
Mobile Monday Presentation: Responsive Web DesignMobile Monday Presentation: Responsive Web Design
Mobile Monday Presentation: Responsive Web Design
 
Plan For Accessibility - TODCon 2008
Plan For Accessibility - TODCon 2008Plan For Accessibility - TODCon 2008
Plan For Accessibility - TODCon 2008
 
Responsive web design with various grids and frameworks comparison
Responsive web design with various grids and frameworks comparisonResponsive web design with various grids and frameworks comparison
Responsive web design with various grids and frameworks comparison
 
Responsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and TechniquesResponsive Web Design: Clever Tips and Techniques
Responsive Web Design: Clever Tips and Techniques
 
Lavacon 2014 responsive design in your hat
Lavacon 2014   responsive design in your hatLavacon 2014   responsive design in your hat
Lavacon 2014 responsive design in your hat
 
Startup Institute NYC: Styling
Startup Institute NYC: StylingStartup Institute NYC: Styling
Startup Institute NYC: Styling
 
Customizing ERModernLook Applications
Customizing ERModernLook ApplicationsCustomizing ERModernLook Applications
Customizing ERModernLook Applications
 
Great Responsive-ability Web Design
Great Responsive-ability Web DesignGreat Responsive-ability Web Design
Great Responsive-ability Web Design
 
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptxLATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
LATEST_TRENDS_IN_WEBSITE_DEVELOPMENT.pptx
 
Is the mobile web enabled or disabled by design?
Is the mobile web enabled or disabled by design?Is the mobile web enabled or disabled by design?
Is the mobile web enabled or disabled by design?
 
EXPERTALKS: Sep 2013 - Responsive Web Design
EXPERTALKS: Sep 2013 - Responsive Web DesignEXPERTALKS: Sep 2013 - Responsive Web Design
EXPERTALKS: Sep 2013 - Responsive Web Design
 
Web Development for UX Designers
Web Development for UX DesignersWeb Development for UX Designers
Web Development for UX Designers
 
Accessibility patterns testable requirements during early design
Accessibility patterns testable requirements during early designAccessibility patterns testable requirements during early design
Accessibility patterns testable requirements during early design
 

Recently uploaded

Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 

Recently uploaded (20)

Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 

Rethinking accessibility related best practices for CSS in the modern age

  • 1. Rethinking Accessibility Related Best Practices for CSS in the Modern Age Shwetank Dixit Head – Accessibility Innovation and Research BarrierBreak
  • 2. About BarrierBreak • Based in Mumbai, India. • Accessibility auditing, tools and training. • For profit enterprise with a social mission. • One of the pioneers of accessibility awareness in India. • About 70-75% of our employees have a disability of some kind.
  • 3. About Me • Head of Innovation and Research at BarrierBreak • Co-Editor of the HTML5 specification at W3C. • Part of Web Platform WG, AGWG and more. • Google Developer Expert. • Previously at Opera as PM of Extensions and part of Developer Relations.
  • 4. Do you think this pie chart is accessible?
  • 5. Trends in web design The web is growing more aesthetically pleasing, but at what cost?
  • 6. Subtle colors • Unfortunately not caring about contrast • Some sites have a looping video as a background, but with text on top of it.
  • 7. Gradients Gradients are pretty popular as backgrounds too. If care isn’t taken for proper contrast, then it makes it hard (and sometimes impossible) to read.
  • 8. Parallax • Common design pattern in many websites • Sometimes the transitions are too fast or cover too much of the screen, causing strain.
  • 9. Information online We have a bunch of information online on accessibility for HTML, ARIA, JavaScript etc.
  • 10. CSS Not too many people talk about these when talking accessibility
  • 11. The inspiration for this talk topic
  • 13. CSS Techniques for WCAG 2.0
  • 14. Inspiration • BarrierBreak CSS Accessibility Extension • CSS Techniques for WCAG 2.0
  • 16. Does this dress look white and gold? Or black and blue?
  • 17. Lots of controversy of the color scheme of this dress
  • 18. It even had it’s own wikipedia page
  • 19. WCAG 2.0, Section 1.4.1 Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element. (Level A)
  • 20. WCAG 2.0, Section 1.4.1 (Continued) Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element. (Level A)
  • 21. WCAG 2.1, Section 1.4.11 The visual presentation of the following have a contrast ratio of at least 3:1 against adjacent color(s): User Interface Components Visual information used to indicate states and boundaries of user interface components, except for inactive components or where the appearance of the component is determined by the user agent and not modified by the author; Graphical Objects Parts of graphics required to understand the content, except when a particular presentation of graphics is essential to the information being conveyed. AT RISK!!!
  • 22. Tools I use • Contrast (Mac Paid App) • Chrome Canary Devtools (Free) + Google Developer Accessibility Tools Extension • There are a number of similar tools which do pretty much the same thing. It’s a matter of preference.
  • 23. New in Chrome 65 (Canary as of now) Open up color picker in devtools. Get color picker which can analyze color contrast ratio.
  • 24. Chrome Accessibility Developer Tools Extension • Inspect Element -> Accessibility Properties -> Color Contrast Ratio
  • 27. Font-Size Can I just px already?
  • 28. This debate got a lot of talk a while ago Source: https://hackernoon.com/rems-and-ems-and-why-you-probably-dont-need-them- 664b9ce1e09f
  • 29. “My point: you don’t need in depth knowledge and fancy tools for working out if rems and ems are ‘better for accessibility’ — just imagine that you are someone with bad eyesight” Quote from the article - 1
  • 30. “The above facts, to me, make it crystal clear that browser text size adjustment is of no use in the real world. And so I will not take this setting into account in my decision making process.” Quote from the article - 2
  • 31. With points and counter points Source: https://medium.com/@jpdevries/rems-and-ems-and-why-you-probably- need-them-ff99a0002cdd
  • 32. Zooming Not all devices implement zooming the same way
  • 33. Browser zoom != font size preference
  • 34. Zooming – watch out for • Older browsers • Televisions • Some mobile browsers like Opera for Android (Text reflow)
  • 35. Views from a CSS WG member Link to above screenshot on the web
  • 36. CSS background Images Only for presentational content
  • 37. Upcoming: CSS Paint API Generate presentational graphics using JS instead of using an image via `url()` Tutorial: https://developers.google.com/web/updates/2018/01/paintapi
  • 38. CSS User Queries Like media queries, but for the user’s preferences instead
  • 39. Vestibular Disorder Feeling of dizziness and nauseousness when large parts of the UI move quickly.
  • 40. Parallax • Common design pattern in many websites • Sometimes the transitions are too fast or cover too much of the screen, causing strain.
  • 41. Vestibular Disorder – causes (on the web) • Many sites have parallax based designs, which can tend to cause discomfort to people with vestibular disorders. • Can also be caused by certain animations moving quickly in the page.
  • 42. prefers-reduced-motion • Apply different styles for user’s who prefer reduced motion. • Currently Safari only. @media(prefers-reduced-motion){ ... }
  • 43. prefers-reduced-motion (continued) • Listen if the user has changed preference for reduced motion at the OS level • Adjust UI accordingly var reducedMotionQuery = matchMedia('(prefers-reduced-motion)'); function handleReduceMotionChangeEvent() { if (motionQuery.matches) { /*User has enabled 'reduced motion' preferences in the OS*/ /* adjust motion of 'transition' or 'animation' properties */ } else { /* display animation with standard speed. Default UI elements. */ } } recuedMotionQuery.addListener(handleReduceMotionChangeEvent); handleReduceMotionChanged();
  • 44. Reduced motion – Things to keep in mind • Don’t disable or reduce all animation. • Some animation might be essential to understanding the content properly. • Only reduce animation or movement of UI elements which are likely to cause vestibular issues. • Listen to user feedback on it.
  • 45. Inverted colors • This allows you to have apply a exclusive set of CSS which is only there for people who have switched on inverted colors on the OS level. • Safari only currently. • Typical use case is for images, since inverted colors inverts images too. @media (inverted-colors) { ... }
  • 46. Page as it appears by default
  • 47. Page when colors are inverted, but custom CSS is not applied
  • 48. Page with optimal look on high contrast @media (inverted-colors) { img { filter: invert(); } }
  • 49. Windows High-Contrast Mode @media (-ms-high-contrast: active) {} @media (-ms-high-contrast: black-on-white) {} @media (-ms-high-contrast: white-on-black) {}
  • 50. Windows High-Contrast Mode - Continued Text is mapped to windowText Hyperlinks is mapped to N/A, we apply the color to <a> Selected Text is mapped to highlightText & highlight Button Text is mapped to buttonFace Background is mapped to window
  • 51. Are we with the times? 1.3.2 - Meaningful Sequence Level A When the sequence in which content is presented affects its meaning, a correct reading sequence can be programmatically determined.
  • 52. AKA, DOM order should match visual order Additional Info: https://www.w3.org/WAI/GL/WCAG20-TECHS/css.html#C27
  • 53. Can we? In the age of Flexbox and CSS Grid?
  • 54. Flexbox (unchanged order example) <div class="flex"> <div class="item-one"> ... </div> <div class="item-two"> ... </div> </div> .flex { display: flex; flex-direction: column; }
  • 55. Flexbox (changed order example) <div class="flex"> <div class="item-one"> ... </div> <div class="item-two"> ... </div> </div> .flex { display: flex; flex-direction: column; } .item-one { order: 1; }
  • 58. Ordering in the real world While this should be the case, and we should push for it ... in the real world, we need to see how practical this advice is. Source: https://www.w3.org/TR/css-flexbox-1/#order-accessibility
  • 59. Firefox’s Flexbox ‘bug’ Firefox used to have a ‘bug’, where if the visual order is changed with flexbox, the keyboard navigation followed the visual order instead of the DOM order. This turned out to be good, even though its technically a bug which violated the spec.
  • 60. Firefox’s Flexbox ‘bug’ (continued) It’s since been ‘fixed’ and now firefox’s behavior matches other browsers.
  • 61. How to fix problem of visual order not matching focus • This is a problem which needs fixing from the browsers as well as somewhere in the specs • I proposed an attribute which could specify how order should behave (by default matching DOM order, but can be changed to match visual) • Current debate whether we need a CSS fix for it or an HTML attribute for it. • Read more and comment on the WICG page for it.
  • 62. Thanks! • Shwetank Dixit • shwetank@barrierbreak.com • @shwetank
  • 63. Further Reading and resources • BarrierBreak CSS Accessibility Extension • Accessibility Developer Tools Chrome Extension • CSS Techniques for WCAG 2.0 • Google Web Fundamentals Tutorial on the CSS Paint API • JP de Vries article: Rems, ems and why you probably need them • Greg Whitworth’s article on how to use –ms-high-contrast • The webkit.org article on responsive design for motion • Leonie Watson on the Flexbox and Keyboard navigation disconnect. • Proposal for a new HTML attribute (or CSS entry) for allowing DOM order to follow visual order.