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
mattsuu
July 16, 2024
Technology
690
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
アクセシブルなインクリメンタルサーチを作ってみた
アクセシビリティLT会 (2024/07/16) での発表資料
https://yumemi.connpass.com/event/323801/
mattsuu
July 16, 2024
Transcript
12 slides
アクセシブルな インクリメンタルサーチを作ってみた まっつー / @ryo_manba 2024/07/16 アクセシビリティ LT 会
自己紹介 まっつー サイボウズのフロントエンドエンジニア NextUI の team member X: @ryo_manba GitHub:
@ryo-manba 2
個人サイトで記事を探せるようにしました
インクリメンタルサーチとは 文字入力するごとに検索結果が絞り込まれる検索方式のこと
インクリメンタルサーチの課題 • 支援技術を利用するユーザーがリアルタイム更新に気付 けない • 検索結果が見つからなかった場合に気付けない
aria-describedby で機能の説明を紐付ける <input id="search" type="search" aria-describedby="search-description" /> <p id="search-description" className="sr-only">
入力するごとに記事が絞り込まれます </p> aria-describedby を使用して、検索コンポーネントがリア ルタイムに結果を更新することを伝える
aria-describedby で機能の説明を紐付ける 入力コンポーネントにフォーカスが当たった際にどのように 機能するか伝わる
結果が存在しない場合は即座に伝える <div aria-live="assertive" aria-atomic="true"> {noPostsFound && ( <p className="sr-only"> 記事が見つかりませんでした。
</p> )} </div> ARIA-live regions を活用して、入力結果が存在しない場合 に即座にアナウンスさせる
結果が存在しない場合は即座に伝える 即座にアナウンスされるため、ユーザーが不要な入力を避け られる
ユーザー体験を損ねる ARIA live regions の使い方 • 検索結果のコンテナに aria-live=”assertive” を指定する ◦
検索結果が更新されるたびに不要なアナウンスが発生する ◦ 頻発なアナウンスがノイズとなり、ユーザー体験を損ねる <div aria-live="assertive" aria-atomic="true"> {posts.map((post) => ( <BlogCard {...post} /> ))} </div>
ユーザー体験を損ねる ARIA live regions の使い方
まとめ インクリメンタルサーチをアクセシブルにするために以下の 実装を試しました • 機能の説明を入力コンポーネントに関連付ける • 結果が存在しない場合は即座にアナウンスさせる https://www.scottohara.me/blog/2022/02/05/dynamic-results.html https://www.sarasoueidan.com/blog/accessible-notifications-with-aria-live-regions-part-2/
More Decks by mattsuu
See All by mattsuu
pnpm に provenance のダウングレード を検出する PR を出してみた
ryo_manba
1
450
CSS Linter の現在地 2025年のベストプラクティスを探る
ryo_manba
12
4.8k
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
460
React Aria で実現する次世代のアクセシビリティ
ryo_manba
5
3.4k
5分で分かる React Aria の 良いところ・これからなところ
ryo_manba
5
7.2k
Next.js の fetch 拡張とキャッシュ機構の違いを理解する
ryo_manba
6
2k
React Spectrum Libraries によるアクセシブルなUIの構築
ryo_manba
0
4.8k
Other Decks in Technology
See All in Technology
Where Should Platform Complexity Live? Lessons from a Cross-Team PR Preview Platform
taiki45
0
120
IP重複は"ランディングVPC"で受け止める ― PrivateLink と Transit Gatewayによるマルチテナント接続基盤の設計
hatahata021
2
210
人間+AIを「チーム」としてプロセスを再設計する
littlehands
4
3.3k
農家は秘伝のタレを知らない - NOBODY KNOWS THE HIDDEN SOURCE - Kaggriculture 3rd Place Solution
masspeaks
2
490
マネジメントされる側の仕事は「文句」を言うこと
riyaamemiya
7
5.6k
Frontier Teams — Amazon は AI で「開発のやり方」をどう変えたのか
kmotohas
0
280
「AIチャットからもできないの?」と言われたら ~業務アプリをMCP対応するときの認証・認可の勘所
oidfj
0
360
さようならSSH鍵、こんにちはゼロトラスト ― AIフレンドリーで快適な自宅鯖SSH
atalie2m
14
6.6k
Quick Automate | 目指せ Quick マスター 12
inariku
PRO
1
120
Kiro アップデート 2026 年 11 月号 (11 月 8 日時点) | 目指せ Kiro マスター アップデート編
inariku
PRO
2
140
お風呂場をサーバルームにしよう
yusuke427
0
290
「任されビリティ」で引き受けて「よしなりてぃ」に頼らず任せる / Accept tasks with "makasarebility" and hand them over without relying on "yoshinarily"
pauli
1
740
Featured
See All Featured
Game over? The fight for quality and originality in the time of robots
wayneb77
1
330
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
450
Context Engineering - Making Every Token Count
addyosmani
9
1.3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
RailsConf 2023
tenderlove
30
1.6k
YesSQL, Process and Tooling at Scale
rocio
174
15k
ラッコキーワード サービス紹介資料
rakko
5
5.9M
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Docker and Python
trallard
47
4.3k
The Curse of the Amulet
leimatthew05
4
17k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
380
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.9k