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.5k
OpenAI APIを触ってみた
nano72mkn
0
1.4k
年末年始にFlutter入門
nano72mkn
0
360
Other Decks in Programming
See All in Programming
ChromeでローカルLLM
ryu1013
0
180
Performance Optimization With LLMs
xleitix
0
230
S3 TablesのIcebergデータに、AIエージェントからアクセスしてみた / 20261016developersio2026joetsu-accessing-iceberg-in-s3tables-via-agent
kasacchiful
PRO
0
240
우리의 Nitro Modules는 당신의 Turbo Modules보다 아름답다
l2hyunwoo
0
240
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
5
1.3k
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
1.1k
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
12
11k
Zero-Tap Sign-In対応、結局何をすればいいの?
mitohato14
0
1.1k
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
2k
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
1.6k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
490
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
650
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
Code Reviewing Like a Champion
maltzj
529
40k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
The Invisible Side of Design
smashingmag
301
52k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
Deep Space Network (abreviated)
tonyrice
0
390
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
610
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
660
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.5k
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!