@@ -368,86 +368,86 @@ class BlurExample extends React.Component {
}
```
-This code exposes the functionality to both pointer device and keyboard users. Also note the added `aria-*` props to support screen-reader users. For simplicity's sake
-the keyboard events to enable `arrow key` interaction of the popover options have not been implemented.
+以上代码使得键盘和鼠标用户都可以使用我们的功能。请注意我们添加了 `aria-*` props 以服务屏幕朗读器用户。
+作为一个简单的例子,我们没有实现使用`方向键`来与弹窗互动。
-

+

-This is one example of many cases where depending on only pointer and mouse events will break functionality for keyboard users. Always testing with the keyboard will immediately
-highlight the problem areas which can then be fixed by using keyboard aware event handlers.
+这只是众多只依赖于鼠标和指针的程序破坏键盘用户的例子之一。始终使用键盘测试会让你迅速发现这些问题,
+你可以使用适用于键盘的事件处理器来修复这些问题。
-## More Complex Widgets {#more-complex-widgets}
+## 更复杂的部件 {#more-complex-widgets}
-A more complex user experience should not mean a less accessible one. Whereas accessibility is most easily achieved by coding as close to HTML as possible,
-even the most complex widget can be coded accessibly.
+一个更加复杂的用户体验并不意味着更加难以访问。通过尽可能接近 HTML 编程,无障碍访问会变得更加容易,
+即使最复杂的部件也可以实现无障碍访问。
-Here we require knowledge of [ARIA Roles](https://www.w3.org/TR/wai-aria/#roles) as well as [ARIA States and Properties](https://www.w3.org/TR/wai-aria/#states_and_properties).
-These are toolboxes filled with HTML attributes that are fully supported in JSX and enable us to construct fully accessible, highly functional React components.
+这里我们需要了解 [ARIA Roles](https://www.w3.org/TR/wai-aria/#roles) 和 [ARIA States and Properties](https://www.w3.org/TR/wai-aria/#states_and_properties) 的知识。
+其中有包含了多种 HTML 属性的工具箱,这些 HTML 属性被 JSX 完全支持并且可以帮助我们搭建完全无障碍,功能强大的 React 组件。
-Each type of widget has a specific design pattern and is expected to function in a certain way by users and user agents alike:
+每一种部件都有一种特定的设计模式,并且用户和用户代理都会期待使用相似的方法使用它:
-- [WAI-ARIA Authoring Practices - Design Patterns and Widgets](https://www.w3.org/TR/wai-aria-practices/#aria_ex)
+- [WAI-ARIA 创作实践 —— 设计模式和部件](https://www.w3.org/TR/wai-aria-practices/#aria_ex)
- [Heydon Pickering - ARIA Examples](https://heydonworks.com/practical_aria_examples/)
-- [Inclusive Components](https://inclusive-components.design/)
+- [包容性组件(Inclusive Components)](https://inclusive-components.design/)
-## Other Points for Consideration {#other-points-for-consideration}
+## 其他考虑因素 {#other-points-for-consideration}
-### Setting the language {#setting-the-language}
+### 设置语言 {#setting-the-language}
-Indicate the human language of page texts as screen reader software uses this to select the correct voice settings:
+为了使屏幕朗读器可以使用正确的语音设置,请在网页上设置正确的人类语言:
-- [WebAIM - Document Language](https://webaim.org/techniques/screenreader/#language)
+- [WebAIM —— 文档语言](https://webaim.org/techniques/screenreader/#language)
-### Setting the document title {#setting-the-document-title}
+### 设置文档标题 {#setting-the-document-title}
-Set the document `
` to correctly describe the current page content as this ensures that the user remains aware of the current page context:
+为了确保用户可以了解当前网页的内容,我们需要把文档的 `` 设置为可以正确描述当前页面的文字。
-- [WCAG - Understanding the Document Title Requirement](https://www.w3.org/TR/UNDERSTANDING-WCAG20/navigation-mechanisms-title.html)
+- [WCAG —— 理解文档标题的要求](https://www.w3.org/TR/UNDERSTANDING-WCAG20/navigation-mechanisms-title.html)
-We can set this in React using the [React Document Title Component](https://github.com/gaearon/react-document-title).
+在 React 中,我们可以使用 [React 文档标题组件(React Document Title Component)](https://github.com/gaearon/react-document-title)来设置标题。
-### Color contrast {#color-contrast}
+### 色彩对比度 {#color-contrast}
-Ensure that all readable text on your website has sufficient color contrast to remain maximally readable by users with low vision:
+为了尽可能让视力障碍用户可以阅读你网站上的所有可读文字,请确保你的文字都有足够的色彩对比度。
-- [WCAG - Understanding the Color Contrast Requirement](https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html)
-- [Everything About Color Contrast And Why You Should Rethink It](https://www.smashingmagazine.com/2014/10/color-contrast-tips-and-tools-for-accessibility/)
-- [A11yProject - What is Color Contrast](https://a11yproject.com/posts/what-is-color-contrast/)
+- [WCAG —— 理解色彩对比度要求](https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html)
+- [有关色彩对比度的一切以及为何你应该重新考虑它](https://www.smashingmagazine.com/2014/10/color-contrast-tips-and-tools-for-accessibility/)
+- [A11yProject —— 什么是色彩对比度](https://a11yproject.com/posts/what-is-color-contrast/)
-It can be tedious to manually calculate the proper color combinations for all cases in your website so instead, you can [calculate an entire accessible color palette with Colorable](https://jxnblk.com/colorable/).
+手工计算你网站上所有恰当的色彩组合会是乏味的。所以,作为代替,你可以[使用 Colorable 来计算出一个完全无障碍的调色板](https://jxnblk.com/colorable/)。
-Both the aXe and WAVE tools mentioned below also include color contrast tests and will report on contrast errors.
+下面介绍的 aXe 和 WAVE 都支持色彩对比度测试并会报告对比度错误。
-If you want to extend your contrast testing abilities you can use these tools:
+如果你想扩展对比度测试能力,可以使用以下工具:
-- [WebAIM - Color Contrast Checker](https://webaim.org/resources/contrastchecker/)
-- [The Paciello Group - Color Contrast Analyzer](https://www.paciellogroup.com/resources/contrastanalyser/)
+- [WebAIM —— 色彩对比度检验工具](https://webaim.org/resources/contrastchecker/)
+- [The Paciello Group —— 色彩对比度分析工具](https://www.paciellogroup.com/resources/contrastanalyser/)
-## Development and Testing Tools {#development-and-testing-tools}
+## 开发及测试 {#development-and-testing-tools}
-There are a number of tools we can use to assist in the creation of accessible web applications.
+我们可以利用很多工具来帮助我们创建无障碍的网络应用。
-### The keyboard {#the-keyboard}
+### 键盘 {#the-keyboard}
-By far the easiest and also one of the most important checks is to test if your entire website can be reached and used with the keyboard alone. Do this by:
+最最简单也是最最重要的检测是确保你的整个网站都可以被只使用键盘的用户使用和访问。你可以通过如下步骤进行检测:
-1. Plugging out your mouse.
-1. Using `Tab` and `Shift+Tab` to browse.
-1. Using `Enter` to activate elements.
-1. Where required, using your keyboard arrow keys to interact with some elements, such as menus and dropdowns.
+1. 拔掉鼠标
+1. 使用 `Tab` 和 `Shift+Tab` 来浏览。
+1. 使用 `Enter` 来激活元素。
+1. 当需要时,使用键盘上的方向键来和某些元素互动,比如菜单和下拉选项。
-### Development assistance {#development-assistance}
+### 开发辅助 {#development-assistance}
-We can check some accessibility features directly in our JSX code. Often intellisense checks are already provided in JSX aware IDE's for the ARIA roles, states and properties. We also
-have access to the following tool:
+我们可以直接在 JSX 代码中检测一些无障碍复制功能。通常支持 JSX 的 IDE 会针对 ARIA roles,states 和 properties 提供智能检测。
+我们也可以使用以下工具:
#### eslint-plugin-jsx-a11y {#eslint-plugin-jsx-a11y}
-The [eslint-plugin-jsx-a11y](https://github.com/evcohen/eslint-plugin-jsx-a11y) plugin for ESLint provides AST linting feedback regarding accessibility issues in your JSX. Many
-IDE's allow you to integrate these findings directly into code analysis and source code windows.
+ESLint 中的 [eslint-plugin-jsx-a11y](https://github.com/evcohen/eslint-plugin-jsx-a11y) 插件为你的 JSX 中的无障碍问题提供了 AST 的语法检测反馈。
+许多 IDE 都允许你把这些发现直接集成到代码分析和源文件窗口中。
-[Create React App](https://github.com/facebookincubator/create-react-app) has this plugin with a subset of rules activated. If you want to enable even more accessibility rules,
-you can create an `.eslintrc` file in the root of your project with this content:
+[创建 React 应用](https://github.com/facebookincubator/create-react-app)中使用了这个插件中的一部分规则。
+如果你想启用更多的无障碍规则,你可以在项目的根目录中创建一个有如下内容的 `.eslintrc` 文件:
```json
{
@@ -456,77 +456,77 @@ you can create an `.eslintrc` file in the root of your project with this content
}
```
-### Testing accessibility in the browser {#testing-accessibility-in-the-browser}
+### 在浏览器中测试无障碍辅助功能 {#testing-accessibility-in-the-browser}
-A number of tools exist that can run accessibility audits on web pages in your browser. Please use them in combination with other accessibility checks mentioned here as they can only
-test the technical accessibility of your HTML.
+已有很多工具可以在您的浏览器内进行网页的无障碍性验证。
+因为它们只能检测你 HTML 的技术无障碍性,所以请将它们与这里提到的无障碍检测工具一起使用。
-#### aXe, aXe-core and react-axe {#axe-axe-core-and-react-axe}
+#### aXe,aXe-core 以及 react-axe {#axe-axe-core-and-react-axe}
-Deque Systems offers [aXe-core](https://github.com/dequelabs/axe-core) for automated and end-to-end accessibility tests of your applications. This module includes integrations for Selenium.
+Deque 系统提供了 [aXe-core](https://github.com/dequelabs/axe-core) 以对你的应用进行自动及端至端无障碍性测试。这个组件包含了对 Selenium 的集成。
-[The Accessibility Engine](https://www.deque.com/products/axe/) or aXe, is an accessibility inspector browser extension built on `aXe-core`.
+[无障碍访问引擎(The Accessibility Engine)](https://www.deque.com/products/axe/),简称 aXe,是一个基于 `aXe-core` 的无障碍访问性检测器。
-You can also use the [react-axe](https://github.com/dylanb/react-axe) module to report these accessibility findings directly to the console while developing and debugging.
+在开发和 debug 时,你也可以使用 [react-axe](https://github.com/dylanb/react-axe) 组件直接把无障碍访问的发现显示在控制台中。
#### WebAIM WAVE {#webaim-wave}
-The [Web Accessibility Evaluation Tool](https://wave.webaim.org/extension/) is another accessibility browser extension.
+[网络无障碍性评估工具(Web Accessibility Evaluation Tool)](https://wave.webaim.org/extension/)也是一个无障碍辅助的浏览器插件。
-#### Accessibility inspectors and the Accessibility Tree {#accessibility-inspectors-and-the-accessibility-tree}
+#### 无障碍辅助功能检测器和无障碍辅助功能树 {#accessibility-inspectors-and-the-accessibility-tree}
-[The Accessibility Tree](https://www.paciellogroup.com/blog/2015/01/the-browser-accessibility-tree/) is a subset of the DOM tree that contains accessible objects for every DOM element that should be exposed
-to assistive technology, such as screen readers.
+[无障碍辅助功能树](https://www.paciellogroup.com/blog/2015/01/the-browser-accessibility-tree/)是 DOM 树的一个子集,
+其中包含了所有 DOM 元素中应该被暴露给无障碍辅助技术(比如屏幕朗读器)的无障碍辅助对象。
-In some browsers we can easily view the accessibility information for each element in the accessibility tree:
+在一些浏览器中,我们可以在无障碍辅助功能树中轻松的看到每个元素的无障碍辅助功能信息:
-- [Using the Accessibility Inspector in Firefox](https://developer.mozilla.org/en-US/docs/Tools/Accessibility_inspector)
-- [Activate the Accessibility Inspector in Chrome](https://gist.github.com/marcysutton/0a42f815878c159517a55e6652e3b23a)
-- [Using the Accessibility Inspector in OS X Safari](https://developer.apple.com/library/content/documentation/Accessibility/Conceptual/AccessibilityMacOSX/OSXAXTestingApps.html)
+- [在 Firefox 中使用无障碍辅助功能检测器](https://developer.mozilla.org/en-US/docs/Tools/Accessibility_inspector)
+- [在 Chrome 中激活无障碍辅助功能检测器](https://gist.github.com/marcysutton/0a42f815878c159517a55e6652e3b23a)
+- [在 OS X Safari 中使用无障碍辅助功能检测器](https://developer.apple.com/library/content/documentation/Accessibility/Conceptual/AccessibilityMacOSX/OSXAXTestingApps.html)
-### Screen readers {#screen-readers}
+### 屏幕朗读器 {#screen-readers}
-Testing with a screen reader should form part of your accessibility tests.
+使用屏幕朗读器测试应该是你无障碍辅助功能测试的一部分。
-Please note that browser / screen reader combinations matter. It is recommended that you test your application in the browser best suited to your screen reader of choice.
+请注意,浏览器与屏幕朗读器的组合很重要。我们建议在最适用于你的屏幕朗读器的浏览器中测试你的应用。
-### Commonly Used Screen Readers {#commonly-used-screen-readers}
+### 常用屏幕朗读器 {#commonly-used-screen-readers}
-#### NVDA in Firefox {#nvda-in-firefox}
+#### 火狐中的 NVDA {#nvda-in-firefox}
-[NonVisual Desktop Access](https://www.nvaccess.org/) or NVDA is an open source Windows screen reader that is widely used.
+[NonVisual Desktop Access](https://www.nvaccess.org/),简称 NVDA,是一个被广泛使用的 Windows 开源屏幕朗读器。
-Refer to the following guides on how to best use NVDA:
+想要了解怎么样最好的使用 NVDA,请参考下面的指南:
-- [WebAIM - Using NVDA to Evaluate Web Accessibility](https://webaim.org/articles/nvda/)
-- [Deque - NVDA Keyboard Shortcuts](https://dequeuniversity.com/screenreaders/nvda-keyboard-shortcuts)
+- [WebAIM —— 使用 NVD A来评估网络的可无障碍访问性](https://webaim.org/articles/nvda/)
+- [Deque —— NVDA 键盘快捷键](https://dequeuniversity.com/screenreaders/nvda-keyboard-shortcuts)
-#### VoiceOver in Safari {#voiceover-in-safari}
+#### Safari 中的 VoiceOver {#voiceover-in-safari}
-VoiceOver is an integrated screen reader on Apple devices.
+VoiceOver 是苹果设备的自带屏幕朗读器。
-Refer to the following guides on how activate and use VoiceOver:
+想要了解如何激活以及使用 VoiceOver,请参考下面的指南:
-- [WebAIM - Using VoiceOver to Evaluate Web Accessibility](https://webaim.org/articles/voiceover/)
-- [Deque - VoiceOver for OS X Keyboard Shortcuts](https://dequeuniversity.com/screenreaders/voiceover-keyboard-shortcuts)
-- [Deque - VoiceOver for iOS Shortcuts](https://dequeuniversity.com/screenreaders/voiceover-ios-shortcuts)
+- [WebAIM —— 使用 VoiceOver 来评估网络的可无障碍访问性](https://webaim.org/articles/voiceover/)
+- [Deque —— OS X 中的 VoiceOver 键盘快捷键](https://dequeuniversity.com/screenreaders/voiceover-keyboard-shortcuts)
+- [Deque —— iOS 中的 VoiceOver 快捷键](https://dequeuniversity.com/screenreaders/voiceover-ios-shortcuts)
-#### JAWS in Internet Explorer {#jaws-in-internet-explorer}
+#### Internet Explorer 中的 JAWS {#jaws-in-internet-explorer}
-[Job Access With Speech](https://www.freedomscientific.com/Products/software/JAWS/) or JAWS, is a prolifically used screen reader on Windows.
+[Job Access With Speech](https://www.freedomscientific.com/Products/software/JAWS/)又称 JAWS,是一个常用的 Windows 屏幕朗读器。
-Refer to the following guides on how to best use JAWS:
+想要了解如何最好的使用 VoiceOver,请参考下面的指南:
-- [WebAIM - Using JAWS to Evaluate Web Accessibility](https://webaim.org/articles/jaws/)
-- [Deque - JAWS Keyboard Shortcuts](https://dequeuniversity.com/screenreaders/jaws-keyboard-shortcuts)
+- [WebAIM —— 使用 JAWS 来评估网络的可无障碍访问性](https://webaim.org/articles/jaws/)
+- [Deque —— JAWS 键盘快捷键](https://dequeuniversity.com/screenreaders/jaws-keyboard-shortcuts)
-### Other Screen Readers {#other-screen-readers}
+### 其他屏幕朗读器 {#other-screen-readers}
-#### ChromeVox in Google Chrome {#chromevox-in-google-chrome}
+#### Google Chrome 中的 ChromeVox {#chromevox-in-google-chrome}
-[ChromeVox](https://www.chromevox.com/) is an integrated screen reader on Chromebooks and is available [as an extension](https://chrome.google.com/webstore/detail/chromevox/kgejglhpjiefppelpmljglcjbhoiplfn?hl=en) for Google Chrome.
+[ChromeVox](https://www.chromevox.com/)是 Chromebook 的内置屏幕朗读器,同时也是 Google Chrome 中的[一个插件](https://chrome.google.com/webstore/detail/chromevox/kgejglhpjiefppelpmljglcjbhoiplfn?hl=en)。
-Refer to the following guides on how best to use ChromeVox:
+想要了解如何最好的使用 ChromeVox,请参考下面的指南:
-- [Google Chromebook Help - Use the Built-in Screen Reader](https://support.google.com/chromebook/answer/7031755?hl=en)
-- [ChromeVox Classic Keyboard Shortcuts Reference](https://www.chromevox.com/keyboard_shortcuts.html)
+- [Google Chromebook 帮助 —— 使用内置屏幕朗读器](https://support.google.com/chromebook/answer/7031755?hl=en)
+- [ChromeVox 经典键盘快捷键参考](https://www.chromevox.com/keyboard_shortcuts.html)