form-labels
できること
このスキルは、フォームの入力欄に分かりやすく結び付いたラベルがあるかを確認します。多くの人が記入するフォームを作る開発者向けです。
使う場面
- ✓フォームの欄に、プレースホルダーのテキストしかなく、本当のラベルがないとき。
- ✓チェックボックスやラジオボタンのグループに、共通の質問がないとき。
- ✓利用者がラベルをクリックして、入力欄にフォーカスできないとき。
スキルのリンク
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/form-labels/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“フォームのすべての欄に、適切なラベルがあるか確認してもらえますか。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、for と id の属性を使って、各入力欄に結び付いたラベルがあるかを確認します。プレースホルダーだけの欄は、目に見えるラベルに置き換え、関連する選択肢は legend を持つ fieldset で囲みます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Associate labels with form controls
Properly associated labels ensure that screen readers can identify the purpose of form inputs and increase the clickable area for users with motor impairments.
Quick Reference
- Use
<label>elements for all form inputs - Connect labels using
forandidattributes - Placeholder text is not a label and must not be the only field name
- Use
<fieldset>and<legend>when multiple controls share one question - Ensure every input has a clear, accessible name
Check
Verify that all form controls (input, select, textarea) have programmatically associated labels using the 'for' and 'id' attributes. Flag placeholder-only labels and grouped controls that lack a fieldset legend.
Fix
Add a <label> element with a 'for' attribute that matches the 'id' of the corresponding input field. Replace placeholder-only labels with real label text and wrap related checkboxes or radio buttons in a <fieldset> with a <legend>.
Explain
Explain why associated labels are critical for screen reader users and how they improve the hit area for touch and mouse users.
Code Review
Review the rendered markup and interactive states that affect Associate labels with form controls. 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. Specifically check for placeholder-only labels and question groups that visually share a heading but lack a semantic <fieldset> and <legend>.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/accessibility/form-labels
よくある質問
プレースホルダーだけでは不十分なのはなぜですか?
プレースホルダーのテキストは、入力を始めると消えてしまい、ラベルの代わりにはならないとこのスキルは説明しています。
fieldset は何をしますか?
ラジオボタンなどの関連する選択肢を、legend と呼ばれる一つの共通の質問の下にまとめます。
ラベルはなぜタッチの利用者の助けになりますか?
結び付いたラベルは、クリックできる領域を広げるため、手の動きに困難がある人の助けになるからです。
詳細
作者による元の説明
Use when reviewing rendered HTML, interactive components, or design-system patterns related to Associate labels with form controls. Check native semantics first, then inspect keyboard behavior, focus flow, accessible names, and screen-reader output where relevant.
人気
- GitHubのスター
- 75k
- ランキング
- #2858
- ライセンス
- 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 において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。