|
| 1 | +import { Meta } from '@storybook/blocks'; |
| 2 | + |
| 3 | +import { AboutHeader, LinkTo } from '~styleguide/blocks'; |
| 4 | + |
| 5 | + |
| 6 | +export const parameters = { |
| 7 | + title: "Accessibility guidelines", |
| 8 | + subtitle: 'In order for content to be accessible, it must be perceivable, operable, understandable, and robust.', |
| 9 | + status: 'static', |
| 10 | +}; |
| 11 | + |
| 12 | +<Meta title="UX Writing/Accessibility guidelines" /> |
| 13 | + |
| 14 | +<AboutHeader {...parameters} /> |
| 15 | + |
| 16 | +## The 4 principles of accessibility |
| 17 | + |
| 18 | +The World Wide Web Consortium (W3C) is the Internet's main international standards organization. W3C maintains a set of guidelines for web accessibility. The most up-to-date version of W3C's Web Content Accessibility Guidelines is [WCAG 2.2](https://www.w3.org/TR/WCAG22/). |
| 19 | + |
| 20 | +The Web Content Accessibility Guidelines contain 4 principles for creating accessible content. Understanding these 4 principles is key to understanding how to write accessible content. |
| 21 | + |
| 22 | +### 1. Perceivable |
| 23 | + |
| 24 | +Information on-screen must be perceivable to blind, deaf, low-vision, or color-blind learners. |
| 25 | + |
| 26 | +- Include meaningful and unique alt text for all non-decorative images or icons |
| 27 | +- Don't rely on visuals for words to make sense |
| 28 | +- If text is meant to be read, include it as text and not an image |
| 29 | +- Include captions for video and audio content |
| 30 | + |
| 31 | +### 2. Operable |
| 32 | + |
| 33 | +Content should be easy for users to navigate and find what they're looking for. Touch and click targets should be easy to hit and content should be accessible with a screen reader. |
| 34 | + |
| 35 | +- Make hyperlink text long enough that it's easy to hover over and click |
| 36 | +- Use meaningful, unique, and descriptive CTAs |
| 37 | +- Avoid ambiguous link text like "Click here" or "Read more" |
| 38 | +- If more than one label contains the same text, clarify with screen-reader-only text |
| 39 | +- Write so that labels, tooltips, and input fields appear in a logical order |
| 40 | +- Avoid directional language like "above" or "below" |
| 41 | +- Ensure users have enough time to read text |
| 42 | + |
| 43 | +### 3. Understandable |
| 44 | + |
| 45 | +Content should be easy to understand. Plus, it should appear and operate in predictable ways. |
| 46 | + |
| 47 | +- Use H1, H2, H3 headings correctly and consistently |
| 48 | +- Check to ensure copy is at a 7th-grade reading level or below |
| 49 | +- Use short, clear sentences and paragraphs |
| 50 | +- Avoid jargon, slang, and idioms |
| 51 | +- Expand acronyms on first use |
| 52 | +- Use list formatting when appropriate |
| 53 | + |
| 54 | +### 4. Robust |
| 55 | + |
| 56 | +- Write in a way that's platform-agnostic (i.e. select or choose vs. tap or click) |
| 57 | + |
| 58 | +### Bonus: Meaningful |
| 59 | + |
| 60 | +You'll find the word "meaningful" used a lot in guidance for writing for accessibility. So we're taking the opportunity to throw in a quick definition of what we mean when we use it. |
| 61 | + |
| 62 | +Meaningful text is useful text. It provides the full context a user needs to understand a situation. |
| 63 | + |
| 64 | +Meaningful alt text describes what's important about an image a user can't see. Meaningful button text clearly where a link will go. It avoids ambiguous standalone phrases like "click here" or "read more." |
| 65 | + |
| 66 | +## Accessible content checklist |
| 67 | + |
| 68 | +### Alt text |
| 69 | +- Is alt text included for all non-decorative images on the page? |
| 70 | +- Does your alt text provide all the information a user needs to understand what the image is being used to convey? |
| 71 | + |
| 72 | +### Buttons |
| 73 | +- Is the CTA meaningful? Is it clear where clicking will take the user? |
| 74 | +- If there is more than one button on the page, is the text for each button unique? |
| 75 | +- If each button is not unique, have you provided screen-reader-only text to clarify? |
| 76 | + |
| 77 | +### Headings |
| 78 | +- Does your page include a single, unique H1 title? |
| 79 | +- Are H2 and H3 headings used correctly and consistently? |
| 80 | + |
| 81 | + |
| 82 | +### Hyperlinks |
| 83 | +- Is link text meaningful? Is it clear where clicking will take the user? |
| 84 | +- Are hyperlinks long enough (2-3 words) to be easy to click on? |
| 85 | +- If there is more than one hyperlink on the page, is the text for each link unique? |
| 86 | +- If each hyperlink is not unique, have you provided screen-reader-only text to clarify? |
| 87 | + |
| 88 | + |
| 89 | +### Imagery |
| 90 | +- Do all non-decorative images or icons contain <LinkTo id="UX Writing/Component guidelines/Alternative text" > alt text</LinkTo>? |
| 91 | +- Does the alt text provide all the information a user needs to understand what the image is being used to convey? |
| 92 | +- Are all words understandable without reliance on imagery? |
| 93 | + |
| 94 | + |
| 95 | +### Readability |
| 96 | +- Do users have enough time to read the text? |
| 97 | +- Is the reading level grade 7 or below? Use [Hemingway App](https://hemingwayapp.com) to check. |
| 98 | +- Are sentences and paragraphs short and clear? |
| 99 | +- Is your content free of jargon, slang, and idioms? |
| 100 | +- Have you used list formatting when appropriate? |
| 101 | +- Do users have enough time to read the text? |
| 102 | + |
| 103 | +### Screenreader compatibility |
| 104 | +- Does text appear in chronological order? |
| 105 | +- Are headings used correctly and appropriately? |
| 106 | +- Have you avoided directional language (i.e. "the form on the right" or "in the section below")? |
| 107 | +- Is the language platform-agnostic? |
| 108 | +- Have you passed the buttons, headings, hyperlinks, imagery, and readability checklists? |
| 109 | + |
| 110 | + |
| 111 | +### Video and audio content |
| 112 | +- Are captions included for all audio and video content? |
| 113 | +- For video, do the captions match what's happening on-screen? |
0 commit comments