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
Building Accessible Components
Search
Ari Rizzitano
September 24, 2017
Programming
1
550
Building Accessible Components
Originally presented at React Boston on September 24, 2017
Ari Rizzitano
September 24, 2017
Tweet
Share
More Decks by Ari Rizzitano
See All by Ari Rizzitano
The Future of Frontend Development in Open edX
arizzitano
1
250
What the -dux?
arizzitano
0
230
Rock 'em Socket.IO Bots
arizzitano
1
750
Other Decks in Programming
See All in Programming
エンジニア向け採用ピッチ資料
inusan
0
160
Java on Azure で LangGraph!
kohei3110
0
170
たった 1 枚の PHP ファイルで実装する MCP サーバ / MCP Server with Vanilla PHP
okashoi
1
200
なぜ「共通化」を考え、失敗を繰り返すのか
rinchoku
1
560
C++20 射影変換
faithandbrave
0
540
生成AIコーディングとの向き合い方、AIと共創するという考え方 / How to deal with generative AI coding and the concept of co-creating with AI
seike460
PRO
1
330
データの民主化を支える、透明性のあるデータ利活用への挑戦 2025-06-25 Database Engineering Meetup#7
y_ken
0
320
『自分のデータだけ見せたい!』を叶える──Laravel × Casbin で複雑権限をスッキリ解きほぐす 25 分
akitotsukahara
1
570
「ElixirでIoT!!」のこれまでとこれから
takasehideki
0
370
PHPでWebSocketサーバーを実装しよう2025
kubotak
0
220
明示と暗黙 ー PHPとGoの インターフェイスの違いを知る
shimabox
2
370
deno-redisの紹介とJSRパッケージの運用について (toranoana.deno #21)
uki00a
0
150
Featured
See All Featured
Embracing the Ebb and Flow
colly
86
4.7k
Unsuck your backbone
ammeep
671
58k
Music & Morning Musume
bryan
46
6.6k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
490
GitHub's CSS Performance
jonrohan
1031
460k
Gamification - CAS2011
davidbonilla
81
5.3k
Designing for humans not robots
tammielis
253
25k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.7k
A Modern Web Designer's Workflow
chriscoyier
694
190k
Build The Right Thing And Hit Your Dates
maggiecrowley
36
2.8k
Done Done
chrislema
184
16k
Documentation Writing (for coders)
carmenintech
72
4.9k
Transcript
Building Accessible Components Ari Rizzitano, edX React Boston September 24,
2017
Hello Ari Rizzitano @arizzitano frontend team lead High quality education
for all We’re hiring!
None
Accessibility 101 React Best Practices Developer Toolkit
Accessibility 101
The degree to which a product, device, or environment is
available to a person.
Why?
The web
The web NOT ALWAYS ACCESSIBLE
Assistive technology helps bridge the gap
Input
Input
Output
Output text
Keyboard in, text out. But how?
Web standards Let’s follow them as closely as we follow
new ECMAScript proposals
Web Content Accessibility Guidelines (WCAG) 2.0 is our accessibility rulebook.
WAI-ARIA Authoring Practices is our cookbook.
For every generic component you build, check the WAI-ARIA authoring
practices. Chances are, there’s a section there for your use case.
Get familiar with aria attrs
Learn about roles and what they mean for document semantics.
Keyboard events: which keys should do what and where?
Master tab nav & tabIndex
Color contrast Color contrast Color contrast Color contrast Color contrast
Color contrast Color contrast Color contrast
1. Keyboard in 2. Text out 3. Follow standards 4.
Profit.
React Best Practices
Genericize as much accessible functionality as possible. A component library
is a great way to do this.
Best practice for focus is best practice for perf
An example Todos Learn about WCAG Your text here…
Change the state Todos Learn about WCAG Profile this app
Entire List Rerenders Todos Learn about WCAG Profile this app
Your text here…
Focus Lost! Todos Learn about WCAG Profile this app Your
text here…
Only render what you need Todos Learn about WCAG Profile
this app Your text here…
For programmatic focus management, 1. use refs 2. use componentDidUpdate
Trap focus when appropriate
On route changes, inform users of a change of context.
react-document-title works well here
Enforce best practices
Full Name Enter your name… Enter your full legal name
as it appears on your government ID. This field is required. Required Props
Enforce best practices
Use HOCs to reuse behavior & markup e.g. for different
input types
Developer Toolkit
audits code review manual acceptance testing unit tests linting Accessibility
Testing
Accessibility linting
eslint-plugin-jsx-a11y
Solid unit tests (this one is just common sense)
Immediate linter feedback helps devs internalize best practices
Dogfood! Test and interact with your app the way people
with disabilities might use it.
Navigate using only the keyboard
Side benefit: keyboard nav is faster than mouse (also you
feel like a hacker)
Use a screen reader! It’s as easy as ⌘-F5 On
a Mac. On Windows, use NVDA or JAWS. On Linux, use Orca.
Browser extensions Explore the accessibility tree, check color contrast, audit
your code while working on it
Accessibility audit automation
Recommendations: react-axe or Google Lighthouse (but there are plenty of
other good ones out there)
React’s toolchain facilitates building accessible applications.
Accessibility is easy to implement up front, but harder to
retrofit. Kind of like tests.
Web accessibility is built on best practices that benefit everyone
Thank you. @arizzitano