Skip to content

Commit

Permalink
Refactor Actions Menu Button Example Using element.focus() Test Plan …
Browse files Browse the repository at this point in the history
…to V2 Test Format (pull #1122)

* Update APG example and test plan to v2 format
* Update tests csv, references.csv and assertions.csv with feedback
* Correct example title in references.csv
* Fix setupScript
* Remove commands.csv v1
* Correct test plan title in references.csv
* Correct example URL
* Add quick nav of to voiceover_macos-commands.csv
* Change priority to may for role i=menuitem in tests 4 and 5
* Remove extra comma from instructions for the first two tests.
* Add missing references
* Based on issue 1143, remove posinset and setsize assertions from insert+up for request information about a menu item
* Based on issue 1143, remove posinset and setsize assertions from insert+up in test for request information about a menu item
* Fix URL for menu button with activeDescendant example in references

---------

Co-authored-by: Matt King <[email protected]>
  • Loading branch information
IsaDC and mcking65 authored Oct 31, 2024
1 parent 243505e commit 51f6f65
Show file tree
Hide file tree
Showing 25 changed files with 1,386 additions and 526 deletions.
15 changes: 15 additions & 0 deletions tests/menu-button-actions/data/assertions.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
assertionId,priority,assertionStatement,assertionPhrase,refIds
nameActions,1,"Name of the menu button, 'Actions', is conveyed","convey name of the menu button, 'Actions'",button
nameMenuActions,3,"Name of the menu, 'Actions', is conveyed","convey name of the menu, 'Actions'",menu aria-labelledby
nameFocusedItemAction1,1,"Name of the focused item, 'Action 1', is conveyed","convey name of the focused item, 'Action 1'",menuitem
nameFocusedItemAction2,1,"Name of the focused item, 'Action 2', is conveyed","convey name of the focused item, 'Action 2'",menuitem
nameFocusedItemAction4,1,"Name of the focused item, 'Action 4', is conveyed","convey name of the focused item, 'Action 4'",menuitem
numberItemsMenu4,2,"Number of items in the menu,'(4', is conveyed","convey number of items in the menu, '4'",aria-setsize
roleFocusedItemMenuItem,2,"Role of the focused item, 'menu item', is conveyed","convey role of the focused item, 'menu item'",menuitem
roleMenu,3,Role 'menu' is conveyed,convey role 'menu',menu
roleMenuButton,1,Role 'menu button' is conveyed,convey role 'menu button',button aria-haspopup
stateCollapsed,1,State 'collapsed' is conveyed,convey state 'collapsed',aria-expanded
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},
positionFocusedItemMenu1,2,"Position of the focused item in the menu, '1', is conveyed","convey position of the focused item in the menu, '1'",aria-posinset
positionFocusedItemMenu2,2,"Position of the focused item in the menu, '2', is conveyed","convey position of the focused item in the menu, '2'",aria-posinset
positionFocusedItemMenu4,2,"Position of the focused item in the menu, '4', is conveyed","convey position of the focused item in the menu, '4'",aria-posinset
42 changes: 0 additions & 42 deletions tests/menu-button-actions/data/commands.csv

This file was deleted.

