Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonren0403 authored Jun 6, 2024
1 parent 6aece42 commit 1b8f142
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ l10n:

## 颜色

- 颜色对比度**必须**遵循 [WCAG 2.1 AA 等级需求](https://www.w3.org/TR/WCAG/#contrast-minimum)
- 颜色对比度必须遵循 [WCAG 2.1 AA 等级需求](https://www.w3.org/TR/WCAG/#contrast-minimum)

- 普通文本的对比率为 4.5:1(小于 18 磅或黑体 14 磅)
- 大文本对比率为 3:1(大于等于 18 磅或黑体 14 磅)
Expand All @@ -21,26 +21,26 @@ l10n:
## 可视化

- 内容隐藏技术(如零不透明度、z-index 顺序和离屏位置)不得仅用于处理可见性。
- 当前可见的屏幕之外的内容,必须是不可见的(特别是单一页面应用中包含多个卡片选项):
- 当前可见的屏幕之外的内容,必须*确实*是不可见的(特别是单一页面应用中的多个*卡片*):

- 使用 `hidden` 特性或 `visibility``display` 样式属性。
- 使用 `hidden` 特性或 `visibility``display` 样式属性。
- 除非不可避免,不应该使用 `aria-hidden` 特性。

## 焦点

- 所有可激活元素必须可被聚焦:

- 标准控件,如链接、按钮、表单域默认可被聚焦。
- 非标准控件必须分配给它们一个适当的 [ARIA 角色](http://www.w3.org/TR/wai-aria/roles) `button``link``checkbox`
- 非标准控件必须为它们分配一个适当的 [ARIA 角色](http://www.w3.org/TR/wai-aria/roles)`button``link``checkbox`

- 焦点应该是有逻辑顺序,且方式一致。
- 焦点应该有逻辑顺序,且方式一致。

## 文本等效

- 应用中,每个展示的非文本元素都必须提供等效文本。

- 恰当的位置使用 _alt__title_(请参考 Steve Faulkner 关于[使用 HTML title 特性](https://www.tpgi.com/using-the-html-title-attribute-updated/) 的帖子。)
- 如果上面的特性不适用,使用恰当的[ARIA 状态与属性](https://www.w3.org/TR/wai-aria-1.1/#state_prop_def),比如 `aria-label``aria-labelledby``aria-describedby`
- 如果上面的特性不适用,使用恰当的 [ARIA 状态与属性](https://www.w3.org/TR/wai-aria-1.1/#state_prop_def),比如 `aria-label``aria-labelledby``aria-describedby`

- 必须避免使用文本图像。
- 所有带有可见文本(或文本图片)作为标签的用户界面组件必须在组件的编程[名称](https://www.w3.org/TR/WCAG21/#dfn-name)中提供相同的文本。见 [WCAG 2.1:名称中的标签](https://www.w3.org/WAI/WCAG21/Understanding/label-in-name.html)
Expand All @@ -52,13 +52,13 @@ l10n:

## 方向

- 内容不应仅限于单一方向,如纵向或横向,除非必要。见 [WCAG 2.1:方向](https://www.w3.org/WAI/WCAG21/Understanding/orientation.html)
- 除非必要,否则不应将内容限制在单一方向,如纵向或横向。见 [WCAG 2.1:方向](https://www.w3.org/WAI/WCAG21/Understanding/orientation.html)

- 例如,钢琴应用程序和银行支票都需要一定的方向。

## 通用指南

- 应用(title)必须提供标题
- 应用必须提供标题(title)。
- 标题(heading)不能破坏层次结构。

```html
Expand All @@ -68,7 +68,7 @@ l10n:
<h3>三级标题</h3>
```

- 应使用 [ARIA 地标角色](https://www.washington.edu/accessibility/websites/regions/) 描述应用或文档的结构,如 `banner``complementary``contentinfo``main``navigation``search`
- 应使用 [ARIA 地标角色](https://www.washington.edu/accessibility/websites/regions/)描述应用或文档的结构,如 `banner``complementary``contentinfo``main``navigation``search`
- 对于触摸事件,以下至少有一项必须为真([WCAG 2.1:指针取消](https://www.w3.org/WAI/WCAG21/Understanding/pointer-cancellation.html)):

- 不应使用按下事件来触发任何操作
Expand Down

0 comments on commit 1b8f142

Please sign in to comment.