Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Accessibility tips & tricks for CSS developers
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Marco Solazzi
March 25, 2016
Programming
590
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
430
Inclusive UI development tips & tricks
dwightjack
0
220
CSS Workflow for Grown-ups
dwightjack
1
580
Introducing AngularJS - Frontenders Verona
dwightjack
0
830
Other Decks in Programming
See All in Programming
CSC307 Lecture 17
javiergs
PRO
0
320
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
150
依存関係から依存物へ―Dependencyという言葉の歴史をひも解く
j_lee
0
110
New "Type" system on PicoRuby
pocke
1
800
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
480
セキュリティの専門家じゃなくてもできる。「セキュリティ意識」をアップデートして サプライチェーン攻撃への耐性を高めよう。
tk3fftk
5
700
Lessons from Spec-Driven Development
simas
PRO
0
150
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
3
1.3k
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
250
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
270
Oxlintのカスタムルールの現況
syumai
6
1.1k
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
560
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
We Have a Design System, Now What?
morganepeng
55
8.2k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
600
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
390
Producing Creativity
orderedlist
PRO
348
40k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Speed Design
sergeychernyshev
33
1.8k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
200
Building AI with AI
inesmontani
PRO
1
1.1k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
130
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
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