Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(cn): translate content/docs/accessibility.md into Chinese #175

Merged
merged 33 commits into from
Apr 28, 2019

Conversation

ghycy15
Copy link
Contributor

@ghycy15 ghycy15 commented Mar 21, 2019

No description provided.

@netlify
Copy link

netlify bot commented Mar 21, 2019

Deploy preview for cn-reactjs ready!

Built with commit c75ae5b

https://deploy-preview-175--cn-reactjs.netlify.com

@netlify
Copy link

netlify bot commented Mar 21, 2019

Deploy preview for zh-hans-reactjs ready!

Built with commit c75ae5b

https://deploy-preview-175--zh-hans-reactjs.netlify.com

@QC-L
Copy link
Member

QC-L commented Mar 21, 2019

@ghycy15 Nice work!

@QC-L QC-L added the Pending Review 已翻译,待校对阶段 label Mar 21, 2019
@ghycy15 ghycy15 mentioned this pull request Mar 21, 2019

Web accessibility (also referred to as [**a11y**](https://en.wiktionary.org/wiki/a11y)) is the design and creation of websites that can be used by everyone. Accessibility support is necessary to allow assistive technology to interpret web pages.
网络无障碍辅助功能(Accessibility,也被称为 [**a11y**](https://en.wiktionary.org/wiki/a11y),因为以A开头,以Y结尾,一共11个字母)是一种可以帮助所有人获得服务的设计和创造。为了使辅助技术可以正确的解读您的网页,无障碍辅助功能是必要的。
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为了使辅助技术可以正确的解读您的网页,无障碍辅助功能是必要的。
--> 无障碍辅助功能是使得辅助技术正确解读网页的必要条件。


React fully supports building accessible websites, often by using standard HTML techniques.
React 通常使用标准 HTML 技术来完全支持创建具有可访问性的网站。
Copy link

@RoseLu RoseLu Mar 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

React对于创建可访问网站有着全面的支持,而这通常是通过标准html技术实现的。


Note that all `aria-*` HTML attributes are fully supported in JSX. Whereas most DOM properties and attributes in React are camelCased, these attributes should be hyphen-cased (also known as kebab-case, lisp-case, etc) as they are in plain HTML:
注意:JSX 支持所有 `aria-*` HTML 属性。虽然大多数 React 的 DOM 变量和属性命名都使用驼峰命名(camelCased),`aria-*` 应该使用带连字符的命名法(也叫诸如 hyphen-casedkebab-case, lisp-case),就像在 HTML 中一样。
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aria-* 应该使用带连字符的命名法(也叫诸如 hyphen-cased,kebab-case, lisp-case),就像在 HTML 中一样。
--> 但aria-* 应该像其在HTML中一样使用带连字符的命名法(也叫诸如 hyphen-cased,kebab-case, lisp-case)。


Sometimes we break HTML semantics when we add `<div>` elements to our JSX to make our React code work, especially when working with lists (`<ol>`, `<ul>` and `<dl>`) and the HTML `<table>`.
In these cases we should rather use [React Fragments](/docs/fragments.html) to group together multiple elements.
在 JSX 中使用 `<div>` 元素来实现我们的 React 代码功能的时候,尤其当我们使用列表(`<ol>`, `<ul>` 和 `<dl>`)和 HTML `<table>` 时,HTML 语义会被破坏。
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一些时候,HTML语义会被破坏,比如当在JSX中添加 <div> 元素以实现 React 代码功能,又或是在使用列表(<ol><ul><dl>)和 HTML <table> 时。

### Labeling {#labeling}
Every HTML form control, such as `<input>` and `<textarea>`, needs to be labeled accessibly. We need to provide descriptive labels that are also exposed to screen readers.
### 标记 {#labeling}
所有的 HTML 表单控制,例如 `<input>` `<textarea>` ,都需要标注来实现无障碍辅助功能。我们需要提供屏幕朗读器以解释性标注。
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

所有的 HTML 表单控制,例如 <input><textarea> ,都需要标注来实现无障碍辅助功能
--所有的 HTML 表单控制,例如 <input><textarea> ,都需要 被 标注来实现无障碍辅助功能

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RoseLu 你可以使用这个功能
image


Ensure that your web application can be fully operated with the keyboard only:
确保你的网络应用可以在只使用键盘的情况下使用:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

确保你的网络应用在即使只拥有键盘的环境下正常运作。

content/docs/accessibility.md Outdated Show resolved Hide resolved
content/docs/accessibility.md Outdated Show resolved Hide resolved
content/docs/accessibility.md Outdated Show resolved Hide resolved
content/docs/accessibility.md Outdated Show resolved Hide resolved
content/docs/accessibility.md Outdated Show resolved Hide resolved
content/docs/accessibility.md Outdated Show resolved Hide resolved
content/docs/accessibility.md Outdated Show resolved Hide resolved
content/docs/accessibility.md Outdated Show resolved Hide resolved
content/docs/accessibility.md Outdated Show resolved Hide resolved
content/docs/accessibility.md Outdated Show resolved Hide resolved
Copy link
Member

@yuqingc yuqingc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

主要两个问题

  • 行数对应
  • 所有“您”全局替换为“你”

## Semantic HTML {#semantic-html}
Semantic HTML is the foundation of accessibility in a web application. Using the various HTML elements to reinforce the meaning of information
in our websites will often give us accessibility for free.
## HTML 语义 {#semantic-html}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个不是说 HTML 的语义。应该是“语义化的 HTML”。HTML semantics 才是"HTML语义"。因为只有部分语义化的 HTML 标签才可以用来做无障碍。比如 按钮 button。下同

content/docs/accessibility.md Outdated Show resolved Hide resolved
this.textInput = React.createRef();
}
render() {
// Use the `ref` callback to store a reference to the text input DOM
// element in an instance field (for example, this.textInput).
// 使用 `ref` 回调函数以在实例的一个变量中存储文本输入 DOM 元素 (比如,this.textInput)。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

行数最好对应上。最好拆成两行,

content/docs/accessibility.md Outdated Show resolved Hide resolved
content/docs/accessibility.md Outdated Show resolved Hide resolved
content/docs/accessibility.md Outdated Show resolved Hide resolved
content/docs/accessibility.md Outdated Show resolved Hide resolved
content/docs/accessibility.md Outdated Show resolved Hide resolved
content/docs/accessibility.md Outdated Show resolved Hide resolved
content/docs/accessibility.md Outdated Show resolved Hide resolved
QC-L and others added 3 commits April 27, 2019 10:38
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
QC-L and others added 24 commits April 27, 2019 10:39
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Copy link
Member

@QC-L QC-L left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@yuqingc yuqingc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@QC-L QC-L changed the title A11y translate docs(cn): translate content/docs/accessibility.md into Chinese Apr 28, 2019
@QC-L QC-L merged commit 8651822 into reactjs:master Apr 28, 2019
OhIAmFine pushed a commit to OhIAmFine/zh-hans.reactjs.org that referenced this pull request May 6, 2019
…js#175)

* Update accessibility.md

* translate content/docs/accessibility.md to Chinese

* Resolve review comments

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Update content/docs/accessibility.md

Co-Authored-By: ghycy15 <guhuyue@hotmail.com>

* Resolve review comments
@awxiaoxian2020 awxiaoxian2020 removed the Pending Review 已翻译,待校对阶段 label Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants