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
アクセシブルなインクリメンタルサーチを作ってみた
Search
mattsuu
July 16, 2024
Technology
620
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
More Decks by mattsuu
See All by mattsuu
pnpm に provenance のダウングレード を検出する PR を出してみた
ryo_manba
1
380
CSS Linter の現在地 2025年のベストプラクティスを探る
ryo_manba
12
4.4k
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
420
React Aria で実現する次世代のアクセシビリティ
ryo_manba
5
3.2k
5分で分かる React Aria の 良いところ・これからなところ
ryo_manba
5
7k
Next.js の fetch 拡張とキャッシュ機構の違いを理解する
ryo_manba
6
1.9k
React Spectrum Libraries によるアクセシブルなUIの構築
ryo_manba
0
4.6k
Other Decks in Technology
See All in Technology
AIエージェントとPhysical AIが拓く製造業の変革(ハノーバーメッセリキャップ)
iotcomjpadmin
0
210
クラウドファンディング版StackChan 3体(4体)をインタラクティブな体験型作品にして展示もした話 / スタックチャンお誕生日会2026
you
PRO
0
270
AI Agentをシステムに組み込む前にゆるく向き合ってみる
hayama17
0
190
ご挨拶「10周年を迎える共創ラボのこれまでとこれから」
iotcomjpadmin
0
180
AI時代のエンジニアキャリアについて今一度考える
sakamoto_582
1
870
トークン最適化のためのユーザーストーリー分析 / User Story Analysis for Token Optimization
oomatomo
0
160
技術・能力を向上する原理原則 #きのこセッションa #きのこ2026
bash0c7
0
200
「軸足」は 固定しなくていい - 熱量と強みで描く、しなやかなキャリアの形
kakehashi
PRO
1
330
小さいから、全部わかる。— 常駐AI "xangi" のすすめ
sugupoko
0
240
RAGの精度向上とエージェント活用
kintotechdev
2
120
「ビジネスがわかるエンジニア」とは何か?
ryooob
0
490
Oracle Exadata Database Service on Cloud@Customer X11M (ExaDB-C@C) サービス概要
oracle4engineer
PRO
2
8.3k
Featured
See All Featured
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
450
Mobile First: as difficult as doing things right
swwweet
225
10k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
320
Building Adaptive Systems
keathley
44
3.1k
Evolving SEO for Evolving Search Engines
ryanjones
0
230
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
What does AI have to do with Human Rights?
axbom
PRO
1
2.2k
RailsConf 2023
tenderlove
30
1.5k
GitHub's CSS Performance
jonrohan
1033
470k
HDC tutorial
michielstock
2
730
Transcript
アクセシブルな インクリメンタルサーチを作ってみた まっつー / @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/