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
フロントエンドのテストからアクセシビリティをしれっと広めていく
Search
Shota
August 22, 2024
Programming
1.3k
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
フロントエンドのテストからアクセシビリティをしれっと広めていく
Shota
August 22, 2024
More Decks by Shota
See All by Shota
おじいちゃんに優しいUIをつくってみた
nano72mkn
2
2.1k
アクセシビリティを理解するとフロントエンドのテストが楽になる!
nano72mkn
1
4.4k
OpenAI APIを触ってみた
nano72mkn
0
1.4k
年末年始にFlutter入門
nano72mkn
0
360
Other Decks in Programming
See All in Programming
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
290
GraphQL の onError と Nullability のこれから
quramy
0
160
Railsバージョンを4倍にした話
optim
0
520
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
1.5k
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
130
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
190
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
200
AmebaブログはKMPから卒業します
kmars0605
0
220
ジョジョの世界をXRで再現する
mofurune
0
180
contenteditable と日本語入力に向き合う
colorful12
0
210
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
140
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
247
13k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
Automating Front-end Workflow
addyosmani
1369
210k
Marketing to machines
jonoalderson
1
5.9k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
480
How to build a perfect <img>
jonoalderson
1
6.1k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
ラッコキーワード サービス紹介資料
rakko
3
5.4M
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
720
The Cost Of JavaScript in 2023
addyosmani
55
10k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
310
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
830
Transcript
フロントエンドのテストから アクセシビリティを"しれっと"広めていく 各社の事例から学ぶウェブアクセシビリティ 〜フロントエンドの最前線〜 2024/08/23 @nano72mkn
自己紹介 スターフェスティバル株式会社 フロントエンドエンジニア ポメラニアンを撫でながら仕事をしています! ゲーム好きです Apex VALORANT しょうた 🍊なつみかん @nano72mkn
01 アクセシビリティを広めるの難しい問題
アクセシビリティの重要性を伝えるのは 比較的簡単!
実際の対応となると話は別 技術的な複雑さ、専門的な知識、リソースの制約 など 様々な障壁が立ちはだかる
結果として、 「大切なことは分かっているけれど、なかなか手をつけられない」 という状況に陥る
そこで "しれっと"アプローチできないか を考えました。
"しれっと"アプローチ三箇条 心理的ハードルを最低限に 1. 学習コストを最低限に 2. 気づいたら貢献出来ている 3.
フロントエンドのテスト ならいけそう感
02 フロントエンドのテスト と アクセシビリティ
なぜ フロントエンドのテスト なのか
フロントエンドのテストツールには getByRoleという関数が存在している
役割 意味 <button type=”button”>ボタン</button> role属性について role属性はタグに や を示す
役割 意味 <button type=”button”>ボタン</button> <button type=”button” role=”button”>ボタン</button> role属性について role属性はタグに や
を示す
他にもあるよ!暗黙的なrole <a href=”~~~”>リンク</a> <h1>タイトル</h1> <input type=”text” /> link heading textbox
role属性を持っているタグを セマンティック要素 と呼ぶ
role属性を使って要素を取得するのが getByRole
それで、アクセシビリティとの関係性は?
getByRole とアクセシビリティとの関係性 スクリーンリーダーなどの支援技術はrole属性から どんな要素なのかをアナウンスしてくれます。 <button id=”lensSearchButton” class=”lensSearchButton” title=”画像で検索”/>
まとめると
role属性が付与されていれば getByRoleで要素を取得できる
role属性が付与されていれば 支援技術で要素を認識できる アクセシブルなUI
getByRoleで取得できる = アクセシブルなUIである
03 getByRoleを使った "しれっと"した アクセシビリティ改善
getByRoleの使い方
マイページ
role属性 accessible name マイページ
簡単ですよね!
送信
送信 role属性 accessible name
送信
送信
送信
getByRoleを使うことで、 自然とアクセシビリティを考慮した セマンティックなHTMLを使用するようになる
04 まとめ
getByRoleを使えば“しれっと”アプローチができる 心理的ハードルを最低限に getByRoleを使うだけ 学習コストを最低限に getByRoleの使い方を覚える role属性は使うやつだけ覚える 気づいたら貢献出来ている セマンティックなHTMLを書くことが促されて自然とアクセシブ ルなUIになっていく
注意点! アクセシビリティに疎くても貢献できる入門レベル アクセシビリティの項目を網羅することはできません
getByRoleをきっかけに アクセシビリティを “しれっと”広めていきましょう!
Thank You!