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

aria-valid-attr-value

できること

このスキルは、ARIA属性の中の値が正しい形式かを確認します。スクリーンリーダーが要素の状態を正しく伝えるようにしたい開発者向けです。

使う場面

  • ✓aria-expanded、aria-checkedなどの属性を手で書いているとき。
  • ✓ラベルが、ページにないIDを指しているとき。
  • ✓コンポーネントをARIAの誤りについてレビューしているとき。

スキルのリンク

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/aria-valid-attr-value/SKILL.md

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

使い方

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

貼り付け用メッセージ

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

AIへの頼み方の例

“私のドロップダウンのコードを確認し、型が違うARIAの値や、存在しないIDを指す値がないか調べてください。”

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

仕組み

エージェントは各ARIAの値を、trueやfalseなど許可された型と比べ、aria-labelledbyなどの属性で指定されたIDがページに存在するかを確認します。

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

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

Use valid values for ARIA attributes

Invalid attribute values cause ARIA properties to be ignored or misinterpreted by assistive technologies, leading to a broken or confusing user experience.

Quick Reference

  • Ensure ARIA attribute values (like aria-expanded="true") are valid
  • Avoid using "yes/no" where "true/false" is required
  • Check that IDs referenced in aria-labelledby or aria-owns actually exist

Check

Validate that all ARIA attribute values conform to the allowed types (boolean, integer, ID list, etc.).

Fix

Correct any invalid ARIA attribute values to match the expected format defined in the ARIA specification.

Explain

Explain why precise attribute values are necessary for browsers to correctly communicate element states to assistive technology.

Code Review

Review the rendered markup and interactive states that affect Use valid values for ARIA attributes. 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-valid-attr-value

よくある質問

よくある誤った値は何ですか?

trueまたはfalseが必要なところに、yesやnoを書くことです。

IDの参照は、なぜ重要ですか?

aria-labelledbyのIDが存在しないと、ラベルが失われ、スクリーンリーダーがそれを使えないためです。

属性名も確認しますか?

いいえ。属性名は別の確認で扱われます。

詳細

作者による元の説明

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

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

0

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

コメント

  • …

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

似ているスキル