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

list-structure

できること

このスキルは、HTMLのリストの直下の子要素が、すべてリスト項目であるかを確認します。支援技術でも正しく扱われるリストを作りたいウェブ制作者向けです。

使う場面

  • ✓ページのリストのHTMLマークアップを確認してほしいとき。
  • ✓画面上では問題がないように見えるが、内部のコードが正しくないと疑うとき。
  • ✓テンプレートやコンポーネントが出力するリストが、正しい構造に従っているか確認したいとき。

スキルのリンク

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

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

使い方

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

貼り付け用メッセージ

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

AIへの頼み方の例

“私のサイトのリストが、スクリーンリーダー向けに正しく構成されているか確認してもらえますか。”

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

仕組み

エージェントは、各 ul と ol 要素を調べ、li ではない直下の子要素を探します。そのうえで要素を移動またはラップし、リスト構造を正しくします。

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

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

Use correct list structure

Screen readers rely on a specific parent-child relationship for lists to correctly announce the number of items and the user's current position within the list.

Quick Reference

  • Unordered (<ul>) and ordered (<ol>) lists must only contain <li> elements
  • Do not put other elements like <div> or <p> directly inside a list
  • Ensure nested lists are also properly contained within an <li> element

Check

Check the structure of all lists to ensure only <li> elements are direct children of <ul> or <ol>.

Fix

Remove or move any non-li elements from within <ul> and <ol> tags.

Explain

Explain why assistive technology needs a consistent list structure to provide accurate navigation information.

Code Review

Review the rendered markup and interactive states that affect Use correct list structure. 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/list-structure

よくある質問

リストの直下にdivがあると、何が問題ですか?

スクリーンリーダーは親子関係に頼って項目数や位置を伝えるため、余分な要素があると混乱の原因になります。

リストはネストできますか?

はい。ただし、ネストしたリストは、必ずリスト項目の要素の中に置く必要があります。

修正すると見た目も変わりますか?

誤った構造に依存したスタイルがあれば変わる場合があるため、修正後にレイアウトを確認する必要があります。

詳細

作者による元の説明

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

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

0

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

コメント

  • …

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

似ているスキル