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

tabindex

できること

このスキルは、ウェブページで tabindex 属性がどのように使われているかを確認します。キーボードやスクリーンリーダーで使いやすいページを作りたい開発者や編集者向けです。

使う場面

  • ✓正の tabindex の数値があり、通常のタブ順が変わっているとき。
  • ✓カスタムボタンやウィジェットに Tab キーで到達できないとき。
  • ✓アクセシビリティの審査で、フォーカス順の問題が指摘されたとき。

スキルのリンク

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

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

使い方

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

貼り付け用メッセージ

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

AIへの頼み方の例

“サイトで Tab キーを押すと、おかしな順番で移動します。tabindex の設定を確認してもらえますか。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、自然な順番を崩す tabindex の値を探して修正します。カスタムコントロールには、キーボードの利用者が到達できるように値 0 を設定します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Use appropriate tabindex values

Incorrect tabindex values can create a confusing navigation experience, making it difficult for keyboard users to predict where focus will move next.

Quick Reference

  • Stick to tabindex="0" for custom interactive elements
  • Use tabindex="-1" for elements that should only be focusable via script
  • Avoid positive values (1, 2, 3...) which break natural tab order

Check

Check for any positive tabindex values and ensure custom interactive elements are focusable.

Fix

Remove positive tabindex values and use tabindex="0" or -1 appropriately.

Explain

Explain why positive tabindex values are problematic for keyboard navigation and user experience.

Code Review

Review the rendered markup and interactive states that affect Use appropriate tabindex values. 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/tabindex

よくある質問

tabindex 0 は何をしますか?

カスタム要素を、ページ内の通常の位置で Tab キーによって到達できるようにします。

正の tabindex の数値はなぜ問題なのですか?

要素をタブ順の先頭に移動させるため、キーボードの利用者にとってページが予測しにくくなります。

まず組み込みのボタンやリンクを確認すべきですか?

はい。このスキルは、HTML のネイティブ要素の方がより良い選択であることが多いため、先に確認するよう勧めています。

詳細

作者による元の説明

Use when reviewing rendered HTML, interactive components, or design-system patterns related to Use appropriate tabindex values. 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
ランキング
#3044
ライセンス
MIT
更新日
2026/10/31

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

0

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

コメント

  • …

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

似ているスキル