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

duplicate-id-active

できること

このスキルは、リンク、ボタン、入力欄などのページ上の操作要素が、それぞれ一意のIDを持っているかを確認します。アクセシブルで信頼できるナビゲーションを求める開発者向けです。

使う場面

  • ✓キーボードのフォーカスが、ページ上の誤った場所に飛ぶとき。
  • ✓コンポーネントをコピーした後で、ボタンが誤った操作を実行するとき。
  • ✓ページのアクセシビリティの問題をレビューしているとき。

スキルのリンク

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

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

使い方

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

貼り付け用メッセージ

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

AIへの頼み方の例

“私のページで、ボタンやリンクに重複したIDがないか確認してもらえますか?”

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

仕組み

エージェントは、フォーカスできる要素に二回以上現れるIDをページから探します。それぞれに一意のIDを与え、それを参照している箇所を更新することを提案します。

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

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

Use unique IDs for active elements

Duplicate IDs on active elements can cause browsers and assistive technologies to skip items, misdirect focus, or fail to trigger the correct action.

Quick Reference

  • Ensure all focusable elements (links, buttons, inputs) have unique id values
  • Avoid duplicate IDs that can break keyboard navigation and focus management
  • Prevent screen reader confusion when navigating interactive controls

Check

Search for duplicate id attributes on focusable or active HTML elements.

Fix

Assign a unique id to each active element to ensure correct focus handling and accessibility.

Explain

Explain how unique IDs on active elements prevent navigation errors for keyboard and screen reader users.

Code Review

Review the rendered markup and interactive states that affect Use unique IDs for active 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/duplicate-id-active

よくある質問

重複したIDは、なぜ問題を起こしますか?

ブラウザや支援ツールが誤った要素を選び、項目を飛ばしたり、誤った操作を実行したりするおそれがあると、このスキルは説明しています。

どの要素が確認されますか?

リンク、ボタン、入力欄などのフォーカスできる要素に焦点を当てています。

修正が正しいことは、どう確認できますか?

ブラウザのアクセシビリティツールか、支援技術で確認することを、このスキルは提案しています。

詳細

作者による元の説明

Use when reviewing rendered HTML, interactive components, or design-system patterns related to Use unique IDs for active 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
ランキング
#2824
ライセンス
MIT
更新日
2026/10/31

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

0

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

コメント

  • …

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

似ているスキル