keyboard-navigation
できること
このスキルは、ページのすべての操作部品がTabキーで使え、フォーカスが適切な順序で移動するかを確認します。アクセシブルなサイトを目指す開発者やデザイナー向けです。
使う場面
- ✓ボタンやリンクにTabキーで到達できないとき。
- ✓非表示の要素がキーボードのフォーカスを受け取れてしまうとき。
- ✓キーボードで操作している人がページの一部から抜け出せなくなるとき。
スキルのリンク
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/keyboard-navigation/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のサイトのすべての操作部品が、キーボードだけで使えるか確認してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントはTabの順序を調べ、非表示の要素がフォーカスから外れているかを確認し、フォーカスの閉じ込めを探します。必要に応じて、DOMの順序の修正やtabindexの設定を提案します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Enable keyboard navigation for all elements
15% of users rely on keyboard navigation—broken focus order or keyboard traps make your site completely unusable for them.
Quick Reference
- All interactive elements must be reachable via Tab key
- Focus order should follow visual reading order (left-to-right, top-to-bottom)
- Never use positive tabindex values—they break natural flow
- Hidden content must be removed from tab sequence with tabindex='-1'
- Keyboard traps are only acceptable inside active modals with a working Escape path
Check
Test that all interactive elements are keyboard accessible, focus order matches visual/reading order, hidden content is not focusable, and no keyboard traps exist except in modals with proper escape handling.
Fix
Ensure tab order follows DOM order matching visual layout. Use tabindex='-1' to remove hidden elements from focus. Avoid positive tabindex values. Ensure off-screen or display:none content cannot receive focus.
Explain
Explain how logical focus order helps keyboard users navigate efficiently, why hidden elements must be removed from the tab sequence to avoid confusion, and how focus management affects users of screen readers and switch devices.
Code Review
Review the rendered markup and interactive states that affect Enable keyboard navigation for all elements. Flag exact elements, roles, labels, focus behavior, or keyboard interactions that violate the rule, and note how to verify the fix with browser accessibility tooling or assistive tech.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/accessibility/keyboard-navigation
よくある質問
キーボード操作がなぜ重要ですか?
このスキルによると、運動機能に障害のある人やスクリーンリーダーを使う人を含め、多くの利用者がキーボードに頼っています。
キーボードの閉じ込めが許されるのはいつですか?
このスキルによると、機能するEscapeの経路があるアクティブなモーダルの中だけです。
正のtabindex値を使うべきですか?
このスキルによると、正の値は自然な流れを壊すため使うべきではありません。
詳細
作者による元の説明
Use when reviewing rendered HTML, interactive components, or design-system patterns related to Enable keyboard navigation for all elements. Check native semantics first, then inspect keyboard behavior, focus flow, accessible names, and screen-reader output where relevant.
人気
- GitHubのスター
- 75k
- ランキング
- #2908
- ライセンス
- MIT
- 更新日
- 2026/10/31
コメント
- …
このリポジトリの他のスキル
frontendchecklist
75kコマンドラインツールを使って、フロントエンドのコードとライブページを、アクセシビリティ、速度、SEO、セキュリティに関する380以上のルールと照らし合わせて確認します。
frontend-checklist-global
75kフロントエンドのプロジェクトを、386のFront-End Checklistのルールすべてと照らし合わせて監査し、見つかった問題ごとに具体的な修正方法を示します。
404-page
75k見つからないページの画面に役立つリンクがあり、本物の404ステータスを返すかを確認し、迷った訪問者が目的のページを見つけられるようにします。
about-page
75kサイトの運営者が誰かを説明する、分かりやすいAboutページがあるかを確認し、訪問者と検索エンジンからの信頼を高めます。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。