Skip to content

Commit 1084f71

Browse files
authored
Accordion Test Plan Update (#1267)
* Add v1 test plan files * Add v2 files * Remove v1 files * Update reference path * Update example and references file * Update references.csv to v2 format * Add trimmed example * Editorial corrections to assertions.csv * Editorial changes to assertions.csv * Editorial correction to assertions.csv * Change assertion for tab panel text in tests.csv * Editorial changes to assertions to be consistent with the v2 format * Remove duplicated assertions * remove duplicated assertion from tests.csv * Correct position assertion in assertions.csv * Correct assertion ID in tests.csv * Generate .html source files with scripts automatically * Add setupScript to set focus before the tablist * Generate .html source files with scripts automatically * Correct code for first setupScript * Generate .html source files with scripts automatically * Add setupScript for test 2 * Correct code for setupScript 2 * Modify code for setupScript 2 * Generate .html source files with scripts automatically * Correct code for setting focus on tabpanel * Modify setupScript for test 2 with corrected code * Generate .html source files with scripts automatically * Add setupScript for test 3 * Generate .html source files with scripts automatically * Add setupScript for test 5 * Generate .html source files with scripts automatically * Add setupsCript for test 6 * Generate .html source files with scripts automatically * Add setupsCript for test 9 * Generate .html source files with scripts automatically * Add interaction mode assertion * Link assertions to references * Add an extra down arrow to JAWS commands for navigating forwards into a tab list * Add an extra down arrow to NVDA commands for navigating into a tab list * Add interaction mode assertion to tests 1 and 2 with 0 priority * Add interaction mode assertion exception for tab and shift tab for JAWS and NVDA in tests 1 and 2 * Remove down and up arrow commands for navigating to next an previous tabs in browse mode for NVDA, because they don't work in screen layout * Update VoiceOver commands * Add right and left arrows for navigating to next and previous tabs with VoiceOver * Remove vo+right and vo+left for navigating forwards and backwards to a tab panel * Add assertion for tab panel boundary * Modify the Navigate backwards to a tab panel test to use up arrow and vo+left only * add f and shift+f to JAWS and NVDA commands for navigating forwards and backwards into a tab list * Update Peter Müller assertion * Update tabPanelText assertion * Add tests 1 and 2 for navigating into a tab list where the first and last tabs are not selected and update assertion names * Add AT commands for navigating forwards and backwards when a tab is not selected * Add `setupScripts` for navigating to a tab list where a tab is not selected * add assertions to new tests * Add missing end line to `setupScripts` * Remove indentation from `setupScript` * Add new indentation to `setupScript` * Remove unexpected character from assertion ID * Correct test IDs on VoiceOver commands * Add updated assertion ID to tests.csv * Correct assertion ID in test 2 * Generate .html source files with scripts automatically * Editorial changes to test titles * Change assertions.csv encoding to show special characters correctly * Modify test 8. Operate a collapsed accordion header so the `setupScript` focuses on the second accordion header that is collapsed by default and modify test instructions to match that change
1 parent 8b42686 commit 1084f71

30 files changed

+2227
-1
lines changed

tests/accordion/data/tests.csv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ navBackToCollapsedAccordionHeader,Navigate backwards to a collapsed accordion he
66
reqInfoAboutExpandedAccordionHeader,Request information about an expanded accordion header,15,setFocusOnFirstAccordionHeader,"Starting at the 'Personal Information' accordion header, read information about the accordion header.",roleButton namePersonalInformation stateExpanded
77
reqInfoAboutCollapsedAccordionHeader,Request information about a collapsed accordion header,18,setFocusOnAndCollapseFirstAccordionHeader,"Starting at the 'Personal Information' accordion header, read information about the accordion header.",roleButton namePersonalInformation stateCollapsed
88
navIntoAccordionPanel,Navigate into an accordion panel,21,setFocusOnFirstAccordionHeader,"Starting at the 'Personal Information' accordion header, navigate into the accordion panel.",roleRegion nameRegionPersonalInformation nameInputName theAbilityToEnterOrEditText stateInputRequired
9-
operateCollapsedAccordionHeader,Operate a collapsed accordion header,24,setFocusOnAndCollapseFirstAccordionHeader,"Starting at the 'Personal Information' accordion header, change its state to 'expanded'",stateChangeToExpanded
9+
operateCollapsedAccordionHeader,Operate a collapsed accordion header,24,setFocusOnSecondAccordionHeader,"Starting at the 'Billing Address' accordion header, change its state to 'expanded'",stateChangeToExpanded
1010
operateExpandedAccordionHeader,Operate an expanded accordion header,25,setFocusOnFirstAccordionHeader,"Starting at the 'Personal Information' accordion header, change its state to collapsed",stateChangeToCollapsed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
assertionId,priority,assertionStatement,assertionPhrase,refIds
2+
nameTabCarlAndersen,1,"Name of the tab, 'Carl Andersen', is conveyed","convey name, 'Carl Andersen'",aria-labelledby
3+
nameTabMariaAhlefeldt,1,"Name of the tab, 'Maria Ahlefeldt', is conveyed","convey name of the focused tab, 'Maria Ahlefeldt'",aria-labelledby
4+
nameTabPeterMuller,1,"Name of the tab, 'Peter Müller', is conveyed","convey name of the focused tab, 'Peter Müller'",aria-labelledby
5+
nameMariaAhlefeldt,1,Name 'Maria Ahlefeldt' is conveyed,convey name 'Maria Ahlefeldt',aria-labelledby
6+
nameTabListDanishComposers,1,"Name of the tab list, 'Danish Composers', is conveyed","convey name of the tab list, 'Danish Composers'",aria-labelledby
7+
numberTabsTabList4,2,"Number of tabs in the tab list, 4, is conveyed","convey number of tabs in the tab list, 4",
8+
positionTab1,1,"Position of the tab, 1, is conveyed","convey position of the tab, 1",
9+
positionTab2,1,"Position of the tab, 2, is conveyed","convey position of the tab, 2",
10+
positionTab4,1,"Position of the tab, 4, is conveyed","convey position of the tab, 4",
11+
roleTab,1,Role 'tab' is conveyed,convey role 'tab',tab
12+
roleTabList,1,Role 'tab list' is conveyed,convey role 'tab list',tablist
13+
roleTabPanel,1,Role 'tab panel' is conveyed,convey role 'tab panel',tabpanel
14+
stateSelected,1,"State of the tab, 'selected', is conveyed","convey state of the tab, 'selected'",aria-selected
15+
stateNotSelected,3,"State of the tab, 'not selected', is conveyed","convey state of the tab, 'not selected'",
16+
tabPanelText,1,"Text of the tab panel, 'Maria Theresia Ahlefeldt (16 January 1755 – 20 December 1810) was a Danish, (originally German), composer. She is known as the first female composer in Denmark. Maria Theresia composed music for several ballets, operas, and plays of the royal theatre. She was given good critic as a composer and described as a “virkelig Tonekunstnerinde” ('a True Artist of Music').', is conveyed","convey text of tab panel, 'Maria Theresia Ahlefeldt (16 January 1755 – 20 December 1810) was a Danish, (originally German), composer. She is known as the first female composer in Denmark. Maria Theresia composed music for several ballets, operas, and plays of the royal theatre. She was given good critic as a composer and described as a “virkelig Tonekunstnerinde” ('a True Artist of Music').'",
17+
interactionModeEnabled,2,Screen reader switched from reading mode to interaction mode|{screenReader} switched from {readingMode} to {interactionMode},switch from reading mode to interaction mode|switch from {readingMode} to {interactionMode},
18+
tabPanelBoundary,3,Tab panel boundary is conveyed,convey tab panel boundry,
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
testId,command,settings,assertionExceptions,presentationNumber
2+
navForwardsToTabListWhereATabIsNotSelected,down down down,virtualCursor,,1
3+
navForwardsToTabListWhereATabIsNotSelected,f,virtualCursor,,1.1
4+
navBackwardsToTabListWhereATabIsNotSelected,up up,virtualCursor,,1.2
5+
navBackwardsToTabListWhereATabIsNotSelected,shift+f,virtualCursor,,1.4
6+
navForwardsToTabList,tab,virtualCursor,2:interactionModeEnabled,1.5
7+
navForwardsToTabList,down down down,virtualCursor,,1.6
8+
navForwardsToTabList,f,virtualCursor,,1.7
9+
navForwardsToTabList,tab,pcCursor,,2
10+
navBackToTabList,shift+tab,virtualCursor,2:interactionModeEnabled,4
11+
navBackToTabList,up up,virtualCursor,,4.1
12+
navBackToTabList,shift+f,virtualCursor,,4.2
13+
navBackToTabList,shift+tab,pcCursor,,5
14+
reqInfoAboutTabTabList,ins+tab,virtualCursor,,7
15+
reqInfoAboutTabTabList,ins+up,virtualCursor,,7.1
16+
reqInfoAboutTabTabList,ins+tab,pcCursor,,8
17+
reqInfoAboutTabTabList,ins+up,pcCursor,,8.1
18+
navToNextTabTabList,down,virtualCursor,,10
19+
navToNextTabTabList,right,pcCursor,,11
20+
navToPrevTabTabList,up,virtualCursor,,13
21+
navToPrevTabTabList,left,pcCursor,,14
22+
navToFirstTabTabList,home,pcCursor,,16
23+
navToLastTabTabList,end,pcCursor,,18
24+
navForwardsToTabPanel,tab,pcCursor,,20
25+
navBackToTabPanel,up,virtualCursor,,22
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// activates the fourth tab in the tab list, and sets focus on the tab panel// 1. Deactivate all tabs by resetting their attributes
2+
document.querySelectorAll('[role="tab"]').forEach(t => {
3+
t.setAttribute('tabindex', '-1');
4+
t.setAttribute('aria-selected', 'false');
5+
});
6+
7+
// 2. Hide all tab panels
8+
document.querySelectorAll('[role="tabpanel"]').forEach(p => {
9+
p.classList.add('is-hidden');
10+
});
11+
12+
// 3. Select the specific fourth tab and panel using their unique IDs
13+
let fourthTab = document.querySelector('#tab-4');
14+
let fourthPanel = document.querySelector('#tabpanel-4');
15+
16+
// 4. Activate the fourth tab and show its panel
17+
if (fourthTab && fourthPanel) {
18+
fourthTab.removeAttribute('tabindex');
19+
fourthTab.setAttribute('aria-selected', 'true');
20+
fourthPanel.classList.remove('is-hidden');
21+
22+
// 5. Set focus on the panel
23+
fourthPanel.focus();
24+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// deactivates the first tab in the tab list, and sets focus on the first link
2+
// Select the first tab and its corresponding panel
3+
const firstTab = document.querySelector('#tab-1');
4+
const firstPanel = document.querySelector('#tabpanel-1');
5+
6+
// Deactivate the tab and hide the panel if they exist
7+
if (firstTab && firstPanel) {
8+
firstTab.setAttribute('aria-selected', 'false');
9+
firstTab.setAttribute('tabindex', '-1');
10+
firstPanel.classList.add('is-hidden');
11+
}
12+
13+
// Find the link before the example and set focus on it
14+
const linkBefore = document.querySelector('#beforelink');
15+
if (linkBefore) {
16+
linkBefore.focus();
17+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// sets focus on a link after the tab panel
2+
const linkAfter = document.querySelector('#afterlink');
3+
if (linkAfter) {
4+
linkAfter.focus();
5+
}
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 tab list
2+
testPageDocument.querySelector('#beforelink').focus();
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// sets focus on the first tab
2+
const firstTab = document.querySelector('#tab-1');
3+
if (firstTab) {
4+
firstTab.focus();
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// sets focus on the fourth tab
2+
const fourthTab = document.querySelector('#tab-4');
3+
if (fourthTab) {
4+
fourthTab.focus();
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// sets focus on the second tab
2+
const secondTab = document.querySelector('#tab-2');
3+
if (secondTab) {
4+
secondTab.focus();
5+
}

0 commit comments

Comments
 (0)