Skip to content

Commit 62ed987

Browse files
IsaDCjscholes
andauthored
Create updated tests for APG design pattern example: Radio Group Using aria-activedescendant (#680)
* Add references.csv * Add timestamped example directory and update references.csv * Add commands.csv * Add tests.csv * Add setupScript placeholders * Generate .html source files with scripts automatically * Example: remove unneeded CSS/JS references, 'Related Links' nav and similar example links, as well as 'Accessibility Features', 'Keyboard Support', 'Role, Property, State, and Tabindex Attributes' and source code sections and footer nav * Generate .html source files with scripts automatically * Restore previous setupScripts * Generate .html source files with scripts automatically * Rename directory to radiogroup-aria-activedescendant-updated * Restore test plan files to new directory * Remove old test plan directory and replace with new one * Update setupScripts names and descriptions * Generate .html source files with scripts automatically * Add new setup scripts * Generate .html source files with scripts automatically * Update example title * Update pattern link in example * Update setup script name * Remove old directory * Generate .html source files with scripts automatically * Delete generated files to force regeneration * Generate .html source files with scripts automatically * Delete and re-add a setup script, because of a Git stupidity * Generate .html source files with scripts automatically Co-authored-by: IsaDC <IsaDC@users.noreply.github.com> Co-authored-by: James Scholes <james@jamesscholes.com> Co-authored-by: jscholes <jscholes@users.noreply.github.com>
1 parent 1b1b653 commit 62ed987

21 files changed

+605
-434
lines changed
Lines changed: 70 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,70 @@
1-
testId,task,mode,at,commandA,commandB,commandC,commandD,commandE,commandF
2-
1,navigate to first unchecked radio button in group,reading,JAWS,F,A,DOWN,,,
3-
1,navigate to first unchecked radio button in group,reading,NVDA,F,R,DOWN,,,
4-
2,navigate to first unchecked radio button in group,interaction,voiceover_macos,CTRL_OPT_RIGHT,CTRL_OPT_CMD_J,,,,
5-
3,navigate to last unchecked radio button in group,reading,JAWS,SHIFT_F,SHIFT_A,UP,,,
6-
3,navigate to last unchecked radio button in group,reading,NVDA,SHIFT_F,SHIFT_R,UP,,,
7-
4,navigate to last unchecked radio button in group,interaction,voiceover_macos,CTRL_OPT_LEFT,SHIFT_CTRL_OPT_CMD_J,,,,
8-
5,navigate to first checked radio button in group,reading,JAWS,F,A,DOWN,,,
9-
5,navigate to first checked radio button in group,reading,NVDA,F,R,DOWN,,,
10-
6,navigate to first checked radio button in group,interaction,voiceover_macos,CTRL_OPT_RIGHT,CTRL_OPT_CMD_J,,,,
11-
7,navigate to last checked radio button in group,reading,JAWS,SHIFT_F,SHIFT_A,UP,,,
12-
7,navigate to last checked radio button in group,reading,NVDA,SHIFT_F,SHIFT_R,UP,,,
13-
8,navigate to last checked radio button in group,interaction,voiceover_macos,CTRL_OPT_LEFT,SHIFT_CTRL_OPT_CMD_J,,,,
14-
9,navigate forwards to unchecked radio button,interaction,JAWS,TAB,,,,,
15-
9,navigate forwards to unchecked radio button,interaction,NVDA,TAB,,,,,
16-
10,navigate forwards to unchecked radio button,interaction,voiceover_macos,TAB,,,,,
17-
11,navigate backwards to unchecked radio button,interaction,JAWS,SHIFT_TAB,,,,,
18-
11,navigate backwards to unchecked radio button,interaction,NVDA,SHIFT_TAB,,,,,
19-
12,navigate backwards to unchecked radio button,interaction,voiceover_macos,SHIFT_TAB,,,,,
20-
13,navigate forwards to checked radio button,interaction,JAWS,TAB,,,,,
21-
13,navigate forwards to checked radio button,interaction,NVDA,TAB,,,,,
22-
14,navigate forwards to checked radio button,interaction,voiceover_macos,TAB,,,,,
23-
15,navigate backwards to checked radio button,interaction,JAWS,SHIFT_TAB,,,,,
24-
15,navigate backwards to checked radio button,interaction,NVDA,SHIFT_TAB,,,,,
25-
16,navigate backwards to checked radio button,interaction,voiceover_macos,SHIFT_TAB,,,,,
26-
17,navigate out of start of radio group,reading,JAWS,SHIFT_TAB,UP,,,,
27-
17,navigate out of start of radio group,reading,NVDA,SHIFT_TAB,UP,,,,
28-
18,navigate out of start of radio group,interaction,JAWS,SHIFT_TAB,,,,,
29-
18,navigate out of start of radio group,interaction,NVDA,SHIFT_TAB,,,,,
30-
19,navigate out of start of radio group,interaction,voiceover_macos,SHIFT_TAB,CTRL_OPT_LEFT,,,,
31-
20,navigate out of end of radio group,reading,JAWS,TAB,DOWN,,,,
32-
20,navigate out of end of radio group,reading,NVDA,TAB,DOWN,,,,
33-
21,navigate out of end of radio group,interaction,JAWS,TAB,,,,,
34-
21,navigate out of end of radio group,interaction,NVDA,TAB,,,,,
35-
22,navigate out of end of radio group,interaction,voiceover_macos,TAB,CTRL_OPT_RIGHT,,,,
36-
23,read information about unchecked radio button,READING,JAWS,INS_TAB,INS_UP,,,,
37-
23,read information about unchecked radio button,reading,NVDA,INS_TAB,INS_UP,,,,
38-
24,read information about unchecked radio button,interaction,JAWS,INS_TAB,INS_UP,,,,
39-
24,read information about unchecked radio button,interaction,NVDA,INS_TAB,INS_UP,,,,
40-
25,read information about unchecked radio button,interaction,voiceover_macos,CTRL_OPT_F3,CTRL_OPT_F4,,,,
41-
26,read information about checked radio button ,reading,JAWS,INS_TAB,INS_UP,,,,
42-
26,read information about checked radio button ,reading,NVDA,INS_TAB,INS_UP,,,,
43-
27,read information about checked radio button,interaction,JAWS,INS_TAB,INS_UP,,,,
44-
27,read information about checked radio button,interaction,NVDA,INS_TAB,INS_UP,,,,
45-
28,read information about checked radio button,interaction,voiceover_macos,CTRL_OPT_F3,CTRL_OPT_F4,,,,
46-
29,navigate to next radio button,interaction,JAWS,DOWN,RIGHT,,,,
47-
29,navigate to next radio button,interaction,NVDA,DOWN,RIGHT,,,,
48-
30,navigate to next radio button,interaction,voiceover_macos,CTRL_OPT_RIGHT,DOWN,RIGHT,,,
49-
31,navigate to previous radio button,interaction,JAWS,UP,LEFT,,,,
50-
31,navigate to previous radio button,interaction,NVDA,UP,LEFT,,,,
51-
32,navigate to previous radio button,interaction,voiceover_macos,CTRL_OPT_LEFT,UP,LEFT,,,
52-
33,navigate to first radio button,interaction,JAWS,DOWN,RIGHT,,,,
53-
33,navigate to first radio button,interaction,NVDA,DOWN,RIGHT,,,,
54-
34,navigate to first radio button,interaction,voiceover_macos,DOWN,RIGHT,,,,
55-
35,navigate to last radio button,interaction,JAWS,UP,LEFT,,,,
56-
35,navigate to last radio button,interaction,NVDA,UP,LEFT,,,,
57-
36,navigate to last radio button,interaction,voiceover_macos,UP,LEFT,,,,
58-
37,check radio button,reading,JAWS,SPACE,,,,,
59-
37,check radio button,reading,NVDA,SPACE,,,,,
60-
38,check radio button,interaction,JAWS,SPACE,,,,,
61-
38,check radio button,interaction,NVDA,SPACE,,,,,
62-
39,check radio button,interaction,voiceover_macos,SPACE,CTRL_OPT_SPACE,,,,
1+
testId,task,mode,at,commandA,commandB,commandC
2+
1,Navigate to the first unchecked radio button in a group,READING,JAWS,F,A,"DOWN,DOWN"
3+
1,Navigate to the first unchecked radio button in a group,READING,NVDA,F,R,DOWN
4+
2,Navigate to the first unchecked radio button in a group,INTERACTION,VOICEOVER_MACOS,"CTRL_OPT_RIGHT,CTRL_OPT_RIGHT",CTRL_OPT_CMD_J,
5+
3,Navigate to the last unchecked radio button in a group,READING,JAWS,SHIFT_F,SHIFT_A,"UP,UP"
6+
3,Navigate to the last unchecked radio button in a group,READING,NVDA,SHIFT_F,SHIFT_R,UP
7+
4,Navigate to the last unchecked radio button in a group,INTERACTION,VOICEOVER_MACOS,"CTRL_OPT_LEFT,CTRL_OPT_LEFT",SHIFT_CTRL_OPT_CMD_J,
8+
5,Navigate to the first checked radio button in a group,READING,JAWS,F,A,"DOWN,DOWN"
9+
5,Navigate to the first checked radio button in a group,READING,NVDA,F,R,DOWN
10+
6,Navigate to the first checked radio button in a group,INTERACTION,VOICEOVER_MACOS,"CTRL_OPT_RIGHT,CTRL_OPT_RIGHT",CTRL_OPT_CMD_J,
11+
7,Navigate to the last checked radio button in a group,READING,JAWS,SHIFT_F,SHIFT_A,"UP,UP"
12+
7,Navigate to the last checked radio button in a group,READING,NVDA,SHIFT_F,SHIFT_R,UP
13+
8,Navigate to the last checked radio button in a group,INTERACTION,VOICEOVER_MACOS,"CTRL_OPT_LEFT,CTRL_OPT_LEFT",SHIFT_CTRL_OPT_CMD_J,
14+
9,Navigate forwards to an unchecked radio button,INTERACTION,JAWS,TAB,,
15+
9,Navigate forwards to an unchecked radio button,INTERACTION,NVDA,TAB,,
16+
10,Navigate forwards to an unchecked radio button,INTERACTION,VOICEOVER_MACOS,TAB,,
17+
11,Navigate backwards to an unchecked radio button,INTERACTION,JAWS,SHIFT_TAB,,
18+
11,Navigate backwards to an unchecked radio button,INTERACTION,NVDA,SHIFT_TAB,,
19+
12,Navigate backwards to an unchecked radio button,INTERACTION,VOICEOVER_MACOS,SHIFT_TAB,,
20+
13,Navigate forwards to a checked radio button,INTERACTION,JAWS,TAB,,
21+
13,Navigate forwards to a checked radio button,INTERACTION,NVDA,TAB,,
22+
14,Navigate forwards to a checked radio button,INTERACTION,VOICEOVER_MACOS,TAB,,
23+
15,Navigate backwards to a checked radio button,INTERACTION,JAWS,SHIFT_TAB,,
24+
15,Navigate backwards to a checked radio button,INTERACTION,NVDA,SHIFT_TAB,,
25+
16,Navigate backwards to a checked radio button,INTERACTION,VOICEOVER_MACOS,SHIFT_TAB,,
26+
17,Navigate out of the start of a radio group,READING,JAWS,SHIFT_TAB,"UP,UP",
27+
17,Navigate out of the start of a radio group,READING,NVDA,SHIFT_TAB,UP,
28+
18,Navigate out of the start of a radio group,INTERACTION,JAWS,SHIFT_TAB,,
29+
18,Navigate out of the start of a radio group,INTERACTION,NVDA,SHIFT_TAB,,
30+
19,Navigate out of the start of a radio group,INTERACTION,VOICEOVER_MACOS,SHIFT_TAB,"CTRL_OPT_LEFT,CTRL_OPT_LEFT",
31+
20,Navigate out of the end of a radio group,READING,JAWS,TAB,"DOWN,DOWN",
32+
20,Navigate out of the end of a radio group,READING,NVDA,TAB,DOWN,
33+
21,Navigate out of the end of a radio group,INTERACTION,JAWS,TAB,,
34+
21,Navigate out of the end of a radio group,INTERACTION,NVDA,TAB,,
35+
22,Navigate out of the end of a radio group,INTERACTION,VOICEOVER_MACOS,TAB,"CTRL_OPT_RIGHT,CTRL_OPT_RIGHT",
36+
23,Read information about an unchecked radio button,READING,JAWS,INS_TAB,INS_UP,
37+
23,Read information about an unchecked radio button,READING,NVDA,INS_TAB,INS_UP,
38+
24,Read information about an unchecked radio button,INTERACTION,JAWS,INS_TAB,INS_UP,
39+
24,Read information about an unchecked radio button,INTERACTION,NVDA,INS_TAB,INS_UP,
40+
25,Read information about an unchecked radio button,INTERACTION,VOICEOVER_MACOS,CTRL_OPT_F3,CTRL_OPT_F4,
41+
26,Read information about a checked radio button,READING,JAWS,INS_TAB,INS_UP,
42+
26,Read information about a checked radio button,READING,NVDA,INS_TAB,INS_UP,
43+
27,Read information about a checked radio button,INTERACTION,JAWS,INS_TAB,INS_UP,
44+
27,Read information about a checked radio button,INTERACTION,NVDA,INS_TAB,INS_UP,
45+
28,Read information about a checked radio button,INTERACTION,VOICEOVER_MACOS,CTRL_OPT_F3,CTRL_OPT_F4,
46+
29,Navigate to the next unchecked radio button,READING,JAWS,F,A,DOWN
47+
29,Navigate to the next unchecked radio button,READING,NVDA,F,R,DOWN
48+
30,Navigate to the previous unchecked radio button,READING,JAWS,SHIFT_F,SHIFT_A,UP
49+
30,Navigate to the previous unchecked radio button,READING,NVDA,SHIFT_F,SHIFT_R,UP
50+
31,Navigate to the next checked radio button,READING,JAWS,F,A,DOWN
51+
31,Navigate to the next checked radio button,READING,NVDA,F,R,DOWN
52+
32,Navigate to the previous checked radio button,READING,JAWS,SHIFT_F,SHIFT_A,UP
53+
32,Navigate to the previous checked radio button,READING,NVDA,SHIFT_F,SHIFT_R,UP
54+
33,Navigate to the next radio button,INTERACTION,JAWS,DOWN,RIGHT,
55+
33,Navigate to the next radio button,INTERACTION,NVDA,DOWN,RIGHT,
56+
34,Navigate to the next radio button,INTERACTION,VOICEOVER_MACOS,CTRL_OPT_RIGHT,DOWN,RIGHT
57+
35,Navigate to the previous radio button,INTERACTION,JAWS,UP,LEFT,
58+
35,Navigate to the previous radio button,INTERACTION,NVDA,UP,LEFT,
59+
36,Navigate to the previous radio button,INTERACTION,VOICEOVER_MACOS,CTRL_OPT_LEFT,UP,LEFT
60+
37,Navigate to the first radio button,INTERACTION,JAWS,DOWN,RIGHT,
61+
37,Navigate to the first radio button,INTERACTION,NVDA,DOWN,RIGHT,
62+
38,Navigate to the first radio button,INTERACTION,VOICEOVER_MACOS,DOWN,RIGHT,
63+
39,Navigate to the last radio button ,INTERACTION,JAWS,UP,LEFT,
64+
39,Navigate to the last radio button ,INTERACTION,NVDA,UP,LEFT,
65+
40,Navigate to the last radio button ,INTERACTION,VOICEOVER_MACOS,UP,LEFT,
66+
41,Check a radio button,READING,JAWS,SPACE,,
67+
41,Check a radio button,READING,NVDA,SPACE,,
68+
42,Check a radio button,INTERACTION,JAWS,SPACE,,
69+
42,Check a radio button,INTERACTION,NVDA,SPACE,,
70+
43,Check a radio button,INTERACTION,VOICEOVER_MACOS,SPACE,CTRL_OPT_SPACE,
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// sets focus on the first radio button, and checks the second radio button
2+
let radioGroup = testPageDocument.querySelector('[role="radiogroup"]');
3+
let radios = testPageDocument.querySelectorAll('[role="radio"]');
4+
radios.forEach(r => {
5+
r.setAttribute('aria-checked', 'false');
6+
r.classList.remove('focus');
7+
});
8+
radios[0].classList.add('focus');
9+
radios[1].setAttribute('aria-checked', 'true');
10+
radioGroup.setAttribute('aria-activedescendant', radios[0].id);
11+
radioGroup.focus();
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// sets focus on the second radio button, and checks the first radio button
2+
let radioGroup = testPageDocument.querySelector('[role="radiogroup"]');
3+
let radios = testPageDocument.querySelectorAll('[role="radio"]');
4+
radios.forEach(r => {
5+
r.setAttribute('aria-checked', 'false');
6+
r.classList.remove('focus');
7+
});
8+
radios[1].classList.add('focus');
9+
radios[0].setAttribute('aria-checked', 'true');
10+
radioGroup.setAttribute('aria-activedescendant', radios[1].id);
11+
radioGroup.focus();

tests/radiogroup-aria-activedescendant/data/references.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ refId,value
22
author,Isabel Del Castillo
33
authorEmail,isa.delcastillo5@gmail.com
44
title,Radio Group Example Using aria-activedescendant
5-
reference,reference/2021-3-17_161413/radio-activedescendant.html
5+
reference,reference/2022-4-7_113015/radio-activedescendant.html
66
designPattern,https://w3c.github.io/aria-practices/#radiobutton
77
example,https://w3c.github.io/aria-practices/examples/radio/radio-activedescendant.html
88
radiogroup,https://w3c.github.io/aria/#radiogroup

0 commit comments

Comments
 (0)