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

aria-dialog-name

できること

このスキルは、モーダルやアラートのダイアログなどのポップアップに、アクセシブルな名前があるかを確認します。ポップアップや確認ボックスを作る開発者向けです。

使う場面

  • ✓モーダル、ポップアップ、確認ダイアログを作っているとき。
  • ✓スクリーンリーダー向けの分かりやすいタイトルがないまま、ダイアログが開くとき。
  • ✓共有のダイアログコンポーネントをレビューしているとき。

スキルのリンク

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

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

使い方

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

貼り付け用メッセージ

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

AIへの頼み方の例

“Cookieの同意のモーダルと削除の確認ボックスに、スクリーンリーダーで読み上げられる名前があるようにしてください。”

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

仕組み

エージェントは各ダイアログの要素に名前があるかを確認し、通常はaria-labelledbyで表示されているタイトルを指すか、分かりやすいaria-labelを追加します。

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

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

Ensure dialogs have an accessible name

When a dialog opens, screen readers should announce its purpose immediately so users know why their focus has shifted and what information is required.

Quick Reference

  • All dialog and alertdialog elements must have a descriptive label
  • Use aria-labelledby to point to a title or aria-label for a direct string
  • Helps users understand the context and purpose of the modal

Check

Verify that every element with role="dialog" or role="alertdialog" has an accessible name.

Fix

Provide an accessible name for the dialog using aria-labelledby (pointing to the header) or aria-label.

Explain

Explain why naming dialogs is crucial for orienting screen reader users when modals appear.

Code Review

Review the rendered markup and interactive states that affect Ensure dialogs have an accessible name. 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-dialog-name

よくある質問

ダイアログには、なぜ名前が必要ですか?

開いたときにスクリーンリーダーがすぐにその目的を読み上げるべきだと、このスキルは説明しています。

aria-labelledbyとaria-labelのどちらを使うべきですか?

表示されているタイトルを指す場合はaria-labelledby、短い文字列の場合はaria-labelを使ってください。

アラートのダイアログにも当てはまりますか?

はい。このスキルは、dialogとalertdialogの両方のロールを扱います。

詳細

作者による元の説明

Use when reviewing rendered HTML, interactive components, or design-system patterns related to Ensure dialogs have an accessible name. 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
ランキング
#2726
ライセンス
MIT
更新日
2026/10/31

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

0

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

コメント

  • …

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

似ているスキル