From e95b65d685df9ce2acdf2070ec3c67176671b54d Mon Sep 17 00:00:00 2001 From: Almero Steyn Date: Mon, 26 Jun 2017 19:17:05 +0200 Subject: [PATCH] [Docs: A11y] Add accessibility docs (#9519) * [Docs: A11y] Add accessibility docs * Fix the link * Replace link image * Tweak style --- _data/nav_docs.yml | 2 + docs/accessibility.md | 278 ++++++++++++++++++++++++++++++++++++ img/docs/keyboard-focus.png | Bin 0 -> 7256 bytes 3 files changed, 280 insertions(+) create mode 100644 docs/accessibility.md create mode 100644 img/docs/keyboard-focus.png diff --git a/_data/nav_docs.yml b/_data/nav_docs.yml index 1a015d25..0e00373a 100644 --- a/_data/nav_docs.yml +++ b/_data/nav_docs.yml @@ -52,6 +52,8 @@ title: Higher-Order Components - id: integrating-with-other-libraries title: Integrating with Other Libraries + - id: accessibility + title: Accessibility - title: Reference items: - id: react-api diff --git a/docs/accessibility.md b/docs/accessibility.md new file mode 100644 index 00000000..6887820a --- /dev/null +++ b/docs/accessibility.md @@ -0,0 +1,278 @@ +--- +id: accessibility +title: Accessibility +permalink: docs/accessibility.html +redirect_from: + - "docs/index.html" +--- + +## 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. + +React fully supports building accessible websites, often by using standard HTML techniques. + +## Standards and Guidelines + +### 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](http://webaim.org/standards/wcag/checklist) +- [Checklist from The A11Y Project](http://a11yproject.com/checklist.html) + +### 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 lowercased: + +```javascript{3,4} + +``` + +## Accessible Forms + +### Labeling +Every HTML form control, such as `` and `