From eac69fd3c6d886f6390b06318b09230f171793b1 Mon Sep 17 00:00:00 2001 From: ThinhNu Date: Wed, 8 May 2019 14:58:03 +0700 Subject: [PATCH 1/2] Update accessibility.md Translate accessibility to Vietnamese --- content/docs/accessibility.md | 503 +++++++++++++++++++--------------- 1 file changed, 280 insertions(+), 223 deletions(-) diff --git a/content/docs/accessibility.md b/content/docs/accessibility.md index e6cacba3b..57e81424d 100644 --- a/content/docs/accessibility.md +++ b/content/docs/accessibility.md @@ -3,31 +3,39 @@ id: accessibility title: Accessibility permalink: docs/accessibility.html --- +## Tại sao là Accessibility? {#why-accessibility} -## Why Accessibility? {#why-accessibility} +Web accessibility (cũng được đề cập ở đây +[**a11y**](https://en.wiktionary.org/wiki/a11y)) là sự thiết kế và tạo dựng website +sao cho tất cả mọi người đều có thể sử dụng được. Sự hỗ trợ của Accessibility +cho phép các công nghệ hỗ trợ có thể sử dụng trong các trang web. -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. - -React fully supports building accessible websites, often by using standard HTML techniques. - -## Standards and Guidelines {#standards-and-guidelines} +React hỗ trợ đầy đủ để bạn thực hiện được điều này, bằng +cách sử dụng các kỹ thuật HTML chuẩn. +## Tiêu chuẩn và Hướng dẫn {#standards-and-guidelines} ### WCAG {#wcag} - -The [Web Content Accessibility Guidelines](https://www.w3.org/WAI/intro/wcag) provides guidelines for creating accessible web sites. - -The following WCAG checklists provide an overview: - -- [WCAG checklist from Wuhcag](https://www.wuhcag.com/wcag-checklist/) -- [WCAG checklist from WebAIM](https://webaim.org/standards/wcag/checklist) -- [Checklist from The A11Y Project](https://a11yproject.com/checklist.html) - +[Hướng dẫn Web Content +Accessibility](https://www.w3.org/WAI/intro/wcag) cung cấp hướng dẫn để bạn tạo +được những trang web có khả năng truy cập. + +Danh sách WCAG sau đây cho bạn một cái nhìn tổng quan: + +- [Danh sách WCAG từ +Wuhcag](https://www.wuhcag.com/wcag-checklist/) +- [Danh sách WCAG từ +WebAIM](https://webaim.org/standards/wcag/checklist) +- [Danh sách từ dự án +A11Y](https://a11yproject.com/checklist.html) ### WAI-ARIA {#wai-aria} - -The [Web Accessibility Initiative - Accessible Rich Internet Applications](https://www.w3.org/WAI/intro/aria) document contains techniques for building fully accessible JavaScript widgets. - -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: - +[Sáng kiến Web Accessibility - Truy cập trang web giàu ứng dụng](https://www.w3.org/WAI/intro/aria) +tài liệu có chứa nhiều kỹ thuật để bạn có thể xây dựng các JavaScript widgets +có thể truy cập. + +Chú ý rằng tất cả thuộc tính HTML `aria-*` đều được hỗ trợ đầy +đủ trong JSX. Trong khi hầu hết DOM properties và thuộc tính trong React là +camelCased, những thuộc tính đó nên được gạch-nối (hay còn gọi là kebab-case, +lisp-case, etc) giống như trong HTML thuần. ```javascript{3,4} ``` - -## 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. - -- [MDN HTML elements reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) - -Sometimes we break HTML semantics when we add `
` elements to our JSX to make our React code work, especially when working with lists (`
    `, `
      ` and `
      `) and the HTML ``. -In these cases we should rather use [React Fragments](/docs/fragments.html) to group together multiple elements. - -For example, - +## Tính ngữ nghĩa của HTML {#semantic-html} +Tính ngữ nghĩa của HTML là nền tảng của accessibility trong +một ứng dụng web. Sử dụng một số HTML elements để gia cố thêm về mặt ý nghĩa của +thông tin +trong những websites của chúng ta sẽ thường mang lại +accessibility miễn phí. +- [Tham khảo về HTML elements từ +MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) + +Đôi khi chúng ta phá vỡ tính ngữ nghĩa của HTML khi thêm thẻ +`
      ` vào JSX để giúp nó hoạt động, đặc biệt khi làm việc với +lists (`
        `, `
          ` và +`
          `) hay `
      `. +Trong những tình huống đó chúng ta nên sử dụng [React +Fragments](/docs/fragments.html) để nhóm nhiều elements lại với nhau. + +Ví dụ, ```javascript{1,5,8} import React, { Fragment } from 'react'; - function ListItem({ item }) { return ( @@ -61,7 +73,6 @@ function ListItem({ item }) { ); } - function Glossary(props) { return (
      @@ -71,9 +82,11 @@ function Glossary(props) {
      ); } + ``` -You can map a collection of items to an array of fragments as you would any other type of element as well: +Bạn có thể map một items collection vào một mảng fragments +array như cách bạn làm với bất kỳ loại element nào khác: ```javascript{6,9} function Glossary(props) { @@ -91,7 +104,9 @@ function Glossary(props) { } ``` -When you don't need any props on the Fragment tag you can use the [short syntax](/docs/fragments.html#short-syntax), if your tooling supports it: +Khi bạn không cần bất kỳ props nào trong thẻ Fragment, bạn +có thể sử dụng [cú pháp rút gọn](/docs/fragments.html#short-syntax), nếu công cụ +của bạn có hỗ trợ: ```javascript{3,6} function ListItem({ item }) { @@ -102,85 +117,99 @@ function ListItem({ item }) { ); } + ``` -For more info, see [the Fragments documentation](/docs/fragments.html). +Tham khảo thêm, truy cập [the Fragments +documentation](/docs/fragments.html). ## Accessible Forms {#accessible-forms} ### Labeling {#labeling} -Every HTML form control, such as `` and `