Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Accessibility tips & tricks for CSS developers
Search
Marco Solazzi
March 25, 2016
Programming
610
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Accessibility tips & tricks for CSS developers
Marco Solazzi
March 25, 2016
More Decks by Marco Solazzi
See All by Marco Solazzi
Automation Strategies for Baseline Accessibility - Merpay Tech Talk 2021
dwightjack
0
440
Inclusive UI development tips & tricks
dwightjack
0
250
CSS Workflow for Grown-ups
dwightjack
1
600
Introducing AngularJS - Frontenders Verona
dwightjack
0
870
Other Decks in Programming
See All in Programming
SFCで実現する病院・医療システムの動的組み立て式UI
koukimiura
1
160
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
300
Spec-driven Development with AI
simas
PRO
0
2.2k
高橋メソッドでCVE解説シリーズ 〜CVE-2026-112816〜
hakkadaikon
0
180
TanStack Vue Query と Pinia Colada から学ぶ非同期状態の型設計
aoshi
0
580
JIS keyboard support in Omarchy
lef237
0
180
Groovy as a human and AI friendly programming language
paulk
0
160
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
1.2k
Web3Dライブラリを作ってVue Custom Rendererの仕組みを理解しよう / lets learn vue custom renderer by making 3d library
drumath2237
1
110
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
250
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
530
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
2.1k
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
55
13k
The Language of Interfaces
destraynor
162
27k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
820
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
23k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
600
Accessibility Awareness
sabderemane
1
280
Git: the NoSQL Database
bkeepers
PRO
433
67k
Fireside Chat
paigeccino
43
4.1k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
Building an army of robots
kneath
307
47k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Transcript
Accessibility tips & tricks for CSS developers Marco Solazzi -
@dwightjack CSS Day 2016 - cssday.it
About me - Senior Front-end @ AQuest - Co-founder Frontenders
Verona
HTML semantics Progressive enhancement Mobile first Responsive UX
“ … enabling as many people as possible to use
Web sites, even when those people's abilities are limited in some way. ” Accessibility https://developer.mozilla.org/en-US/docs/Web/Accessibility
“ … enabling as many people as possible to use
Web sites, even when those people's abilities are limited in some way. ” Accessibility - https://developer.mozilla.org/en-US/docs/Web/Accessibility
If you follow best practices you’re already providing some accessibility
- vision impairments - limited fine motor control - cognitive
disabilities - hearing impairments - older people (ourselves tomorrow) For whom?
Because we have to. Goverments are enforcing accessibility by legislation.
Why? - US: List of Web Accessibility-Related Litigation and Settlements (http://bit.ly/1n1JkQl) - IT: Legge Stanca (https://it.wikipedia.org/wiki/Legge_Stanca)
Because we should. Why?
“I’m going to do the website that way. If people
can’t use it they can go f**k themselves!” Everyday rant... - random world class designer / developer
“I’m going to put stairs here. If people can’t climb
them they can go f**k themselves!” What if... - random world class architect
Websites are like shops, restaurants and theatres: if you leave
me out you don’t deserve my money.
- unreadable beauty - table syndrome - outline dilemma -
out of sight... How?
Unreadable beauty
- blindness - low vision - color blindness Unreadable beauty
Unreadable beauty award-winning flash site, mid 2000
Unreadable beauty award-winning flash site, mid 2000
Unreadable beauty award-winning HTML site, mid 2010
Unreadable beauty award-winning HTML site, mid 2010
1. set html font-size to 100% 2. use rem fonts
and em media queries 3. high-contrast optional theme Unreadable beauty
1. set html font-size to 100% 2. use rem fonts
and em media queries 3. high-contrast optional theme Bonus: Use currentColor for flexible theming Unreadable beauty
Unreadable beauty
Unreadable beauty
Table syndrome
Every tag has its place in the world document.
Every tag has its place in the world document. …
even <ruby> - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ruby
<table>s are evil! Let’s use <div>s … and display: table
Table syndrome
<table>s are evil! Let’s use <div>s … and display: table
Problems: 1. not semantic 2. unannounced by screen-readers Table syndrome
<button>s are ugly! Let’s use <span>s and <a>s with JS
Table syndrome
<button>s are ugly! Let’s use <span>s and <a>s with JS
Problems: 1. missing focus 2. different/missing keyboard interactions Table syndrome
Table syndrome
Table syndrome
Outline dilemma
“ … provides visual feedback for links that have "focus"
when navigating a web document using the TAB key (or equivalent). ” Outline dilemma - http://www.outlinenone.com
“ … provides visual feedback for links that have "focus"
when navigating a web document using the TAB key (or equivalent). ” - http://www.outlinenone.com Outline dilemma
default outlines are ugly! - http://meyerweb.com/eric/tools/css/reset/reset200802.css Outline dilemma
default outlines are ugly! - http://meyerweb.com/eric/tools/css/reset/reset200802.css Outline dilemma
Outline dilemma
Outline dilemma
Outline dilemma
If you really can’t stand outline, remove it just for
mouse / touch interactions. Outline dilemma - https://github.com/lindsayevans/outline.js - https://www.paciellogroup.com/blog/2012/04/how-to-remove-css-outlines-in-an- accessible-manner/
Out of sight
How many ways to hide something? 1. opacity: 0 2.
visibility: hidden 3. display: none Out of sight
How many ways to hide something? 1. opacity: 0 2.
visibility: hidden 3. display: none ← accessibility friendly Out of sight
Options for element transitions: 1. display: none onComplete 2. tabindex=”-1”
for every link / button Out of sight
Don’t speak bonus:
Don’t speak
Don’t speak Warning: totally unreliable!
Don’t speak Always prefer SVGs (even for icons)
I want more! Resources - http://a11yproject.com/ - https://www.paciellogroup.com/ - http://webaim.org/
- http://a11yweekly.com/ People - https://twitter.com/LeonieWatson - https://twitter.com/stevefaulkner
Thanks