|
| 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. |
0 commit comments