-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathguidelines.js
More file actions
2370 lines (2369 loc) · 121 KB
/
Copy pathguidelines.js
File metadata and controls
2370 lines (2369 loc) · 121 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
const guidelines = [
{
label: "1 - Perceivable",
children: [
{
label: "1.1 - Text Alternatives",
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/text-alternatives",
description:
"Provide text alternatives for any non-text content so that it can be changed into other forms people need, such as large print, braille, speech, symbols or simpler language.",
children: [
{
label: "1.1.1 - Non-text Content",
level: "A",
difficulty: "easy",
teams: ["design", "content", "code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/non-text-content",
goal: "Create a text alternative for visual and auditory content",
description:
"All non-text-content must have a text alternative or an accessible name, except if they are purely decorative or redundant.",
descriptionList: [],
examples: [
"The cover image of an article has an <code>alt</code> attribute that describes the image",
"An audio track of a song is labeled with the title and artist name",
"An envelope icon next to a \"Contact Us\" title has an empty <code>alt</code> attribute",
"An image used for decoration only has an empty <code>alt</code> attribute",
],
methods: [
"Always use an <code>alt</code> attribute on <code>img</code> elements",
"Leave the <code>alt</code> attribute empty on decorative images",
"Write a descriptive but concise <code>alt</code> attribute for images that convey information with the relevant context",
"Use the <code>aria-describedby</code> attribute to provide a longer description of the element",
],
resources: [
{
label: "Axess Lab - Alt texts, the ultimate guide",
path: "https://axesslab.com/alt-texts",
},
{
label: "A11y Collective - How to write great alt texts",
path: "https://www.a11y-collective.com/blog/how-to-write-great-alt-text/",
},
],
},
},
],
},
{
label: "1.2 - Time-based Media",
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/time-based-media",
description: "Provide alternatives for time-based media (audio and video).",
children: [
{
label: "1.2.1 - Audio-only and Video-only (Prerecorded)",
level: "A",
difficulty: "normal",
teams: ["design", "content"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/audio-only-and-video-only-prerecorded",
goal: "Provide an alternative when content is perceivable with only one sense, and if there is no text description of the content already available on the page",
description:
"Provide a text transcript for audio content, and a text or audio transcript for video-only content.",
descriptionList: [],
examples: [
"A podcast episode has a text transcript available on the page",
"A video-only content has an audio description available on the page",
],
methods: [
"Provide a text transcript for audio content",
"Provide a text or audio transcript for video-only content",
"Make sure the transcript covers all the content of the audio or video",
"Make sure the transcript is in the same language as the rest of the content",
"Make sure the transcript is available on the same page as the media content",
],
resources: [],
},
},
{
label: "1.2.2 - Captions (Prerecorded)",
level: "A",
difficulty: "normal",
teams: ["content"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/captions-prerecorded",
goal: "Provide synchronized text captions for audio content in videos, if there is no text description of the content already available on the page",
description: "If the content of a video is not already available in text form, provide synchronized captions for the audio content.",
descriptionList: [],
examples: [
"A video has synchronized captions for the audio content",
"A video does not have captions, but the audio content is already available in text form on the page",
],
methods: [
"If no text version is available on the page, provide synchronized captions for the audio content in videos",
"Make sure the captions cover all the content of the audio track",
"Make sure the captions are in the same language as the rest of the content",
"Make sure the captions are synchronized with the audio track",
],
resources: [],
},
},
{
label: "1.2.3 - Audio Description or Media Alternative (Prerecorded)",
level: "A",
difficulty: "normal",
teams: ["design", "content"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/audio-description-or-media-alternative-prerecorded",
goal: "Provide a description of the visual content in videos, if there is no text description of the content already available on the page",
description: "For a video content, provide an audio description or a transcript of the content.",
descriptionList: [],
examples: [
"A video has an audio description of the visual content",
"A video does not have an audio description, but the visual content is already available in text form on the page",
],
methods: [
"If no text version is available on the page, provide an audio description of the visual content in videos",
"Make sure the audio description covers all the content of the video",
"Make sure the audio description is in the same language as the rest of the content",
"Make sure the audio description is synchronized with the video",
],
resources: [],
},
},
{
label: "1.2.4 - Captions (Live)",
level: "AA",
difficulty: "hard",
teams: ["content", "code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/captions-live",
goal: "Provide synchronized text captions for audio content in real-time videos",
description: "Provide synchronized captions for the audio content in live videos.",
descriptionList: [],
examples: [
"A video has synchronized captions for the audio content",
],
methods: [
"Provide synchronized captions for the audio content in videos",
"You can use artificial intelligence to generate the captions in real-time",
"Make sure the captions cover all the content of the audio track",
"Make sure the captions are in the same language as the rest of the content",
"Make sure the captions are synchronized with the audio track",
],
resources: [],
},
},
{
label: "1.2.5 - Audio Description (Prerecorded)",
level: "AA",
difficulty: "hard",
teams: ["content"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/audio-description-prerecorded",
goal: "Provide an audio description of the visual content in videos",
description: "For a video content, provide an audio description of the content.",
descriptionList: [],
examples: [
"A video has an audio description of the visual content",
],
methods: [
"Provide an audio description of the visual content in videos",
"Make sure the audio description covers all the content of the video",
"Make sure the audio description is in the same language as the rest of the content",
"Make sure the audio description is synchronized with the video",
],
resources: [],
},
},
{
label: "1.2.6 - Sign Language (Prerecorded)",
level: "AAA",
difficulty: "hard",
teams: ["content"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/sign-language-prerecorded",
goal: "Provide synchronized sign language interpretation for audio content in existing videos",
description: "Provide a synchronized sign language interpretation for the audio content in videos.",
descriptionList: [],
examples: [
"A video has a sign language interpretation of the audio content",
],
methods: [
"Provide a synchronized sign language interpretation for the audio content in videos",
"Make sure the sign language interpretation covers all the content of the audio track",
"Make sure the sign language interpretation is in the same language as the rest of the content",
"Make sure the sign language interpretation is synchronized with the video",
],
resources: [],
},
},
{
label: "1.2.7 - Extended Audio Description (Prerecorded)",
level: "AAA",
difficulty: "hard",
teams: ["content"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/extended-audio-description-prerecorded",
goal: "Provide extended spoken descriptions of the visual content in videos",
description:
"When the video contains a lot of visual content, provide an extended audio description of the visual content in the video, with pauses in the video.",
descriptionList: [],
examples: [
"In a video of a class, the teacher draws a diagram on the board while speaking rapidly. The video should pause at the end of the sequence while the audio description plays until it reaches the end of the sequence description, and then the video resumes to the next sequence",
],
methods: [
"Provide an extended audio description of the visual content in videos",
"Make sure the audio description covers all the content of the video",
"Make sure the audio description is in the same language as the rest of the content",
"Make sure the audio description is synchronized with the video (with pauses in the video)",
],
resources: [],
},
},
{
label: "1.2.8 - Media Alternative (Prerecorded)",
level: "AAA",
difficulty: "hard",
teams: ["design", "content"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/media-alternative-prerecorded",
goal: "Provide a text equivalent for all content in videos",
description: "An alternative for time-based media is provided for all prerecorded synchronized media and for all prerecorded video-only media.",
descriptionList: [],
examples: [
"A video has a text transcript available on the page",
"The text transcript covers all the content of the video, including the audio and visual content",
],
methods: [
"Provide a text transcript for all prerecorded synchronized media",
"Make sure the transcript covers all the content of the audio and visual tracks",
"Make sure the transcript is in the same language as the rest of the content",
"Make sure the transcript is available on the same page as the media content",
],
resources: [],
},
},
{
label: "1.2.9 - Audio-only (Live)",
level: "AAA",
difficulty: "hard",
teams: ["design", "content"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/audio-only-live",
goal: "Provide a text equivalent for live audio-only content",
description: "An alternative for time-based media that presents equivalent information for live audio-only content is provided.",
descriptionList: [],
examples: [
"A live audio-only content has a text transcript available on the page",
"The text transcript covers all the content of the audio track",
],
methods: [
"Provide a text transcript for all live audio-only content",
"You can use artificial intelligence to generate the transcription in real-time",
"Make sure the transcript covers all the content of the audio track",
"Make sure the transcript is in the same language as the rest of the content",
"Make sure the transcript is available on the same page as the media content",
],
resources: [],
},
},
],
},
{
label: "1.3 - Adaptable",
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/adaptable",
description: "Create content that can be presented in different ways (for example, simpler layout) without losing information or structure.",
children: [
{
label: "1.3.1 - Info and Relationships",
level: "A",
difficulty: "easy",
teams: ["design", "content", "code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships",
goal: "Use code to reinforce relationships and information conveyed through presentation",
description: "Use semantic HTML to provide a consistent and logical structure to your content, so that assistive technologies can understand it.",
descriptionList: [],
examples: [
"Page has a <code>h1</code> element as the main title, and <code>h2</code> elements as section titles",
"A recipe steps section uses <code>ol</code> and <code>li</code> elements to indicate the order of the steps",
],
methods: [
"Use semantic HTML elements to structure your content",
"Use <code>h1</code> to <code>h6</code> elements in the right sequence",
"Use <code>ol</code> and <code>ul</code> elements to indicate lists",
"Use <code>table</code> elements for tabular data",
"Use the appropriate regions for your content",
"Do not use more than one <code>h1</code> element per page",
],
resources: [
{
label: "MDN - HTML elements reference",
path: "https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements",
},
{
label: "MDN - Heading elements",
path: "https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/Heading_Elements",
},
],
},
},
{
label: "1.3.2 - Meaningful Sequence",
level: "A",
difficulty: "easy",
teams: ["design", "code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/meaningful-sequence",
goal: "Use code to preserve meaningful content order",
description: "The DOM order of the content should match the visual order of the content.",
descriptionList: [],
examples: [
"A sidebar is presented on the reading-start side of the page, it appears first in the DOM",
"A footer is presented at the bottom of the page, it appears last in the DOM",
"The users uses the Tab key to navigate the page, and the focus order matches the visual order of the content",
],
methods: ["Write the HTML in the same order as the visual content", "Be careful about reordering content in different breakpoints"],
resources: [],
},
},
{
label: "1.3.3 - Sensory Characteristics",
level: "A",
difficulty: "easy",
teams: ["design"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/sensory-characteristics",
goal: "Describe controls by name, not just by appearance or location",
description: "Instructions should not rely on color, shape, size, visual location, orientation, or sound.",
descriptionList: [],
examples: [
'The user is asked to click on the "Submit" button, not on the "green button"',
'The user is asked to check the checkbox next to the "I agree" label, not the checkbox on the right side of the page',
"The user is alerted with a text message that the form was submitted, not only with a sound",
],
methods: [
"Use descriptive labels for controls and inputs",
"Use descriptive text for instructions, not just sensory cues",
"If you use sensory cues, provide an alternative that does not rely on them",
],
resources: [],
},
},
{
label: "1.3.4 - Orientation",
level: "AA",
difficulty: "easy",
teams: ["design", "code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/orientation",
goal: "Do not lock content to either portrait or landscape presentation",
description: "Unless essential, the user can display the content in either portrait or landscape orientation.",
descriptionList: [],
examples: [
"A mobile application can be used in both portrait and landscape modes",
"A web page can be viewed in both portrait and landscape modes without breaking the layout",
"A piano app can only be used in landscape mode",
],
methods: ["Do not lock the content to a specific orientation", "Use CSS media queries to adapt the layout to different orientations"],
resources: [
{
label: "MDN - CSS Media Queries",
path: "https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries",
},
],
},
},
{
label: "1.3.5 - Identify Input Purpose",
level: "AA",
difficulty: "easy",
teams: ["design", "code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/identify-input-purpose",
goal: "Use code to indicate the purpose of common inputs, where technology allows",
description: "Form fields collecting user information have appropriate attributes.",
descriptionList: [],
examples: [
"An email input field can automatically fill the user's email address",
"A phone number input field displays a numeric keypad on mobile devices",
],
methods: [
"Use the <code>autocomplete</code> attribute to indicate the purpose of form fields",
"Use the <code>inputmode</code> attribute to indicate the type of input expected",
],
resources: [
{
label: "MDN - autocomplete attribute",
path: "https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete",
},
{
label: "MDN - inputmode attribute",
path: "https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/inputmode",
},
],
},
},
{
label: "1.3.6 - Identify Purpose",
level: "AAA",
difficulty: "hard",
teams: ["code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/identify-purpose",
goal: "Use code to indicate the meaning of all controls and other key information, where available",
description: "Every component indicates its purpose to assistive technologies, such as screen readers.",
descriptionList: [],
examples: ["A navbar uses the <code>nav</code> element", "A footer uses the <code>footer</code> element"],
methods: [
"Use semantic HTML elements to structure your content",
"Use the appropriate regions for your content",
"Use appropriate ARIA roles to indicate the purpose of components",
"Give your components accessible names and descriptions",
],
resources: [
{
label: "MDN - HTML elements reference",
path: "https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements",
},
{
label: "MDN - ARIA roles",
path: "https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles",
},
{
label: "MDN - aria-labelledby attribute",
path: "https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby",
},
{
label: "MDN - aria-describedby attribute",
path: "https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-describedby",
},
],
},
},
],
},
{
label: "1.4 - Distinguishable",
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/distinguishable",
description: "Make it easier for users to see and hear content by separating foreground from background (visual and audio).",
children: [
{
label: "1.4.1 - Use of Color",
level: "A",
difficulty: "easy",
teams: ["design"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/use-of-color",
goal: "Use information in addition to color, such as shape or text, to convey meaning",
description: "Color is not the only way to distinguish an element of its state.",
descriptionList: [],
examples: [
"A link is underlined in addition to being blue",
"An error message is displayed in red and has an icon next to it",
"A line graph uses different shapes in addition to colors to distinguish the lines",
],
methods: ["Use icons or shapes", "Use patterns or textures", "Use borders, background or underlines"],
resources: [
{
label: "Deque - Presenting information in multiple ways",
path: "https://www.deque.com/blog/inclusive-design-tips-presenting-information-multiple-ways",
},
],
},
},
{
label: "1.4.2 - Audio Control",
level: "A",
difficulty: "easy",
teams: ["design", "code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/audio-control",
goal: "If you play audio content automatically, let people turn it down or off",
description: "If your page auto-plays audio for more than 3 seconds, the user can lower the volume or stop it.",
descriptionList: [],
examples: [
"A song plays automatically when the page loads, but a stop button is clearly visible",
"A ping sound plays when the user submits a contact form, but it only lasts for 0.5 seconds",
],
methods: [
"If possible, do not auto-playing audio content",
"Otherwise, make it last for less than 3 seconds",
"Otherwise, provide a way for the user to easily turn it off or down",
],
resources: [],
},
},
{
label: "1.4.3 - Contrast (Minimum)",
level: "AA",
difficulty: "easy",
teams: ["design"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum",
goal: "Provide sufficient contrast between text and its background",
description: "Text has a minimum contrast ratio of 4.5:1 against its background, except for the following:",
descriptionList: [
"<b>Large Text</b> - Large text (24px, or 18.5px and bold) have a contrast ratio of at least 3:1",
"<b>Incidental Text</b> - Decorative text and text in inactive elements has no contrast requirement",
"<b>Logotypes</b> - Text that is part of a logo or brand name has no contrast requirement",
],
examples: [
"A paragraph of text with a contrast ratio of 5:1 against its background",
"A large page title with a contrast ratio of 3:1 against its background",
"A disabled button with a contrast ratio of 1.5:1 against its background",
"A logo with a contrast ratio of 1:1 against its background",
],
methods: [
"Make sure the small body text has a contrast ratio of at least 4.5:1",
"Make sure the large texts have a contrast ratio of at least 3:1",
],
resources: [
{
label: "Color contrast checker",
path: "https://colorcontrast.app/#fg=%23107db5&bg=%23fff&level=aa&format=rgb&algo=WCAG2",
},
],
},
},
{
label: "1.4.4 - Resize Text",
level: "AA",
difficulty: "easy",
teams: ["design", "code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/resize-text",
goal: "Ensure text can be doubled in size",
description: "The user can resize the text of the page up to 200 percent and be able to navigate it normally.",
descriptionList: [],
examples: [
"When resizing the text to 200%, the text remains readable without horizontal scrolling",
"When resizing the text to 200%, the layout does not break and all content remains accessible",
],
methods: [
"Do not prevent text resizing",
"Use relative units (like <code>em</code> or <code>rem</code>) for font sizes, margins, paddings...",
"Use flexible layouts that can adapt to elements sizes",
],
resources: [
{
label: "MDN - Relative length units",
path: "https://developer.mozilla.org/en-US/docs/Web/CSS/length#relative_length_units",
},
],
},
},
{
label: "1.4.5 - Images of Text",
level: "AA",
difficulty: "easy",
teams: ["design", "content"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/images-of-text",
goal: "Use text instead of pictures of text",
description: "Your content uses text instead of images of text, except for the following:",
descriptionList: ["<b>Customizable</b> - The image of text can be customized", "<b>Essential</b> - Using an image of text is essential"],
examples: ["A logo with a text can not be avoided", "An image of a graphic with text can not be avoided"],
methods: ["Avoid using images of text", "If you must use them, provide an <code>alt-text</code> that reads the text in the image"],
resources: [],
},
},
{
label: "1.4.6 - Contrast (Enhanced)",
level: "AAA",
difficulty: "easy",
teams: ["design"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/contrast-enhanced",
goal: "Strongly contrast text against its background",
description: "Text has a minimum contrast ratio of 7:1 against its background, except for the following:",
descriptionList: [
"<b>Large Text</b> - Large text (24px, or 18.5px and bold) have a contrast ratio of at least 4.5:1",
"<b>Incidental Text</b> - Decorative text and text in inactive elements has no contrast requirement",
"<b>Logotypes</b> - Text that is part of a logo or brand name has no contrast requirement",
],
examples: [
"A paragraph of text with a contrast ratio of 8:1 against its background",
"A large page title with a contrast ratio of 4.5:1 against its background",
"A disabled button with a contrast ratio of 2.5:1 against its background",
"A logo with a contrast ratio of 1:1 against its background",
],
methods: [
"Make sure the small body text has a contrast ratio of at least 7:1",
"Make sure the large texts have a contrast ratio of at least 4.5:1",
],
resources: [
{
label: "Color contrast checker",
path: "https://colorcontrast.app/#fg=%23107db5&bg=%23fff&level=aa&format=rgb&algo=WCAG2",
},
],
},
},
{
label: "1.4.7 - Low or No Background Audio",
level: "AAA",
difficulty: "normal",
teams: ["content"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/low-or-no-background-audio",
goal: "Avoid or lessen background sound, or let users turn it off",
description: "For prerecorded audio content that mainly contains speech and is not music, at least one of the following is true:",
descriptionList: [
"<b>No Background</b> - The audio does not contain background sounds",
"<b>Turn Off</b> - The background sounds can be turned off",
"<b>20 dB</b> - The background sounds are at least 20 decibels lower than the speech content",
],
examples: [
"A podcast audio contains speech and no background sound",
"A podcast audio contains speech and background music, but the user can turn off the music",
"A podcast audio contains speech and background music, but the background music is low",
],
methods: ["Make sure the background sound is low or does not exist"],
resources: [],
},
},
{
label: "1.4.8 - Visual Presentation",
level: "AAA",
difficulty: "hard",
teams: ["design", "code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/visual-presentation",
goal: "Meet text display requirements or allow users to adjust them",
description: "On blocks of text in your content, the following is true:",
descriptionList: [
"The user can change the text and background colors",
"Width is no more than 80 characters (40 if CJK)",
"Text is not justified",
"Line-height is at least 1.5 in paragraphs, and 2.25 between paragraphs",
"Text can be resized up to 200% without breaking the layout",
],
examples: [
"The user can change the text color to black and the background color to white",
"The user can resize the text to 200% without breaking the layout",
],
methods: [
"Allow the user to change the text and background colors",
"Use relative units for font sizes, margins, paddings...",
"Use flexible layouts that can adapt to elements sizes",
"Do not justify text",
"Use sufficient line-height and spacing between paragraphs",
"Use a maximum width of 80 characters (40 if CJK)",
],
resources: [],
},
},
{
label: "1.4.9 - Images of Text (No Exception)",
level: "AAA",
difficulty: "easy",
teams: ["design", "content"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/images-of-text-no-exception",
goal: "Do not use pictures of text unless there is no other way to present information",
description: "Your content uses text instead of images of text.",
descriptionList: [],
examples: ["A text replacement is displayed instead of the logo"],
methods: ["Do not use images of text"],
resources: [],
},
},
{
label: "1.4.10 - Reflow",
level: "AA",
difficulty: "easy",
teams: ["design", "code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/reflow",
goal: "Make lines of text reflow within the viewport",
description: "The user can zoom in, and still navigate the page without needing to scroll horizontally:",
descriptionList: ["up to 100% in a window that is 320px wide", "up to 400% in a window that is 1280px wide"],
examples: ["A form has two columns, but when zoomed in, it becomes a single column", "A text adapts to the viewport width when zoomed in"],
methods: [
"Use relative units for font sizes, margins, paddings...",
"Use flexible layouts that can adapt to elements sizes",
"Do not assign elements a fixed width bigger than 320px",
"Use CSS media queries to adapt the layout to different screens sizes",
],
resources: [
{
label: "MDN - CSS Media Queries",
path: "https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries",
},
],
},
},
{
label: "1.4.11 - Non-text Contrast",
level: "AA",
difficulty: "easy",
teams: ["design"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/non-text-contrast",
goal: "Ensure meaningful visual cues achieve 3:1 against the background",
description: "These elements have a contrast ratio of at least 3:1 against adjacent backgrounds:",
descriptionList: [
"<b>User Interface Components</b> - Elements and their borders, backgrounds, focus indicators, except when disabled or if they're native elements",
"<b>Graphical Objects</b> - Icons and graphs",
],
examples: [],
methods: [],
resources: [
{
label: "Color contrast checker",
path: "https://colorcontrast.app/#fg=%23107db5&bg=%23fff&level=aa&format=rgb&algo=WCAG2",
},
],
},
},
{
label: "1.4.12 - Text Spacing",
level: "AA",
difficulty: "easy",
teams: ["design", "code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/text-spacing",
goal: "Ensure content adapts to user-defined text settings",
description: "If the user increases the text spacing, the layout does not break, up to the following settings:",
descriptionList: [
"Line height to 1.5 times the font size",
"Spacing following paragraphs to 2 times the font size",
"Letter spacing to 0.12 times the font size",
"Word spacing to 0.16 times the font size",
],
examples: [
"When resizing the line height to 1.3, the text remains readable without horizontal scrolling",
"When resizing the letter spacing to 0.1, the layout does not break and all content remains accessible",
],
methods: [
"Do not prevent text spacing resizing",
"Use relative units (like <code>em</code> or <code>rem</code>) for font sizes, margins, paddings...",
"Use flexible layouts that can adapt to elements sizes",
],
resources: [
{
label: "MDN - Relative length units",
path: "https://developer.mozilla.org/en-US/docs/Web/CSS/length#relative_length_units",
},
],
},
},
{
label: "1.4.13 - Content on Hover or Focus",
level: "AA",
difficulty: "normal",
teams: ["design", "code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/content-on-hover-or-focus",
goal: "If hover or focus causes content changes, ensure interaction is predictable",
description: "If your page displays elements on hover or focus (like tooltips), the following are true:",
descriptionList: [
"<b>Dismissable</b> - They can be dismissed easily",
"<b>Hoverable</b> - They can be reached with the mouse",
"<b>Persistent</b> - They do not disappear automatically",
],
examples: [
'A tooltip appears when hovering a "Help" icon, and disappears when moving the mouse away',
"The user can hover that tooltip without it disappearing",
'A tooltip appears when focusing a "Help" icon, and disappears when pressing the Escape key',
"The tooltip does not disappear automatically after a few seconds",
],
methods: [
"Make sure tooltips can be dismissed easily",
"Do not make them disappear automatically",
"Allow the user to hover the tooltip without it disappearing",
],
resources: [],
},
},
],
},
],
},
{
label: "2 - Operable",
children: [
{
label: "2.1 - Keyboard Accessible",
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/keyboard-accessible",
description: "Make all functionality available from a keyboard.",
children: [
{
label: "2.1.1 - Keyboard",
level: "A",
difficulty: "hard",
teams: ["code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/keyboard",
goal: "Ensure pointer actions have a keyboard equivalent",
description: "The page can be operated with a keyboard alone, except freehand movements.",
descriptionList: [],
examples: [
"A custom select menu can be used with the keyboard",
"A custom date picker can be used with the keyboard",
"A painting application needs to be operated with a mouse, as the brushes require freehand movements",
],
methods: [
"Try to use native HTML elements, as they are already keyboard accessible",
"For custom elements, research needs and implement full keyboard support",
"Do not rely on mouse events only to trigger actions on custom elements",
"Use the <code>tabindex</code> attribute to make elements focusable / hidden",
"Hide elements that should not be focusable with <code>aria-hidden</code>",
],
resources: [
{
label: "WAI ARIA - Authoring Practices Guide",
path: "https://www.w3.org/WAI/ARIA/apg/patterns",
},
{
label: "Web AIM - Keyboard Accessibility",
path: "https://webaim.org/techniques/keyboard",
},
],
},
},
{
label: "2.1.2 - No Keyboard Trap",
level: "A",
difficulty: "normal",
teams: ["code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/no-keyboard-trap",
goal: "Ensure users always know how to navigate away from components",
description: "Make it easy for users to navigate away from an element with the keyboard.",
descriptionList: [],
examples: ["A modal dialog can be closed with the Escape key", "A custom dropdown can be closed with the Escape key"],
methods: ["Make sure the user can use the keyboard to leave any component"],
resources: [],
},
},
{
label: "2.1.3 - Keyboard (No Exception)",
level: "AAA",
difficulty: "hard",
teams: ["code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/keyboard-no-exception",
goal: "Ensure all pointer actions have a keyboard equivalent",
description: "The page can be operated with a keyboard alone.",
descriptionList: [],
examples: ["A custom select menu can be used with the keyboard", "A custom date picker can be used with the keyboard"],
methods: [
"Try to use native HTML elements, as they are already keyboard accessible",
"For custom elements, research needs and implement full keyboard support",
"Do not rely on mouse events only to trigger actions on custom elements",
"Use the <code>tabindex</code> attribute to make elements focusable / hidden",
"Hide elements that should not be focusable with <code>aria-hidden</code>",
],
resources: [
{
label: "WAI ARIA - Authoring Practices Guide",
path: "https://www.w3.org/WAI/ARIA/apg/patterns",
},
{
label: "Web AIM - Keyboard Accessibility",
path: "https://webaim.org/techniques/keyboard",
},
],
},
},
{
label: "2.1.4 - Character Key Shortcuts",
level: "A",
difficulty: "easy",
teams: ["design", "code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/character-key-shortcuts",
goal: "Ensure character-only shortcut keys can be turned off or modified",
description: 'If your page provides keyboard shortcuts of single characters (like "c" or "1") at least one of the following is true:',
descriptionList: [
"<b>Turn Off</b> - The user can turn them off",
"<b>Remap</b> - The user can remap them to use a different key or combinations",
"<b>Active Only</b> - The shortcuts are only available on focused elements (not the whole page)",
],
examples: [
'The user can turn off the shortcut "c" to open a chat window',
'The user can remap this shortcut to "Ctrl + c"',
"The user can use the spacebar to pause a video, but only when the video is focused",
],
methods: [
"Avoid using single character shortcuts, as they can conflict with browser shortcuts",
"If you must use them, provide a way for users to turn them off or remap them",
"Make sure the shortcuts are only active when the element is focused, not on the whole page",
],
resources: [],
},
},
],
},
{
label: "2.2 - Enough Time",
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/enough-time",
description: "Provide users enough time to read and use content.",
children: [
{
label: "2.2.1 - Timing Adjustable",
level: "A",
difficulty: "normal",
teams: ["design", "content", "code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/timing-adjustable",
goal: "Let users turn off, adjust, or extend time limits",
description: "If your content has a time limit, at least one of the following is true:",
descriptionList: [
"<b>Turn Off</b> - The user can turn it off before accessing the content",
"<b>Adjust</b> - The user can make it 10 times bigger",
"<b>Extend</b> - The user is warned 20 seconds before it expires, and can extend it with a simple action, an can repeat the process at least 10 times",
"<b>Real-time Exception</b> - It is a real-time event, such as a live broadcast or a real-time chat, and can not be changed",
"<b>Essential Exception</b> - It is essential and extending it would invalidate the activity",
"<b>20 Hours Exception</b> - It is longer than 20 hours",
],
examples: [
"The user is waiting for a meeting to start. After waiting for 10 minutes, the user is asked if they still want to wait. If they do not respond, the page times out",
"A ticket booking site has a 15-minute time limit to complete the purchase. The user is warned 1 minute before the time limit expires, and can extend the time limit by clicking a button",
"An auction site can not allow the user to extend the time limit, as it would invalidate the auction",
],
methods: [
"Warn users of time limits before they encounter them",
"If possible, provide a way for users to turn off or adjust time limits",
"Otherwise, warn users beforehand and before the time limit expires",
],
resources: [],
},
},
{
label: "2.2.2 - Pause, Stop, Hide",
level: "A",
difficulty: "easy",
teams: ["design", "code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/pause-stop-hide",
goal: "Let users control content changes that occur in parallel with other content",
description: "For moving, blinking, scrolling, or auto-updating information, all of the following are true, unless it is essential:",
descriptionList: [
"<b>Moving, blinking, or scrolling</b> - If it starts automatically, lasts more than 5 seconds, and is presented in parallel with other content, there is a way for the user to pause, stop, or hide it",
"<b>Auto-updating</b> - If it starts automatically and is presented in parallel with other content, there is a mechanism for the user to pause, stop, or hide it or to control the frequency of the update",
],
examples: [
"A carousel that automatically rotates can be paused or stopped",
"An elements that blinks stops after 5 seconds",
"A game where the decor scrolls automatically can be paused",
],
methods: [
"Try not to display moving content that is not essential",
"Provide a way for users to pause, stop or hide moving content",
"Provide a way for users to pause, stop or hide auto-updating content",
],
resources: [],
},
},
{
label: "2.2.3 - No Timing",
level: "AAA",
difficulty: "normal",
teams: ["design", "content", "code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/no-timing",
goal: "Do not use time limits, except for video and live events",
description: "Timing is not an essential part of the content, except for non-interactive synchronized media and real-time events.",
descriptionList: [],
examples: [
"The user is not required to complete a form within a certain time limit",
"A test is designed to score users based on their answers, not on the time taken to answer",
],
methods: ["Do not use time limits, except for video and live events"],
resources: [],
},
},
{
label: "2.2.4 - Interruptions",
level: "AAA",
difficulty: "easy",
teams: ["code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/interruptions",
goal: "Let people delay or turn off updates, except in emergencies",
description: "The user can turn off interruptions, except for emergencies.",
descriptionList: [],
examples: ["The user can turn off notifications that appear on the screen"],
methods: ["Do not interrupt users with content that is not essential", "Provide a way for users to turn off or delay interruptions"],
resources: [],
},
},
{
label: "2.2.5 - Re-authenticating",
level: "AAA",
difficulty: "normal",
teams: ["code"],
content: {
documentation: "https://www.w3.org/WAI/WCAG22/Understanding/re-authenticating",
goal: "Preserve users' prior activity and data through reauthentication",
description: "When a session expires, the user can continue the activity without loss of data after signing in again.",
descriptionList: [],
examples: [
"The user is filling out a form, but the session expires. When the user signs in again, the form is still filled out with the data they entered",
"The user is shopping online, but the session expires. When the user signs in again, the shopping cart is still filled with the items they added",
],
methods: ["Save user data in the browser's local storage or session storage", "Automatically restore the data when the user signs in again"],
resources: [