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

aria-toggle-field-name

できること

このスキルは、チェックボックス、ラジオボタン、スイッチのそれぞれに、分かりやすい名前があるかを確認します。切り替え操作のあるフォームや設定ページを作る開発者向けです。

使う場面

  • ✓チェックボックス、ラジオボタン、スイッチを作っているとき。
  • ✓切り替えに見えるラベルがないか、アイコンだけのとき。
  • ✓設定ページのスイッチに、スクリーンリーダー向けの説明がないとき。

スキルのリンク

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/aria-toggle-field-name/SKILL.md

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

使い方

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

貼り付け用メッセージ

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

AIへの頼み方の例

“私の設定ページのすべてのスイッチに、スクリーンリーダーで読み上げられる名前があるか確認してください。”

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

仕組み

エージェントは、各切り替えにlabel要素、aria-label、aria-labelledbyのいずれかがあることを確認し、ない場合には分かりやすい名前を追加します。

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

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

Provide accessible names for toggle fields

Toggle fields like checkboxes and switches are unusable for screen reader users if they don't have a label, as the user won't know what they are turning on or off.

Quick Reference

  • Use aria-label, aria-labelledby, or <label> for checkboxes and radios
  • Ensure the label clearly describes the state or action of the toggle
  • Avoid empty or non-descriptive labels for switches

Check

Check all toggle fields (checkboxes, radio buttons, switches) for a valid accessible name.

Fix

Add an accessible name to the toggle field using a label element, aria-label, or aria-labelledby.

Explain

Explain why all interactive toggle controls must have descriptive names for users to understand their purpose.

Code Review

Review the rendered markup and interactive states that affect Provide accessible names for toggle fields. 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/aria-toggle-field-name

よくある質問

切り替えには、なぜ名前が必要ですか?

名前がなければ、利用者は何をオンまたはオフにするのか分からないと、このスキルは説明しています。

切り替えに名前を付けられる方法は何ですか?

label要素、aria-label、aria-labelledbyです。

スイッチには特別な配慮が必要ですか?

はい。このスキルでは、スイッチに空の、または曖昧なラベルを付けることを警告しています。

詳細

作者による元の説明

Use when reviewing rendered HTML, interactive components, or design-system patterns related to Provide accessible names for toggle fields. 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
ランキング
#2739
ライセンス
MIT
更新日
2026/10/31

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

0

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

コメント

  • …

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

似ているスキル