Skip to content

Commit d987e44

Browse files
committed
docs: init a11y guides
1 parent 25c18a1 commit d987e44

File tree

10 files changed

+233
-6
lines changed

10 files changed

+233
-6
lines changed

CONTRIBUTOR-DOCS/01_contributor-guides/03_working-in-the-swc-repo.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,17 @@
1111
<details open>
1212
<summary><strong>In this doc</strong></summary>
1313

14-
- [Working in the SWC repo](#working-in-the-swc-repo)
15-
- [About this guide](#about-this-guide)
16-
- [Getting started](#getting-started)
14+
- [About this guide](#about-this-guide)
15+
- [Getting started](#getting-started)
1716
- [Prerequisites](#prerequisites)
1817
- [Installation](#installation)
19-
- [Repository structure](#repository-structure)
20-
- [Development workflow](#development-workflow)
18+
- [Repository structure](#repository-structure)
19+
- [Development workflow](#development-workflow)
2120
- [Developing](#developing)
2221
- [Testing](#testing)
2322
- [Linting](#linting)
2423
- [Building](#building)
25-
- [Command reference](#command-reference)
24+
- [Command reference](#command-reference)
2625

2726
</details>
2827

CONTRIBUTOR-DOCS/01_contributor-guides/06_releasing-swc.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- [NPM 2FA authenticator app](#npm-2fa-authenticator-app)
2020
- [Releasing to NPM — the good stuff](#releasing-to-npm--the-good-stuff)
2121
- [Troubleshooting](#troubleshooting)
22+
- [Custom npm tags](#custom-npm-tags)
2223
- [Publishing the documentation site manually](#publishing-the-documentation-site-manually)
2324
- [From GitHub](#from-github)
2425
- [From the terminal](#from-the-terminal)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!-- Generated breadcrumbs - DO NOT EDIT -->
2+
3+
[CONTRIBUTOR-DOCS](../README.md) / [Accessbility Guide](README.md) / Semantic HTML and ARIA
4+
5+
<!-- Document title (editable) -->
6+
7+
# Semantic HTML and ARIA
8+
9+
<!-- Document content (editable) -->
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!-- Generated breadcrumbs - DO NOT EDIT -->
2+
3+
[CONTRIBUTOR-DOCS](../README.md) / [Accessbility Guide](README.md) / Accessible pattern libraries
4+
5+
<!-- Document title (editable) -->
6+
7+
# Accessible pattern libraries
8+
9+
<!-- Document content (editable) -->
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!-- Generated breadcrumbs - DO NOT EDIT -->
2+
3+
[CONTRIBUTOR-DOCS](../README.md) / [Accessbility Guide](README.md) / Keyboard testing
4+
5+
<!-- Document title (editable) -->
6+
7+
# Keyboard testing
8+
9+
<!-- Document content (editable) -->
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!-- Generated breadcrumbs - DO NOT EDIT -->
2+
3+
[CONTRIBUTOR-DOCS](../README.md) / [Accessbility Guide](README.md) / Screen reader testing
4+
5+
<!-- Document title (editable) -->
6+
7+
# Screen reader testing
8+
9+
<!-- Document content (editable) -->
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!-- Generated breadcrumbs - DO NOT EDIT -->
2+
3+
[CONTRIBUTOR-DOCS](../README.md) / [Accessbility Guide](README.md) / Wave toolbar testing
4+
5+
<!-- Document title (editable) -->
6+
7+
# Wave toolbar testing
8+
9+
<!-- Document content (editable) -->
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<!-- Generated breadcrumbs - DO NOT EDIT -->
2+
3+
[CONTRIBUTOR-DOCS](../README.md) / [Accessbility Guide](README.md) / Accessibility resources
4+
5+
<!-- Document title (editable) -->
6+
7+
# Accessibility resources
8+
9+
<!-- Document content (editable) -->
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
<!-- Generated breadcrumbs - DO NOT EDIT -->
2+
3+
[CONTRIBUTOR-DOCS](../README.md) / Accessbility Guide
4+
5+
<!-- Document title (editable) -->
6+
7+
# Accessbility Guide
8+
9+
<!-- Generated TOC - DO NOT EDIT -->
10+
11+
<details open>
12+
<summary><strong>Beneath this doc</strong></summary>
13+
14+
- [Semantic HTML and ARIA](01_semantic_html_aria.md)
15+
- [Accessible pattern libraries](02_accessible_pattern_libraries.md)
16+
- [Keyboard testing](03_keyboard_testing.md)
17+
- [Screen reader testing](04_screen_reader_testing.md)
18+
- [Wave toolbar testing](05_wave_toolbar_testing.md)
19+
- [Accessibility resources](06_accessibility_resources.md)
20+
21+
</details>
22+
23+
<!-- Document content (editable) -->
24+
25+
## Overview
26+
27+
This guide provides essential accessibility knowledge and practices for customers and contributors to Spectrum Web Components. Building and using accessible components ensures that all users, regardless of ability, can effectively interact with web applications.
28+
29+
## What is accessibility?
30+
31+
**Accessibility** (often abbreviated as **a11y**) is the practice of making web content and applications usable by as many people as possible. This means designing and developing in ways that remove barriers preventing people with disabilities from perceiving, understanding, navigating, and interacting with digital content.
32+
33+
In the context of web components, accessibility ensures that custom elements work seamlessly with assistive technologies and follow established patterns that users have come to expect.
34+
35+
## Why accessibility matters
36+
37+
### User inclusion
38+
Accordiing to the [World Health Organization](https://www.who.int/news-room/fact-sheets/detail/disability-and-health), approximately one in six people, or 16%% of the world's population, lives with some form of disability. Building accessible components ensures your applications serve the widest possible audience.
39+
40+
### Ethical considerations
41+
Building accessible software is simply the right thing to do. Digital content has become essential to modern life, and excluding people with disabilities from accessing it perpetuates inequality.
42+
43+
### Business benefits
44+
- **Larger market reach**: More users can access your applications
45+
- **Better SEO**: Accessible HTML often improves search engine optimization
46+
- **Improved usability for everyone**: Accessibility features benefit all users (e.g., captions help in noisy environments)
47+
- **Reduced legal risk**: Proactive accessibility reduces litigation exposure
48+
- **Increased compatibility**: with more web-enabled devices and assistive technologies being adopted by users
49+
50+
### Legal requirements
51+
Many jurisdictions have legal requirements for digital accessibility:
52+
- **[Americans with Disabilities Act (ADA)](hhttps://www.ada.gov/topics/intro-to-ada/)** requires federal and state government entities as well as private entities that own, operate, lease, or lease to places of public accommodation must be accessible to people with disabilities
53+
- **[Section 508](https://www.section508.gov/)** applies to US federal government entities but impacts any entity that does buisness with the US federal government
54+
- **[European Accessibility Act](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=COM%3A2015%3A0615%3AFINa)** establishes accessbility standards for the EU; applies to "applies to any business’s product or service that is sold or in use within the Eurozone, not just EU member state businesses" [deque blog post](https://www.deque.com/blog/eu-web-accessibility-compliance-and-legislation/)
55+
- **[Accessibility for Ontarians with Disabilities Act (AODA)](https://www.ontario.ca/laws/statute/05a11a)** "applies to every person or organization in the public and private sectors of the Province of Ontario, including the Legislative Assembly of Ontario" to comply with defined accessbility guidelines for EU member states
56+
57+
## Types of disabilities
58+
59+
When building accessible components, consider these categories of disabilities:
60+
61+
### Visual disabilities
62+
- Blindness: Complete inability to see
63+
- Low vision: Reduced visual acuity that cannot be corrected with glasses
64+
- Color blindness: Difficulty distinguishing between certain colors
65+
- Light sensitivity: Difficulty with bright lights or certain color contrasts
66+
67+
### Auditory disabilities
68+
- Deafness: Complete inability to hear
69+
- Hard of hearing: Partial hearing loss
70+
- Audio processing disorders: Difficulty processing auditory information
71+
72+
### Motor disabilities
73+
- Limited fine motor control: Difficulty with precise movements like clicking small targets
74+
- Tremors or spasms: Involuntary movements affecting interaction
75+
- Paralysis: Inability to move certain body parts
76+
- Repetitive stress injuries: Pain or difficulty from repeated motions
77+
78+
### Cognitive, learning, and neurological disabilities
79+
- Learning disabilities: Dyslexia, dyscalculia, and other processing differences
80+
- Memory impairments: Difficulty retaining or recalling information
81+
- Attention disorders: Difficulty maintaining focus
82+
- Autism spectrum disorders: Different sensory processing and communication patterns
83+
- Seizure disorders: Different types of epilepsy and migraines, often triggered by visual or auditory stimuli
84+
85+
### Temporary and situational disabilities
86+
- Temporary: Broken arm, eye surgery recovery, ear infection
87+
- Situational: Bright sunlight affecting screen visibility, noisy environment, holding a baby while trying to navigate with one hand
88+
89+
## Assistive technologies
90+
91+
Users interact with web components using various assistive technologies:
92+
93+
### Screen readers
94+
- **[JAWS](https://www.freedomscientific.com/products/software/jaws/)**: Popular Windows screen reader, often used with Chrome or Edge browsers
95+
- **[NVDA](https://www.nvaccess.org/about-nvda/)**: Free, open-source Windows screen reader, often used with Firefox browsers
96+
- **[VoiceOver](hhttps://support.apple.com/guide/voiceover/turn-voiceover-on-or-off-vo2682/mac)**: Built-in screen reader for macOS and iOS, often used with Safari browsers
97+
- **[TalkBack](https://support.google.com/accessibility/android/answer/6007100?hl=en)**: Built-in screen reader for Android, often used with Chrome browsers
98+
- **[Narrator](https://support.microsoft.com/en-us/windows/complete-guide-to-narrator-e4397a0d-ef4f-b386-d8ae-c172f109bdb1)**: Built-in Windows screen reader, often used with Edge browsers
99+
100+
### Alternative input methods
101+
- **Keyboard navigation**: Users navigate without a mouse using <kbd>Tab</kbd>, arrow keys, <kbd>Enter</kbd>, <kbd>Space</kbd>, and <kbd>Escape</kbd>
102+
- **Voice control**: Software like Dragon NaturallySpeaking allows voice commands
103+
- **Switch devices**: Single or dual-switch systems for users with limited mobility
104+
- **Eye tracking**: Systems that track eye movement for navigation
105+
106+
### Visual assistance tools
107+
- **Screen magnification**: Software that enlarges portions of the screen
108+
- **High contrast modes**: Operating system settings that increase contrast
109+
- **Custom stylesheets**: User-defined CSS to override default styles
110+
111+
## Web Content Accessibility Guidelines (WCAG)
112+
113+
The **[Web Content Accessibility Guidelines (WCAG)](https://www.w3.org/WAI/standards-guidelines/wcag/glance/)** are the international standard for web accessibility, developed by the World Wide Web Consortium (W3C).
114+
115+
### Purpose
116+
WCAG provides a single shared standard for web content accessibility that meets the needs of individuals, organizations, and governments internationally.
117+
118+
### Organization
119+
WCAG is organized around four principles (often remembered as **POUR**):
120+
121+
1. **Perceivable**: Information and user interface components must be presentable to users in ways they can perceive
122+
2. **Operable**: User interface components and navigation must be operable
123+
3. **Understandable**: Information and the operation of user interface must be understandable
124+
4. **Robust**: Content must be robust enough to be interpreted by a wide variety of user agents, including assistive technologies and future tools
125+
126+
### Conformance levels
127+
WCAG defines three conformance levels:
128+
129+
- **Level A**: The minimum level of accessibility. Addresses the most basic web accessibility features
130+
- **Level AA**: The commonly targeted level. Addresses the biggest and most common barriers for disabled users
131+
- **Level AAA**: The highest level. Provides the greatest level of accessibility but is not always achievable for all content
132+
133+
**Target for Spectrum Web Components**: Level AA conformance is the standard we aim to achieve, as it represents best practices for most web content.
134+
135+
## Authoring Tool Accessibility Guidelines (ATAG)
136+
137+
The **[Authoring Tool Accessibility Guidelines (ATAG)](https://www.w3.org/WAI/standards-guidelines/atag/)** provide standards for tools used to create web content, including component libraries, content management systems, and development frameworks.
138+
139+
### Why ATAG matters for component libraries
140+
Spectrum Web Components is an authoring tool in the sense that it provides building blocks for creating web content and applications. ATAG is relevant because:
141+
142+
1. **Accessible by default**: Components should make it easy to create accessible content without requiring deep accessibility expertise. (Our components should handle as much semantic HTML and ARIA internally as much as possible.)
143+
2. **Support accessible content creation**: Components should not create barriers to producing accessible applications. (It should be possible to use our components in and accessible way.)
144+
3. **Promote accessibility**: Documentation and APIs should encourage accessible patterns. (Our documentation and APIs should encourage accessible patterns.)
145+
146+
### ATAG principles
147+
ATAG has two main parts:
148+
149+
- **Part A**: Make the authoring tool user interface accessible (the component library itself must be usable by developers with disabilities)
150+
- **Part B**: Support the production of accessible content (components should facilitate creating accessible applications)
151+
152+
## Resources
153+
154+
For deeper understanding and ongoing reference, consult these authoritative sources:
155+
156+
- [W3C Web Accessibility Initiative (WAI)](https://www.w3.org/WAI/) - The main hub for web accessibility standards and resources
157+
- [WCAG 2.1 Guidelines](https://www.w3.org/TR/WCAG21/) - The complete specification for web content accessibility
158+
- [ATAG 2.0 Overview](https://www.w3.org/WAI/standards-guidelines/atag/) - Understanding authoring tool accessibility
159+
- [WebAIM Introduction to Web Accessibility](https://webaim.org/intro/) - Practical introduction to accessibility concepts
160+
- [The A11y Project Checklist](https://www.a11yproject.com/checklist/) - A beginner-friendly accessibility checklist
161+
162+
## Next steps
163+
164+
Explore the guides in this section to learn specific accessibility practices.

CONTRIBUTOR-DOCS/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@
3232
- [Workstreams](03_project-planning/02_workstreams/README.md)
3333
- [Components](03_project-planning/03_components/README.md)
3434
- [Milestones](03_project-planning/04_milestones/README.md)
35+
- [Accessbility Guide](04_accessbility_guides/README.md)
36+
- [Semantic HTML and ARIA](04_accessbility_guides/01_semantic_html_aria.md)
37+
- [Accessible pattern libraries](04_accessbility_guides/02_accessible_pattern_libraries.md)
38+
- [Keyboard testing](04_accessbility_guides/03_keyboard_testing.md)
39+
- [Screen reader testing](04_accessbility_guides/04_screen_reader_testing.md)
40+
- [Wave toolbar testing](04_accessbility_guides/05_wave_toolbar_testing.md)
41+
- [Accessibility resources](04_accessbility_guides/06_accessibility_resources.md)
3542

3643
</details>
3744

@@ -62,6 +69,8 @@ The docs are organized into three main sections to help you find the information
6269

6370
**[Style Guide](./02_style-guide/README.md)** - Comprehensive style guide covering project-wide conventions and area-specific rules. This section is useful for human reference and for AI-assisted work, documenting our approaches to linting, JSDoc conventions, component structure, and other coding standards.
6471

72+
**[Accessbility Guide](./04_accessbility_guides/README.md)** - Accessibility guide covering essential accessibility knowledge and practices for customers and contributors to Spectrum Web Components.
73+
6574
**[Project Planning](./03_project-planning/README.md)** - Strategic planning documentation including objectives, workstreams, component roadmaps, and milestones. This section contains:
6675

6776
- **[Objectives and Strategy](./03_project-planning/01_objectives-and-strategy.md)** - Strategic context for the 1st-gen-to-2nd-gen transition, including our goals and approach.

0 commit comments

Comments
 (0)