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

landmark-regions

它能做什么

这个技能检查页面的主要区域是否使用了正确的地标元素进行标记。它面向构建无障碍页面的开发者和内容编辑。

适用场景

  • ✓页面由没有语义含义的通用容器构成的时候。
  • ✓页面有多个不易区分的导航区域的时候。
  • ✓你在构建新的布局组件的时候。

技能链接

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

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“请帮我更新布局,让页头、导航和页脚使用正确的地标吗?”

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

工作原理

智能体会检查页面布局,并建议为 header、nav、main 和 footer 使用语义元素。如果页面中有多个同类区域,它会建议添加标签。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Use landmark regions correctly

Landmark regions allow screen reader users to quickly identify and jump to major sections of a page, significantly improving navigation efficiency.

Quick Reference

  • Use HTML5 landmark elements like <header>, <nav>, <main>, and <footer>
  • Ensure each landmark appears only once where appropriate (e.g., one <main>)
  • Provide labels for multiple landmarks of the same type using aria-label

Check

Verify that the page uses appropriate HTML5 landmark elements and that they are correctly structured.

Fix

Replace generic <div> containers with semantic landmark elements like <header>, <nav>, <main>, and <footer>.

Explain

Explain how landmark regions assist assistive technology users in navigating complex page layouts.

Code Review

Review the rendered markup and interactive states that affect Use landmark regions correctly. 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/landmark-regions

常见问题

什么是地标?

它们是屏幕阅读器可以列出并在其间跳转的页面区域,例如导航或主要内容。

如果有两个导航区域怎么办?

这个技能建议为每个导航区域添加 aria-label,以便用户区分它们。

每个地标是否只应出现一次?

这个技能说,有些地标,例如 main,每个页面应该只出现一次。

详情

作者的原始描述

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

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能