キーボードで操作できるインタラクティブグラフ
マウスなしでデータポイントを探索できるようにします。
「キーボードで操作できるインタラクティブグラフ」はCoddyKit上の無料Web Accessibility Academyレッスンです。 これはレッスン4/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはWeb Accessibility Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 Web Accessibility Academyコースには全4レッスンが含まれています。
このレッスンの一部はまだ翻訳されておらず、英語で表示されています。
Hover Is Not Enough
Interactive charts often reveal values only on hover. Keyboard and touch users never hover, so that data is locked away from them.
Make Data Points Focusable
Let users Tab to each data point or series by giving them tabindex="0". Now the keyboard can reach what the mouse hovers.
<circle tabindex="0" role="img" aria-label="March: 240 sales" />Each Point Needs a Name
A focusable point that announces nothing is useless. Give each one an accessible name stating its label and value, like March, 240 sales.
Arrow Keys to Move Between Points
Tabbing through 100 points is painful. Use arrow keys to step point-to-point and reserve Tab for jumping in and out of the chart.
The Roving tabindex Pattern
Keep one point at tabindex 0 and the rest at -1, moving the 0 as arrows fire. This roving tabindex keeps the Tab stop count sane.
Show Tooltips on Focus Too
Whatever a tooltip shows on hover, show on focus as well. Pair every mouseenter handler with a focus handler so both inputs match.
point.addEventListener('focus', showTooltip);Keep a Visible Focus Ring
Highlight the currently focused point with a clear outline or marker. Without it, keyboard users have no idea where they are.
Announce Changes Politely
When focus moves to a new point, an aria-live region can speak its value. This helps when the label is rendered visually but not in the DOM.
<div aria-live="polite">March: 240 sales</div>Group the Chart as a Figure
Wrap the whole thing in a figure with a name so users can find it and skip it as one unit when they are done exploring.
<figure role="group" aria-label="Sales over time, interactive"> ... </figure>Always Keep the Table Fallback
Interactivity is a bonus, not a replacement. Always keep the plain data table so users have a simple path when arrow-stepping is too slow.
Test With Tab and Arrows
Put the mouse away and drive the chart with Tab and arrow keys only. If you cannot reach every value, your users cannot either. ⌨️
Quick Check
How should a keyboard user step between many data points in a chart?
Recap: Charts You Can Drive
You learned to make points focusable and named, move with arrows via roving tabindex, mirror hover on focus, and always keep a table fallback. 🚀
よくある質問
「キーボードで操作できるインタラクティブグラフ」レッスンは無料ですか?
はい。「キーボードで操作できるインタラクティブグラフ」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、Web Accessibility Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 Web Accessibility Academyコースには全4レッスンが含まれています。
「キーボードで操作できるインタラクティブグラフ」で何を学びますか?
マウスなしでデータポイントを探索できるようにします。 ブラウザで直接実行するハンズオンコードでWeb Accessibility Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。
Web Accessibility Academyを始めるのに経験は必要ですか?
事前経験は必要ありません。CoddyKitのWeb Accessibility Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン4/4です。
「キーボードで操作できるインタラクティブグラフ」レッスンにはどのくらい時間がかかりますか?
ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。
このWeb Accessibility Academyレッスンでコードを書いて実行できますか?
はい。すべてのWeb Accessibility Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。
このコースのすべてのレッスン
- すべてのグラフにテキストによる代替手段を用意する
- データテーブルによるフォールバック
- 色、パターン、直接ラベル
- キーボードで操作できるインタラクティブグラフ