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

aria-roles

できること

このスキルは、ARIAのロールの値が有効で正しく綴られているかを確認します。カスタムコンポーネントやテンプレートにロールを追加する開発者向けです。

使う場面

  • ✓カスタム要素にrole属性を追加するとき。
  • ✓ロールがページに何の効果もないように見えるとき。
  • ✓カスタムの、または珍しいロール名を使うマークアップをレビューしているとき。

スキルのリンク

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

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

使い方

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

貼り付け用メッセージ

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

AIへの頼み方の例

“私のテンプレートで、綴りを誤っていたり標準でないrole属性を検索し、修正してください。”

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

仕組み

エージェントは標準の一覧にないロールの値を探して修正し、より単純な場合は、ネイティブのHTMLの操作部品を提案します。

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

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

Use valid ARIA role values

Invalid or misspelled ARIA roles are ignored by browsers and assistive technologies, rendering the intended accessibility features useless and potentially confusing users.

Quick Reference

  • Use only standard ARIA roles defined in the W3C specification
  • Avoid typos or non-existent roles (e.g., use checkbox, not check-box)
  • Ensure roles are applied to appropriate HTML elements
  • Prefer native HTML controls over custom ARIA widgets whenever possible

Check

Search for any role attributes that use non-standard or misspelled ARIA role values.

Fix

Replace invalid ARIA roles with the correct, standard values from the WAI-ARIA specification. When a native <button>, <input>, <select>, or other semantic element can replace the custom widget, prefer that change over adding more ARIA.

Explain

Explain why using standardized ARIA roles is critical for ensuring that assistive technologies can interpret and announce elements correctly, and why native HTML controls are usually more reliable than recreating them with ARIA.

Code Review

Review the rendered markup and interactive states that affect Use valid ARIA role 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/aria-roles

よくある質問

綴りを誤ったロールは、どうなりますか?

無視されるため、意図したアクセシビリティの機能が動かないと、このスキルは説明しています。

カスタムの操作部品にはARIAを使うべきですか?

同じ働きができる場合は、buttonやselectなどのネイティブのHTMLの操作部品を最初に使うよう、このスキルは提案しています。

誤りの例を挙げてもらえますか?

このスキルは、無効なロールの例として、checkboxではなくcheck-boxと書くことを挙げています。

詳細

作者による元の説明

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

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

0

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

コメント

  • …

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

似ているスキル