跳到正文
Skillpedia
网站与界面(前端)75k · #3013

semantic-lists

它能做什么

这个技能找出由普通 div 构成的相关项目分组,例如菜单、功能、步骤和术语表,并把它们改为正确的列表标记。它面向希望辅助技术能理解其内容的网站构建者。

适用场景

  • ✓你请智能体检查页面上相关项目分组是如何标记的时候。
  • ✓页面中的菜单、步骤或功能列表是用看起来像列表的 div 构成的时候。
  • ✓你需要对术语和定义的配对(例如术语表或常见问题)进行正确标记的时候。

技能链接

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

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/semantic-lists/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我网站上的功能列表和步骤都是用普通 div 做的。请帮我把它们改成正确的列表元素吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会找出相关项目的分组,并用 ul 包裹无序列表,用 ol 包裹有编号的步骤,或用 dl 包裹术语和定义的配对。然后它会在其中加入对应的 li、dt 和 dd 元素。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Use semantic list elements

Screen readers announce list structure and item count—'list with 5 items'—helping users understand content organization. Styled divs provide no context.

Quick Reference

  • Use <ul> for unordered lists (navigation, features, bullets)
  • Use <ol> for ordered sequences (steps, rankings, instructions)
  • Use <dl> for term-definition pairs (glossaries, FAQs)
  • Screen readers announce 'list with X items' for proper lists

Check

Identify groups of related items (navigation menus, product features, steps) and verify they use ul, ol, or dl elements rather than divs or spans styled to look like lists.

Fix

Wrap related items in appropriate list elements: ul for unordered lists, ol for numbered sequences, dl for term-definition pairs. Use li for list items and proper dt/dd for definition lists.

Explain

Explain how screen readers announce 'list with X items' to help users understand content structure, and why styled divs provide no semantic information about grouped content.

Code Review

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

常见问题

屏幕阅读器读到真正的列表时会说什么?

这个技能说,它会播报类似“包含 5 项的列表”的内容,帮助用户理解内容。

什么时候应使用 ol 而不是 ul?

当顺序重要时,例如步骤、排名或说明,使用 ol;其他分组使用 ul。

这次修改后外观会改变吗?

如果样式依赖 div,外观可能会改变,因此智能体应在修改后检查布局。

详情

作者的原始描述

Use when reviewing rendered HTML, interactive components, or design-system patterns related to Use semantic list elements. 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
排名
#3013
许可证
MIT
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能