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

accordion-accessibility

できること

このスキルは、アコーディオンなどの開閉できるセクションが、誰にとっても開いて理解できるかを確認します。FAQリストや展開できるメニューを作る開発者向けです。

使う場面

  • ✓アコーディオンや開閉できるFAQのセクションを作っているとき。
  • ✓キーボードの利用者が、展開されたパネルの中で動けなくなるとき。
  • ✓スクリーンリーダーの利用者が、どのセクションが開いているか分からないとき。

スキルのリンク

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

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

使い方

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

貼り付け用メッセージ

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

AIへの頼み方の例

“当社の料金ページのFAQのアコーディオンが、キーボードとスクリーンリーダーで使えるようにしてください。”

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

仕組み

エージェントは、各セクションの見出しが展開状態を持つ本物のボタンであり、そのパネルとリンクしていること、そして想定されたキーで移動と開閉ができることを確認します。

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

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

Make accordions keyboard navigable

Poorly implemented accordions trap keyboard users and leave screen reader users unable to understand or navigate collapsed content sections.

Quick Reference

  • Use button elements for accordion triggers with aria-expanded
  • Associate panels with triggers using aria-controls
  • Support Arrow keys for navigation between headers
  • Use heading elements appropriately for document structure

Check

Verify accordions use button triggers with aria-expanded, aria-controls, and proper keyboard navigation (Enter, Space, arrows).

Fix

Implement accordions with button elements, aria-expanded state, aria-controls linking to content panels, and keyboard support.

Explain

Explain the ARIA pattern for accessible accordions and how they enable keyboard and screen reader users to navigate collapsible content.

Code Review

Review templates, server-rendered HTML, and shared components that output markup related to Make accordions keyboard navigable. Flag exact elements, attributes, and routes where the rendered HTML violates the rule.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/html/accordion-accessibility

よくある質問

アコーディオンの見出しは、なぜボタンにすべきですか?

ボタンはキーボード対応が組み込まれており、ただのクリックできる箱と違って、スクリーンリーダーに正しく読み上げられるためです。

aria-expandedはスクリーンリーダーに何を伝えますか?

そのセクションが現在開いているか閉じているかです。

このスキルは矢印キーについても扱いますか?

はい。良いアコーディオンの動作の一部として、見出しの間を移動するための矢印キーを挙げています。

詳細

作者による元の説明

Use when reviewing templates, rendered HTML, or shared components related to Make accordions keyboard navigable. Validate the final browser-facing markup, not just the source framework abstraction.

repo: thedaviddias/Front-End-Checklist

人気

GitHubのスター
75k
ランキング
#2714
ライセンス
MIT
更新日
2026/10/31

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

0

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

コメント

  • …

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

似ているスキル