-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
Deploy preview for cn-reactjs ready! Built with commit c75ae5b |
Deploy preview for zh-hans-reactjs ready! Built with commit c75ae5b |
@ghycy15 Nice work! |
content/docs/accessibility.md
Outdated
|
||
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个字母)是一种可以帮助所有人获得服务的设计和创造。为了使辅助技术可以正确的解读您的网页,无障碍辅助功能是必要的。 |
There was a problem hiding this comment.
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
|
||
React fully supports building accessible websites, often by using standard HTML techniques. | ||
React 通常使用标准 HTML 技术来完全支持创建具有可访问性的网站。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
React对于创建可访问网站有着全面的支持,而这通常是通过标准html技术实现的。
content/docs/accessibility.md
Outdated
|
||
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-cased,kebab-case, lisp-case),就像在 HTML 中一样。 |
There was a problem hiding this comment.
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)。
content/docs/accessibility.md
Outdated
|
||
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 语义会被破坏。 |
There was a problem hiding this comment.
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>
时。
content/docs/accessibility.md
Outdated
### 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>` ,都需要标注来实现无障碍辅助功能。我们需要提供屏幕朗读器以解释性标注。 |
There was a problem hiding this comment.
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>
,都需要 被 标注来实现无障碍辅助功能
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RoseLu 你可以使用这个功能
content/docs/accessibility.md
Outdated
|
||
Ensure that your web application can be fully operated with the keyboard only: | ||
确保你的网络应用可以在只使用键盘的情况下使用: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
确保你的网络应用在即使只拥有键盘的环境下正常运作。
There was a problem hiding this comment.
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
## 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} |
There was a problem hiding this comment.
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
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)。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
行数最好对应上。最好拆成两行,
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>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
Co-Authored-By: ghycy15 <guhuyue@hotmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
…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
No description provided.