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
580
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Building Accessible Components
Originally presented at React Boston on September 24, 2017
Ari Rizzitano
September 24, 2017
More Decks by Ari Rizzitano
See All by Ari Rizzitano
The Future of Frontend Development in Open edX
arizzitano
1
280
What the -dux?
arizzitano
0
250
Rock 'em Socket.IO Bots
arizzitano
1
760
Other Decks in Programming
See All in Programming
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
140
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
600
Spring Security 実践 ─ GraphQL APIで実務に役立つ 認証・認可 を学ぶ
wagyu
0
180
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
110
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
160
A2UI という光を覗いてみる
satohjohn
1
110
OSもどきOS
arkw
0
470
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
500
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.9k
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.2k
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
730
さぁV100、メモリをお食べ・・・
nilpe
0
130
Featured
See All Featured
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
200
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
240
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
940
KATA
mclloyd
PRO
35
15k
Agile that works and the tools we love
rasmusluckow
331
21k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
280
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
How to Ace a Technical Interview
jacobian
281
24k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Skip the Path - Find Your Career Trail
mkilby
1
140
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