32 changes: 32 additions & 0 deletions tests/menu-button-actions/data/jaws-commands.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
testId,command,settings,assertionExceptions,presentationNumber
navForwardsToMenuButton,b,virtualCursor,,1
navForwardsToMenuButton,f,virtualCursor,,1.1
navForwardsToMenuButton,tab,virtualCursor,2:interactionModeEnabled,1.2
navForwardsToMenuButton,down,virtualCursor,,1.3
navBackToMenuButton,shift+b,virtualCursor,,2
navBackToMenuButton,shift+f,virtualCursor,,2.1
navBackToMenuButton,shift+tab,virtualCursor,2:interactionModeEnabled,2.2
navBackToMenuButton,up,virtualCursor,,2.3
navForwardsToMenuButton,tab,pcCursor,,3
navBackToMenuButton,shift+tab,pcCursor,,4
reqInfoAboutMenuButton,ins+tab,virtualCursor,,7
reqInfoAboutMenuButton,ins+up,virtualCursor,,7.1
reqInfoAboutMenuButton,ins+tab,pcCursor,,8
reqInfoAboutMenuButton,ins+up,pcCursor,,8.1
openMenu,space,virtualCursor,2:interactionModeEnabled,10
openMenu,enter,virtualCursor,2:interactionModeEnabled,10.1
openMenu,space,pcCursor,,11
openMenu,enter,pcCursor,,11.1
openMenu,down,pcCursor,,11.2
openMenuToLastItem,up,pcCursor,,13
reqInfoAboutMenuItem,ins+tab,virtualCursor,,15
reqInfoAboutMenuItem,ins+up,virtualCursor,0:positionFocusedItemMenu1 0:numberItemsMenu4 0:nameMenuActions 0:roleMenu,15.1
reqInfoAboutMenuItem,ins+tab,pcCursor,,15.2
reqInfoAboutMenuItem,ins+up,pcCursor,0:positionFocusedItemMenu1 0:numberItemsMenu4 0:nameMenuActions 0:roleMenu,15.3
navToFirstItemMenu,home,pcCursor,,17
navToFirstItemMenu,down,pcCursor,,17.1
navToLastItemMenu,end,pcCursor,,19
navToLastItemMenu,up,pcCursor,,19.1
navToItemMenuByTypingCharacter,a,pcCursor,,21
activateMenuItem,enter,pcCursor,,23
closeMenu,esc,pcCursor,,25
32 changes: 32 additions & 0 deletions tests/menu-button-actions/data/nvda-commands.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
testId,command,settings,assertionExceptions,presentationNumber
navForwardsToMenuButton,b,browseMode,,1
navForwardsToMenuButton,f,browseMode,,1.1
navForwardsToMenuButton,tab,browseMode,2:interactionModeEnabled,1.2
navForwardsToMenuButton,down,browseMode,,1.3
navBackToMenuButton,shift+b,browseMode,,2
navBackToMenuButton,shift+f,browseMode,,2.1
navBackToMenuButton,shift+tab,browseMode,2:interactionModeEnabled,2.2
navBackToMenuButton,up,browseMode,,2.3
navForwardsToMenuButton,tab,focusMode,,3
navBackToMenuButton,shift+tab,focusMode,,4
reqInfoAboutMenuButton,ins+tab,browseMode,,7
reqInfoAboutMenuButton,ins+up,browseMode,,7.1
reqInfoAboutMenuButton,ins+tab,focusMode,,8
reqInfoAboutMenuButton,ins+up,focusMode,,8.1
openMenu,space,browseMode,2:interactionModeEnabled,10
openMenu,enter,browseMode,2:interactionModeEnabled,10.1
openMenu,space,focusMode,,11
openMenu,enter,focusMode,,11.1
openMenu,down,focusMode,,11.2
openMenuToLastItem,up,focusMode,,13
reqInfoAboutMenuItem,ins+tab,browseMode,,15
reqInfoAboutMenuItem,ins+up,browseMode,0:positionFocusedItemMenu1 0:numberItemsMenu4 0:nameMenuActions 0:roleMenu,15.1
reqInfoAboutMenuItem,ins+tab,focusMode,,15.2
reqInfoAboutMenuItem,ins+up,focusMode,0:positionFocusedItemMenu1 0:numberItemsMenu4 0:nameMenuActions 0:roleMenu,15.3
navToFirstItemMenu,home,focusMode,,17
navToFirstItemMenu,down,focusMode,,17.1
navToLastItemMenu,end,focusMode,,19
navToLastItemMenu,up,focusMode,,19.1
navToItemMenuByTypingCharacter,a,focusMode,,21
activateMenuItem,enter,focusMode,,23
closeMenu,esc,focusMode,,25
29 changes: 16 additions & 13 deletions tests/menu-button-actions/data/references.csv
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
refId,value
author,Isabel Del Castillo
authorEmail,[email protected]
title,Action Menu Button Example Using element.focus()
reference,reference/2021-1-14_12348/menu-button-actions.html
designPattern,https://w3c.github.io/aria-practices/#menubutton
example,https://w3c.github.io/aria-practices/examples/menu-button/menu-button-actions.html
menu,https://w3c.github.io/aria/#menu
menuitem,https://w3c.github.io/aria/#menuitem
aria-haspopup,https://w3c.github.io/aria/#aria-haspopup
aria-controls,https://w3c.github.io/aria/#aria-controls
aria-labelledby,https://w3c.github.io/aria/#aria-labelledby
aria-expanded,https://w3c.github.io/aria/#aria-expanded
refId,type,value,linkText
author,metadata,Isabel Del Castillo,
authorEmail,metadata,[email protected],
title,metadata,Action Menu Button Example Using element.focus(),
reference,metadata,reference/2024-8-28_1295/menu-button-actions.html,Test Case Page for Action Menu Button Example Using element.focus()
designPattern,metadata,https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/,APG Pattern: Menu Button
example,metadata,https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/examples/menu-button-actions-active-descendant/,APG Example: Actions Menu Button Using element.focus()
menu,aria,menu,menu
menuitem,aria,menuitem,menuitem
aria-haspopup,aria,aria-haspopup,aria-haspopup
aria-controls,aria,aria-controls,aria-controls
aria-labelledby,aria,aria-labelledby,aria-labelledby
aria-expanded,aria,aria-expanded,aria-expanded
aria-posinset,aria,aria-posinset,aria-posinset
aria-setsize,aria,aria-setsize,aria-setsize
button,htmlAam,button,button
6 changes: 6 additions & 0 deletions tests/menu-button-actions/data/scripts.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
setupScript,setupScriptDescription
openMenuAndSetFocusToFirstItem,"opens the menu, and sets focus on 'Action 1'"
openMenuAndSetFocusToLastItem,"opens the menu, and sets focus on 'Action 4'"
setFocusAfterMenuButton,sets focus on a link after the menu button
setFocusBeforeMenuButton,sets focus on a link before the menu button
setFocusOnMenuButton,sets focus on the menu button
Loading

0 comments on commit 51f6f65

Please sign in to comment.