Loading...
Loading...
Compare original and translation side by side
.u-Heading-XXL.u-Heading-XXL| Element | Use When | Notes |
|---|---|---|
| Page or section header | Can appear multiple times in different contexts |
| Page or section footer | Contact info, copyright, related links |
| Navigation sections | Must be labelled; avoid "navigation" in the label (screen readers announce this) |
| Primary content | Only one per page |
| Tangentially related content | Sidebars, pull quotes, advertising |
| Search functionality | Contains the search form, not the results |
| User input | Only becomes a landmark when labelled via |
| Self-contained content | Would make sense syndicated or standalone |
| Thematic grouping | Only becomes a landmark when labelled |
| 元素 | 适用场景 | 说明 |
|---|---|---|
| 页面或区块头部 | 可在不同上下文多次出现 |
| 页面或区块底部 | 包含联系信息、版权声明、相关链接 |
| 导航区块 | 必须添加标签;标签中避免使用"navigation"(屏幕阅读器会自动播报此内容) |
| 主要内容区域 | 每个页面仅能有一个 |
| 次要关联内容 | 侧边栏、引言引用、广告 |
| 搜索功能区域 | 包含搜索表单,而非搜索结果 |
| 用户输入区域 | 仅当通过 |
| 独立内容区域 | 可被联合发布或独立存在的内容 |
| 主题分组区域 | 仅当添加标签后才会成为地标元素 |
sectiondivsectionaria-labelledbysectionsectiondivsectionaria-labelledbysectionarticlearticlearticleThe address element represents the contact information for its nearest article or body element ancestor.
<p>address元素代表其最近的article或body祖先元素的联系信息。
<p>h1h1Card (generic) → heading level configurable, default h3
└─ ProductCard (specific) → inherits config, may set default based on known context
└─ Used in section with h2 → heading level set to h3Card(通用组件)→ 标题层级可配置,默认h3
└─ ProductCard(特定组件)→ 继承配置,可根据已知上下文设置默认值
└─ 在包含h2的区块中使用 → 标题层级设为h3<p class="u-Heading-L">This looks like a heading</p><p class="u-Heading-L">This looks like a heading</p>| Type | Use When | Example |
|---|---|---|
| Unordered collection where count matters | Nav items, search results |
| Sequential steps or ranked items | Recipes, instructions, top-10 lists |
| Term-description pairs | Glossaries, metadata, key-value pairs |
| Toolbar commands | Action buttons, not navigation |
reversedstart| 类型 | 适用场景 | 示例 |
|---|---|---|
| 项目数量有意义的无序列表 | 导航项、搜索结果 |
| 有序步骤或排名项目 | 食谱、操作指南、十大榜单 |
| 术语-描述对 | 术语表、元数据、键值对 |
| 工具栏命令 | 操作按钮,而非导航 |
reversedstartdetailssummarydldtdddetailssummarydldtdd| Interaction | Default Choice | Consider Link When |
|---|---|---|
| Show more content | | URL params could load the content server-side |
| Toggle view (grid/list) | | URL could preserve view preference |
| Copy to clipboard | | Copied content is a shareable URL |
| Tab selection | | URL could load specific tab content |
| 交互类型 | 默认选择 | 考虑使用链接的场景 |
|---|---|---|
| 显示更多内容 | | URL参数可在服务端加载内容时 |
| 切换视图(网格/列表) | | URL可保存视图偏好时 |
| 复制到剪贴板 | | 复制的内容是可分享的URL时 |
| 标签页切换 | | URL可加载特定标签页内容时 |
fieldsetlegendfieldsetlegendlabelaria-labellabellabellabelaria-labelaria-errormessagearia-invalid="true"aria-describedbyaria-live<label for="email">Email</label>
<input
type="email"
id="email"
aria-invalid="true"
aria-describedby="email-error"
/>
<p id="email-error" class="error">
Enter a valid email address, like name@example.com
</p>aria-errormessagearia-invalid="true"aria-describedbyaria-live<label for="email">Email</label>
<input
type="email"
id="email"
aria-invalid="true"
aria-describedby="email-error"
/>
<p id="email-error" class="error">
请输入有效的邮箱地址,例如 name@example.com
</p>dldlcaptiontheadtbodytfootthscopecaptiontheadtbodytfootscopethdisplay: griddisplay: flexdisplay: griddisplay: flexreferences/element-decision-trees.mdheading-patterns.mdreferences/element-decision-trees.mdheading-patterns.md