|
1 |
| -Accessibility |
2 |
| -============= |
| 1 | +# Accessibility |
3 | 2 |
|
4 | 3 | A guide for auditing and maintaining accessible web sites and apps.
|
5 | 4 |
|
6 |
| -Basics |
7 |
| ------- |
| 5 | +## Basics |
8 | 6 |
|
9 |
| -thoughtbot strives for AA level [Web Content Accessibility Guideline (WCAG)][wcag] compliance. Perform one or more of these checks to ensure your work is accessible. |
| 7 | +thoughtbot strives for AA level [Web Content Accessibility Guideline (WCAG)] |
| 8 | +compliance. Perform one or more of these checks to ensure your work is |
| 9 | +accessible. |
10 | 10 |
|
11 | 11 | ### Automation
|
12 | 12 |
|
13 | 13 | Automated checks can catch a lot of common issues before they reach production.
|
14 | 14 |
|
15 |
| -* Use tools such as [WAVE][wave] or [axe's browser extensions][axe-web] to run audits on your local build |
16 |
| -* Use a CI/CD solution such as [AccessLint][accesslint] or [axe][axe] |
| 15 | +- Use tools such as [WAVE] or [axe's browser extensions] to run audits on your |
| 16 | + local build |
| 17 | +- Use a CI/CD solution such as [AccessLint] or [axe] |
17 | 18 |
|
18 | 19 | ### Usability
|
19 | 20 |
|
20 |
| -Manual usability testing ensures things [work as intended][manual-testing]. |
| 21 | +[Manual usability testing] ensures things work as intended. |
21 | 22 |
|
22 |
| -* Test your local build using a screen reader such as [VoiceOver][voiceover] or [NVDA][nvda] |
23 |
| -* Use tools such as [Accessibility Insights][accessibility-insights] to catch |
24 |
| - issues that cannot be found using automated checks |
25 |
| -* Hire assistive technology users to user test your product |
| 23 | +- Test your local build using a screen reader such as [VoiceOver] or [NVDA] |
| 24 | +- Use tools such as [Accessibility Insights] to catch issues that cannot be |
| 25 | + found using automated checks |
| 26 | +- Hire assistive technology users to user test your product |
26 | 27 |
|
27 |
| -Quick checks |
28 |
| ------------- |
| 28 | +## Quick checks |
29 | 29 |
|
30 | 30 | ### Design
|
31 | 31 |
|
32 |
| -* Ensure all content's foreground color values meet the [minimum contrast ratio][color-contrast] for the background color they are placed over |
33 |
| -* Ensure all interactive content has distinct hover and focus states to help indicate interactivity |
34 |
| -* Ensure color is not the only way to determine meaning |
35 |
| -* Ensure interactive components use common UI affordances where applicable, to help users understand how they can be operated |
36 |
| -* Prefer icons and glyphs that don't rely on specialized knowledge to understand their meaning, unless being used in a domain-specific context |
37 |
| -* Prefer language that is [simple and direct][readability] |
38 |
| -* Ensure form inputs have labels that are visible in every state |
39 |
| -* Ensure link and button text is descriptive and distinct |
40 |
| -* Prefer content that is broken into logical sections, with headings that explain the content that follows |
41 |
| -* Prefer text sizing that is set to 16px or larger |
42 |
| -* Ensure animation does not auto-play, can be paused, and avoids [vestibular and seizure triggers][vestibular-seizure] |
43 |
| -* Ensure video content has captions |
44 |
| -* Prefer larger interactive target sizes, with some space between grouped interactive controls |
45 |
| - |
46 |
| -### Development |
47 |
| - |
48 |
| -* Ensure semantic markup is used to describe content |
49 |
| -* Ensure content does not disappear off the screen when zoomed |
50 |
| -* Ensure that interactive content can be tabbed to and activated using the keyboard, and that the tab order matches reading order |
51 |
| -* Ensure that heading elements are used, and that heading levels are placed in a logical order |
52 |
| -* Ensure that landmarks are used to describe the overall layout of the page or view |
53 |
| -* Ensure that alternative descriptions for image content are concise, descriptive, and use punctuation (`alt` attributes for images, `title` elements for SVGs) |
54 |
| -* Ensure labels are programmatically associated with their inputs |
55 |
| -* Prefer implementing a method to allow users to skip sections of repeated content |
56 |
| -* Ensure each page or view has a unique title that describes the content it contains |
57 |
| -* The `title` attribute is only used to describe `iframe` element contents |
58 |
| -* Ensure that links are used to navigate to other locations and buttons are used to trigger actions |
59 |
| -* Ensure that focus is trapped inside of modal interactions |
60 |
| -* Ensure `fieldset` and `legend` elements are used to group related inputs and label them |
61 |
| -* Ensure form feedback messaging is programmatically associated with the relevant inputs |
62 |
| - |
63 |
| -Full audit |
64 |
| ----------- |
65 |
| - |
66 |
| -When at all possible, use the guidelines in the basics and quick check sections to attempt to address accessibility in a proactive way. |
67 |
| - |
68 |
| -If a thorough analysis needs to be performed, use the following workflow to perform a comprehensive accessibility audit that checks against most WCAG criterion: |
69 |
| - |
70 |
| -1. Create a copy of [the Accessibility Audit Template][accessibility-audit-template] spreadsheet in Google Drive |
71 |
| -1. Break apart the site or app to be audited into discrete user flow sections, ordered by importance |
72 |
| -1. Add yourself as the section lead on the audit template, document the relevant URL and date, and set a status |
73 |
| -1. For each user flow, identify each component that enables the user flow to function |
74 |
| -1. For each component, check against the test criteria for each row, and then assign it one of four ratings: |
75 |
| - * **N/A**: This test does not apply to this component |
76 |
| - * **Pass**: This component meets this test's criteria |
77 |
| - * **Moderate**: This component does not meet this test's criteria, but can worked around |
78 |
| - * **Critical**: This component does not meet this test's criteria, and cannot be worked around |
| 32 | +- Ensure all content's foreground color values meet the [minimum contrast ratio] |
| 33 | + for the background color they are placed over |
| 34 | +- Ensure all interactive content has distinct hover and focus states to help |
| 35 | + indicate interactivity |
| 36 | +- Ensure color is not the only way to determine meaning |
| 37 | +- Ensure interactive components use common UI affordances where applicable, to |
| 38 | + help users understand how they can be operated |
| 39 | +- Prefer icons and glyphs that don't rely on specialized knowledge to understand |
| 40 | + their meaning, unless being used in a domain-specific context |
| 41 | +- Prefer language that is [simple and direct] |
| 42 | +- Ensure form inputs have labels that are visible in every state |
| 43 | +- Ensure link and button text is descriptive and distinct |
| 44 | +- Prefer content that is broken into logical sections, with headings that |
| 45 | + explain the content that follows |
| 46 | +- Prefer text sizing that is set to 16px or larger |
| 47 | +- Ensure animation does not auto-play, can be paused, and avoids [vestibular and |
| 48 | + seizure triggers] |
| 49 | +- Ensure video content has captions |
| 50 | +- Prefer larger interactive target sizes, with some space between grouped |
| 51 | + interactive controls |
| 52 | + |
| 53 | +### Development |
| 54 | + |
| 55 | +- Ensure semantic markup is used to describe content |
| 56 | +- Ensure content does not disappear off the screen when zoomed |
| 57 | +- Ensure that interactive content can be tabbed to and activated using the |
| 58 | + keyboard, and that the tab order matches reading order |
| 59 | +- Ensure that heading elements are used, and that heading levels are placed in a |
| 60 | + logical order |
| 61 | +- Ensure that landmarks are used to describe the overall layout of the page or |
| 62 | + view |
| 63 | +- Ensure that alternative descriptions for image content are concise, |
| 64 | + descriptive, and use punctuation (`alt` attributes for images, `title` |
| 65 | + elements for SVGs) |
| 66 | +- Ensure labels are programmatically associated with their inputs |
| 67 | +- Prefer implementing a method to allow users to skip sections of repeated |
| 68 | + content |
| 69 | +- Ensure each page or view has a unique title that describes the content it |
| 70 | + contains |
| 71 | +- The `title` attribute is only used to describe `iframe` element contents |
| 72 | +- Ensure that links are used to navigate to other locations and buttons are used |
| 73 | + to trigger actions |
| 74 | +- Ensure that focus is trapped inside of modal interactions |
| 75 | +- Ensure `fieldset` and `legend` elements are used to group related inputs and |
| 76 | + label them |
| 77 | +- Ensure form feedback messaging is programmatically associated with the |
| 78 | + relevant inputs |
| 79 | + |
| 80 | +## Full audit |
| 81 | + |
| 82 | +When at all possible, use the guidelines in the basics and quick check sections |
| 83 | +to attempt to address accessibility in a proactive way. |
| 84 | + |
| 85 | +If a thorough analysis needs to be performed, use the following workflow to |
| 86 | +perform a comprehensive accessibility audit that checks against most WCAG |
| 87 | +criterion: |
| 88 | + |
| 89 | +1. Create a copy of the [Accessibility Audit Template] spreadsheet in Google |
| 90 | +Drive |
| 91 | +1. Break apart the site or app to be audited into discrete user flow sections, |
| 92 | +ordered by importance |
| 93 | +1. Add yourself as the section lead on the audit template, document the relevant |
| 94 | +URL and date, and set a status |
| 95 | +1. For each user flow, identify each component that enables the user flow to |
| 96 | +function |
| 97 | +1. For each component, check against the test criteria for each row, and then |
| 98 | +assign it one of four ratings: |
| 99 | + - **N/A**: This test does not apply to this component |
| 100 | + - **Pass**: This component meets this test's criteria |
| 101 | + - **Moderate**: This component does not meet this test's criteria, but can |
| 102 | + worked around |
| 103 | + - **Critical**: This component does not meet this test's criteria, and cannot |
| 104 | + be worked around |
79 | 105 | 1. Once a component is completed, update its status
|
80 | 106 | 1. Continue until all user flows have been audited
|
81 | 107 |
|
82 |
| -Use the Notes sheet to leave per-cell comments when necessary, referencing them with a link. The next steps for an audit are handled on a per-project basis. |
| 108 | +Use the Notes sheet to leave per-cell comments when necessary, referencing them |
| 109 | +with a link. The next steps for an audit are handled on a per-project basis. |
83 | 110 |
|
84 |
| -[accessibility-audit-template]: https://docs.google.com/spreadsheets/d/1Ys-0U5BY-Ct_phy7gk9XJmn4nBTMFTh08aTQ6U1kB_4/edit?usp=sharing |
| 111 | +[accessibility audit template]: https://docs.google.com/spreadsheets/d/1Ys-0U5BY-Ct_phy7gk9XJmn4nBTMFTh08aTQ6U1kB_4/edit?usp=sharing |
85 | 112 | [accesslint]: https://github.com/marketplace/accesslint
|
86 | 113 | [axe]: https://www.deque.com/axe/axe-for-web/integrations/
|
87 |
| -[axe-web]: https://www.deque.com/axe/axe-for-web/ |
88 |
| -[color-contrast]: https://webaim.org/resources/linkcontrastchecker/ |
89 |
| -[manual-testing]: https://www.smashingmagazine.com/2018/09/importance-manual-accessibility-testing/ |
| 114 | +[axe's browser extensions]: https://www.deque.com/axe/axe-for-web/ |
| 115 | +[minimum contrast ratio]: https://webaim.org/resources/linkcontrastchecker/ |
| 116 | +[manual usability testing]: https://www.smashingmagazine.com/2018/09/importance-manual-accessibility-testing/ |
90 | 117 | [nvda]: https://a11yproject.com/posts/getting-started-with-nvda/
|
91 |
| -[accessibility-insights]: https://accessibilityinsights.io |
92 |
| -[readability]: https://datayze.com/readability-analyzer.php |
93 |
| -[vestibular-seizure]: https://alistapart.com/article/designing-safer-web-animation-for-motion-sensitivity/ |
| 118 | +[accessibility insights]: https://accessibilityinsights.io |
| 119 | +[simple and direct]: https://datayze.com/readability-analyzer.php |
| 120 | +[vestibular and seizure triggers]: https://alistapart.com/article/designing-safer-web-animation-for-motion-sensitivity/ |
94 | 121 | [voiceover]: https://a11yproject.com/posts/getting-started-with-voiceover/
|
95 | 122 | [wave]: https://wave.webaim.org/extension/
|
96 |
| -[wcag]: https://www.w3.org/WAI/standards-guidelines/wcag/ |
| 123 | +[web content accessibility guideline (wcag)]: https://www.w3.org/WAI/standards-guidelines/wcag/ |
0 commit comments