Skip to content

Commit 846138c

Browse files
committed
testing a11y guidelines
1 parent ab90f39 commit 846138c

File tree

1 file changed

+115
-0
lines changed

1 file changed

+115
-0
lines changed
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
import { Meta } from '@storybook/blocks';
2+
3+
import { AboutHeader } from '~styleguide/blocks';
4+
5+
6+
export const parameters = {
7+
title: "testing",
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="testing" />
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 ([Learn more about headings](https://www.notion.so/Headings-be907c4d24c84dffb970cedc3ee54936))
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 CTA text 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+
83+
### Hyperlinks
84+
- Is link text meaningful? Is it clear where clicking will take the user?
85+
- Are hyperlinks long enough (2-3 words) to be easy to click on?
86+
- If there is more than one hyperlink on the page, is the text for each link unique?
87+
- If each hyperlink is not unique, have you provided screen-reader-only text to clarify?
88+
89+
90+
### Imagery
91+
- Do all non-decorative images or icons contain[alt text](https://skillsoftdev.atlassian.net/wiki/spaces/265f8fcabee0479ea6841c6b0b7e2171/pages/4440883349/Alternate+alt+text)?
92+
- Does the alt text provide all the information a user needs to understand what the image is being used to
93+
- Are all words understandable without reliance on imagery?
94+
95+
96+
### Readability
97+
- Do users have enough time to read the text?
98+
- Is your copy at a reading level of grade 7 or below? Test with [Hemingway App](https://hemingwayapp.com).
99+
- Are sentences and paragraphs short and clear?
100+
- Is your content free of jargon, slang, and idioms?
101+
- Have you used list formatting when appropriate?
102+
- Do users have enough time to read the text?
103+
104+
### Screenreader compatibility
105+
- Does text appear in chronological order?
106+
- Are headings used correctly and appropriately?
107+
- Have you avoided directional language (i.e. "the form on the right" or "in the section below")?
108+
- Is the language platform-agnostic?
109+
- Have you passed the buttons, headings, hyperlinks, imagery, and readability checklists?
110+
111+
112+
### Video and audio content
113+
- Are captions included for all audio and video content?
114+
- For video, do the captions match what's happening on-screen?
115+
- For audio, are transcripts available?

0 commit comments

Comments
 (0)