Skip to content

Commit 04a0d46

Browse files
authored
Test plan for the Switch Example Using HTML Button (#1289)
* Create references.csv * Add example and update references.csv * Add test plan * Trim example and add direction links * Update switch name in assertions.csv and tests.csv * Add `button htmlAam` to references.csv and assertions.csv * Generate .html source files with scripts automatically * Update link text to match name of the example
1 parent 691168d commit 04a0d46

26 files changed

+1132
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
assertionId,priority,assertionStatement,assertionPhrase,refIds
2+
nameLivingRoomLights,1,Name 'Living Room Lights' is conveyed,convey name 'Living Room Lights',switch
3+
roleSwitch,1,Role 'switch' is conveyed,convey role 'switch',switch button
4+
stateChangeToOff,1,"Change in state, to 'off', is conveyed","convey change in state, to 'off'",aria-checked
5+
stateChangeToOn,1,"Change in state, to 'on', is conveyed","convey change in state, to 'on'",aria-checked
6+
stateOff,1,State 'off' is conveyed,convey state 'off',aria-checked
7+
stateOn,1,State 'on' is conveyed,convey state 'on',aria-checked
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
testId,command,settings,assertionExceptions,presentationNumber
2+
navForwardsToSwitchOffState,b,virtualCursor,,1
3+
navForwardsToSwitchOffState,f,virtualCursor,,1.1
4+
navForwardsToSwitchOffState,down,virtualCursor,,1.2
5+
navForwardsToSwitchOffState,tab,virtualCursor,,1.3
6+
navForwardsToSwitchOffState,tab,pcCursor,,2
7+
navBackToSwitchOffState,shift+b,virtualCursor,,4
8+
navBackToSwitchOffState,shift+f,virtualCursor,,4.1
9+
navBackToSwitchOffState,up,virtualCursor,,4.2
10+
navBackToSwitchOffState,shift+tab,virtualCursor,,4.3
11+
navBackToSwitchOffState,shift+tab,pcCursor,,5
12+
navForwardsToSwitchOnState,b,virtualCursor,,7
13+
navForwardsToSwitchOnState,f,virtualCursor,,7.1
14+
navForwardsToSwitchOnState,down,virtualCursor,,7.2
15+
navForwardsToSwitchOnState,tab,virtualCursor,,7.3
16+
navForwardsToSwitchOnState,tab,pcCursor,,8
17+
navBackToSwitchOnState,shift+b,virtualCursor,,10
18+
navBackToSwitchOnState,shift+f,virtualCursor,,10.1
19+
navBackToSwitchOnState,up,virtualCursor,,10.2
20+
navBackToSwitchOnState,shift+tab,virtualCursor,,10.3
21+
navBackToSwitchOnState,shift+tab,pcCursor,,11
22+
reqInfoAboutSwitchOffState,ins+tab,virtualCursor,,13
23+
reqInfoAboutSwitchOffState,ins+up,virtualCursor,,13.1
24+
reqInfoAboutSwitchOffState,ins+tab,pcCursor,,14
25+
reqInfoAboutSwitchOffState,ins+up,pcCursor,,14.1
26+
reqInfoAboutSwitchOnState,ins+tab,virtualCursor,,16
27+
reqInfoAboutSwitchOnState,ins+up,virtualCursor,,16.1
28+
reqInfoAboutSwitchOnState,ins+tab,pcCursor,,17
29+
reqInfoAboutSwitchOnState,ins+up,pcCursor,,17.1
30+
operateSwitchOffState,space,virtualCursor,,19
31+
operateSwitchOffState,enter,virtualCursor,,19.1
32+
operateSwitchOffState,space,pcCursor,,20
33+
operateSwitchOffState,enter,pcCursor,,20.1
34+
operateSwitchOnState,space,virtualCursor,,22
35+
operateSwitchOnState,enter,virtualCursor,,22.1
36+
operateSwitchOnState,space,pcCursor,,23
37+
operateSwitchOnState,enter,pcCursor,,23.1
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// sets focus on a link after the switch, and sets the switch state to 'on'
2+
testPageDocument.querySelector('[role="switch"]').setAttribute('aria-checked', 'true');
3+
testPageDocument.getElementById('afterlink').focus();
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// sets focus on a link after the switch
2+
testPageDocument.getElementById('afterlink').focus();
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// sets focus on a link before the switch, and sets the state of the switch to 'on'
2+
testPageDocument.querySelector('[role="switch"]').setAttribute('aria-checked', 'true');
3+
testPageDocument.getElementById('beforelink').focus();
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// sets focus on a link before the switch
2+
testPageDocument.getElementById('beforelink').focus();
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// sets focus on the 'Notifications' switch, and sets its state to 'on'
2+
testPageDocument.querySelector('[role="switch"]').setAttribute('aria-checked', 'true');
3+
testPageDocument.querySelector('[role="switch"]').focus();
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// sets focus on the 'Notifications' switch
2+
testPageDocument.querySelector('[role="switch"]').focus();
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
testId,command,settings,assertionExceptions,presentationNumber
2+
navForwardsToSwitchOffState,b,browseMode,,1
3+
navForwardsToSwitchOffState,f,browseMode,,1.1
4+
navForwardsToSwitchOffState,down,browseMode,,1.2
5+
navForwardsToSwitchOffState,tab,browseMode,,1.3
6+
navForwardsToSwitchOffState,tab,focusMode,,2
7+
navBackToSwitchOffState,shift+b,browseMode,,4
8+
navBackToSwitchOffState,shift+f,browseMode,,4.1
9+
navBackToSwitchOffState,up,browseMode,,4.2
10+
navBackToSwitchOffState,shift+tab,browseMode,,4.3
11+
navBackToSwitchOffState,shift+tab,focusMode,,5
12+
navForwardsToSwitchOnState,b,browseMode,,7
13+
navForwardsToSwitchOnState,f,browseMode,,7.1
14+
navForwardsToSwitchOnState,down,browseMode,,7.2
15+
navForwardsToSwitchOnState,tab,browseMode,,7.3
16+
navForwardsToSwitchOnState,tab,focusMode,,8
17+
navBackToSwitchOnState,shift+f,browseMode,,10.1
18+
navBackToSwitchOnState,shift+b,browseMode,,10
19+
navBackToSwitchOnState,up,browseMode,,10.2
20+
navBackToSwitchOnState,shift+tab,browseMode,,10.3
21+
navBackToSwitchOnState,shift+tab,focusMode,,11
22+
reqInfoAboutSwitchOffState,ins+tab,browseMode,,13
23+
reqInfoAboutSwitchOffState,ins+up,browseMode,,13.1
24+
reqInfoAboutSwitchOffState,ins+tab,focusMode,,14
25+
reqInfoAboutSwitchOffState,ins+up,focusMode,,14.1
26+
reqInfoAboutSwitchOnState,ins+tab,browseMode,,16
27+
reqInfoAboutSwitchOnState,ins+up,browseMode,,16.1
28+
reqInfoAboutSwitchOnState,ins+tab,focusMode,,17
29+
reqInfoAboutSwitchOnState,ins+up,focusMode,,17.1
30+
operateSwitchOffState,space,browseMode,,19
31+
operateSwitchOffState,enter,browseMode,,19.1
32+
operateSwitchOffState,space,focusMode,,20
33+
operateSwitchOffState,enter,focusMode,,20.1
34+
operateSwitchOnState,space,browseMode,,22
35+
operateSwitchOnState,enter,browseMode,,22.1
36+
operateSwitchOnState,space,focusMode,,23
37+
operateSwitchOnState,enter,focusMode,,23.1
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
refId,type,value,linkText
2+
author,metadata,Isabel Del Castillo,
3+
authorEmail,metadata,[email protected],
4+
title,metadata,Switch Example Using HTML Button,
5+
reference,metadata,reference/2025-8-22_17848/switch-button.html,Test Case Page for Switch Example
6+
designPattern,metadata,https://www.w3.org/WAI/ARIA/apg/patterns/switch/,APG Pattern: Switch
7+
example,metadata,https://www.w3.org/WAI/ARIA/apg/patterns/switch/examples/switch-button/,APG Example: Switch Using HTML Button
8+
aria-checked,aria,aria-checked,aria-checked
9+
switch,aria,switch,switch
10+
button,htmlAam,button,button

0 commit comments

Comments
 (0)