本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)75k · #2908

keyboard-navigation

できること

このスキルは、ページのすべての操作部品がTabキーで使え、フォーカスが適切な順序で移動するかを確認します。アクセシブルなサイトを目指す開発者やデザイナー向けです。

使う場面

  • ✓ボタンやリンクにTabキーで到達できないとき。
  • ✓非表示の要素がキーボードのフォーカスを受け取れてしまうとき。
  • ✓キーボードで操作している人がページの一部から抜け出せなくなるとき。

スキルのリンク

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/keyboard-navigation/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/keyboard-navigation/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

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.

repo: thedaviddias/Front-End-Checklist

人気

GitHubのスター
75k
ランキング
#2908
ライセンス
MIT
更新日
2026/10/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル