From 5697708fe45f976106f5bfa93b1a16712a4c54ed Mon Sep 17 00:00:00 2001 From: Daiki Ihara Date: Tue, 5 Feb 2019 18:52:12 +0900 Subject: [PATCH 1/6] translate accessibility doc --- content/docs/accessibility.md | 303 ++++++++++++++++------------------ 1 file changed, 143 insertions(+), 160 deletions(-) diff --git a/content/docs/accessibility.md b/content/docs/accessibility.md index 663251a03..3eeaf2967 100644 --- a/content/docs/accessibility.md +++ b/content/docs/accessibility.md @@ -1,32 +1,32 @@ --- id: accessibility -title: Accessibility +title: アクセシビリティ permalink: docs/accessibility.html --- -## Why Accessibility? {#why-accessibility} +## なぜアクセシビリティが必要なのか? {#why-accessibility} -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. +Web アクセシビリティ([**a11y**](https://en.wiktionary.org/wiki/a11y) とも呼ばれます)とは、誰にでも使えるようウェブサイトを設計・構築することです。ユーザ補助技術がウェブページを解釈できるようにするためには、サイトでアクセシビリティをサポートする必要があります。 -React fully supports building accessible websites, often by using standard HTML techniques. +React はアクセシビリティを備えたウェブサイトの構築を全面的にサポートしており、大抵は標準の HTML の技術が用いられます。 -## Standards and Guidelines {#standards-and-guidelines} +## 標準およびガイドライン {#standards-and-guidelines} ### WCAG {#wcag} -The [Web Content Accessibility Guidelines](https://www.w3.org/WAI/intro/wcag) provides guidelines for creating accessible web sites. +[ウェブコンテンツアクセシビリティガイドライン (Web Content Accessibility Guidelines)](https://www.w3.org/WAI/intro/wcag) はアクセシビリティを備えたウェブサイトを構築するためのガイドラインを提供しています。 -The following WCAG checklists provide an overview: +以下の WCAG のチェックリストはその概要を示します。 -- [WCAG checklist from Wuhcag](https://www.wuhcag.com/wcag-checklist/) -- [WCAG checklist from WebAIM](http://webaim.org/standards/wcag/checklist) -- [Checklist from The A11Y Project](http://a11yproject.com/checklist.html) +- [Wuhcag による WCAG チェックリスト](https://www.wuhcag.com/wcag-checklist/) +- [WebAIM による WCAG チェックリスト](http://webaim.org/standards/wcag/checklist) +- [The A11Y Project によるチェックリスト](http://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. +[ウェブアクセシブルイニシアチブ - アクセシビリティが高くリッチなインターネットアプリケーション (Web Accessibility Initiative - Accessible Rich Internet Applications)](https://www.w3.org/WAI/intro/aria) には十分なアクセシビリティを持つ JavaScript ウィジェットの構築テクニックが含まれています。 -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 プロパティと属性がキャメルケースである一方で、これらの属性は純粋な HTML と同じようにハイフンケース(ケバブケースやリスプケースなどとも言われる)である必要があります。 ```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. +## セマンティックな HTML {#semantic-html} -- [MDN HTML elements reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) +セマンティック(意味論的)な HTML はウェブアプリケーションにおけるアクセシビリティの基礎となります。ウェブサイトで情報の意味を強める多様な HTML 要素を使うことは、しばしばただでアクセシビリティを提供してくれます。 -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. +- [MDN HTML 要素リファレンス](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) -For example, +ときおり、React でコーディングするために JSX へ `
      ` を追加し、HTML のセマンティックが崩れることがあります。とりわけ、リスト (`
        `, `
          ` と `
          `) や `
      ` のタグと組み合わせるときです。そんなときは複数の要素をグループ化するために [React フラグメント](/docs/fragments.html)を使う方がよいでしょう。 + +具体例です。 ```javascript{1,5,8} import React, { Fragment } from 'react'; @@ -73,7 +72,7 @@ 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: +項目の集合をフラグメントの配列に変換することができますし、他の任意の要素でも同様です。 ```javascript{6,9} function Glossary(props) { @@ -91,7 +90,7 @@ 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: +もし、フラグメントタグに props を渡す必要がなく、かつ使用しているツールがサポートしているのであれば、[省略記法](/docs/fragments.html#short-syntax)が使えます。 ```javascript{3,6} function ListItem({ item }) { @@ -104,72 +103,71 @@ function ListItem({ item }) { } ``` -For more info, see [the Fragments documentation](/docs/fragments.html). +より詳細な情報は[フラグメントドキュメント](/docs/fragments.html)にあります。 + +## アクセシブルなフォーム {#accessible-forms} -## Accessible Forms {#accessible-forms} +### ラベル付け {#labeling} -### Labeling {#labeling} -Every HTML form control, such as `` and `