Skip to content

Commit 7170ce1

Browse files
IsaDCmcking65
andauthored
Test plan for the Switch Example Using HTML Checkbox Input (#1290)
* Add references.csv * Update values in references.csv * Update reference value in references.csv * Add example * Trim example and add direction links * Add test plan * Update references values and assertion mapping * Remove blank spaces from assertions.csv * Update instrunctions to match switch name in tests.csv * Update JAWS and VoiceOver commands for navigating forwards to a switch to match the use of `label` * Update link text for the example in references.csv * Generate .html source files with scripts automatically * Revise link text for HTML label reference * Correct `setupScripts` to set `switch` to `checked` * Generate .html source files with scripts automatically * Remove b and shift+b from commands * Remove `aria-check` from references.csv and assertions.csv * add the `checked HTML attribute` to references.csv and assertions.csv --------- Co-authored-by: Matt King <a11yThinker@gmail.com>
1 parent 5b11e6e commit 7170ce1

26 files changed

+1121
-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+
nameReducedMotion,1,Name 'Reduced motion ' is conveyed,convey name 'Reduced motion',inputTypeCheckbox label
3+
roleSwitch,1,Role 'switch' is conveyed,convey role 'switch',switch inputTypeCheckbox
4+
stateChangeToOff,1,"Change in state, to 'off', is conveyed","convey change in state, to 'off'",@checked
5+
stateChangeToOn,1,"Change in state, to 'on', is conveyed","convey change in state, to 'on'",@checked
6+
stateOff,1,State 'off' is conveyed,convey state 'off',@checked
7+
stateOn,1,State 'on' is conveyed,convey state 'on',@checked
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
testId,command,settings,assertionExceptions,presentationNumber
2+
navForwardsToSwitchOffState,f,virtualCursor,,1.1
3+
navForwardsToSwitchOffState,down down,virtualCursor,,1.2
4+
navForwardsToSwitchOffState,tab,virtualCursor,,1.3
5+
navForwardsToSwitchOffState,tab,pcCursor,,2
6+
navBackToSwitchOffState,shift+f,virtualCursor,,4.1
7+
navBackToSwitchOffState,up,virtualCursor,,4.2
8+
navBackToSwitchOffState,shift+tab,virtualCursor,,4.3
9+
navBackToSwitchOffState,shift+tab,pcCursor,,5
10+
navForwardsToSwitchOnState,f,virtualCursor,,7.1
11+
navForwardsToSwitchOnState,down down,virtualCursor,,7.2
12+
navForwardsToSwitchOnState,tab,virtualCursor,,7.3
13+
navForwardsToSwitchOnState,tab,pcCursor,,8
14+
navBackToSwitchOnState,shift+f,virtualCursor,,10.1
15+
navBackToSwitchOnState,up,virtualCursor,,10.2
16+
navBackToSwitchOnState,shift+tab,virtualCursor,,10.3
17+
navBackToSwitchOnState,shift+tab,pcCursor,,11
18+
reqInfoAboutSwitchOffState,ins+tab,virtualCursor,,13
19+
reqInfoAboutSwitchOffState,ins+up,virtualCursor,,13.1
20+
reqInfoAboutSwitchOffState,ins+tab,pcCursor,,14
21+
reqInfoAboutSwitchOffState,ins+up,pcCursor,,14.1
22+
reqInfoAboutSwitchOnState,ins+tab,virtualCursor,,16
23+
reqInfoAboutSwitchOnState,ins+up,virtualCursor,,16.1
24+
reqInfoAboutSwitchOnState,ins+tab,pcCursor,,17
25+
reqInfoAboutSwitchOnState,ins+up,pcCursor,,17.1
26+
operateSwitchOffState,space,virtualCursor,,19
27+
operateSwitchOffState,enter,virtualCursor,,19.1
28+
operateSwitchOffState,space,pcCursor,,20
29+
operateSwitchOffState,enter,pcCursor,,20.1
30+
operateSwitchOnState,space,virtualCursor,,22
31+
operateSwitchOnState,enter,virtualCursor,,22.1
32+
operateSwitchOnState,space,pcCursor,,23
33+
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('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('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('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: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
testId,command,settings,assertionExceptions,presentationNumber
2+
navForwardsToSwitchOffState,f,browseMode,,1.1
3+
navForwardsToSwitchOffState,down,browseMode,,1.2
4+
navForwardsToSwitchOffState,tab,browseMode,,1.3
5+
navForwardsToSwitchOffState,tab,focusMode,,2
6+
navBackToSwitchOffState,shift+f,browseMode,,4.1
7+
navBackToSwitchOffState,up,browseMode,,4.2
8+
navBackToSwitchOffState,shift+tab,browseMode,,4.3
9+
navBackToSwitchOffState,shift+tab,focusMode,,5
10+
navForwardsToSwitchOnState,f,browseMode,,7.1
11+
navForwardsToSwitchOnState,down,browseMode,,7.2
12+
navForwardsToSwitchOnState,tab,browseMode,,7.3
13+
navForwardsToSwitchOnState,tab,focusMode,,8
14+
navBackToSwitchOnState,shift+f,browseMode,,10.1
15+
navBackToSwitchOnState,up,browseMode,,10.2
16+
navBackToSwitchOnState,shift+tab,browseMode,,10.3
17+
navBackToSwitchOnState,shift+tab,focusMode,,11
18+
reqInfoAboutSwitchOffState,ins+tab,browseMode,,13
19+
reqInfoAboutSwitchOffState,ins+up,browseMode,,13.1
20+
reqInfoAboutSwitchOffState,ins+tab,focusMode,,14
21+
reqInfoAboutSwitchOffState,ins+up,focusMode,,14.1
22+
reqInfoAboutSwitchOnState,ins+tab,browseMode,,16
23+
reqInfoAboutSwitchOnState,ins+up,browseMode,,16.1
24+
reqInfoAboutSwitchOnState,ins+tab,focusMode,,17
25+
reqInfoAboutSwitchOnState,ins+up,focusMode,,17.1
26+
operateSwitchOffState,space,browseMode,,19
27+
operateSwitchOffState,enter,browseMode,,19.1
28+
operateSwitchOffState,space,focusMode,,20
29+
operateSwitchOffState,enter,focusMode,,20.1
30+
operateSwitchOnState,space,browseMode,,22
31+
operateSwitchOnState,enter,browseMode,,22.1
32+
operateSwitchOnState,space,focusMode,,23
33+
operateSwitchOnState,enter,focusMode,,23.1
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
refId,type,value,linkText
2+
author,metadata,Isabel Del Castillo,
3+
authorEmail,metadata,isa.delcastillo5@gmail.com,
4+
title,metadata,Switch Example Using HTML Checkbox Input,
5+
reference,metadata,reference/2025-8-25_124251/switch-checkbox.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-checkbox/,APG Example: Switch Using HTML Checkbox Input
8+
switch,aria,switch,switch
9+
inputTypeCheckbox,htmlAam,inputTypeCheckbox,inputTypeCheckbox
10+
label,htmlAam,label,HTML label
11+
@checked,htmlAam,@checked,@checked

0 commit comments

Comments
 (0)