Skip to content

Commit

Permalink
Create tests for APG design pattern example: Select-Only Combobox (#338)
Browse files Browse the repository at this point in the history
* Add select-only combobox APG example with modified CSS/JS references

For more details of what is removed from and maintained in APG examples, see: 335dada

* Example: remove 'Related Links' nav

* Example: update pattern href

* Example: remove links to similar examples

* Example: remove 'Accessibility Features', 'Keyboard Support', 'Role, Property, State, and Tabindex Attributes' and source code sections

* Example: remove footer nav

* Example: add links before and after the combobox for use in setup scripts

More details: 4357a2e

* Example: store select object as a global variable so its methods can be executed from setup scripts

* Add references.csv

* Add Command+Down and Command+Up to keys.mjs

* Add Ctrl+Opttion+Down/Up to keys.mjs

* Add Page Up/Down to keys.mjs

* Add Alt+Up Arrow to keys.mjs

* Add commands.csv

* Add tests.csv

* Add setup scripts

* Generate test and review files automatically

* Try to only carry out combobox-related actions when the select is initialised

* Generate test and review files automatically

* Try using a timeout instead of a specific custom event

* Generate test and review files automatically

* Add some logging to determine whether the function is firing to open the listbox

* Generate test and review files automatically

* Try inlining an arrow function for opening the listbox

* Generate test and review files automatically

* Add Option+Up/Down to keys.mjs

* Change Command+Up/Down to Option+Up/Down in some commands

* Generate test and review files automatically

* Fix setup scripts which open the listbox and/or move focus to specific options

* Generate test and review files automatically

* Add Shift+C to keys.mjs

* Generate test and review files automatically

* Update example page title

* Add tester instruction that certain commands (such as Down Arrow when navigating to the combobox) may need to be pressed multiple times.

* Generate test and review files automatically

* Add VO+Command+J and Shift+VO+Command+J to VoiceOver tests for navigating to the combobox

* Add Insert+Up to JAWS and NVDA tests when reading information about the combobox and listbox popup

* Generate test and review files automatically

* Remove Insert+Up from JAWS and NVDA tests when reading information about the listbox popup; it's not reasonable to assert that a screen reader should communicate anything about the containing listbox when a user has only asked for the text of the current option

* Generate test and review files automatically

* Remove Insert+Up from JAWS and NVDA tests when reading information about the combobox in interaction mode, as unlike in reading mode, only the text of the selected option is reported

* Generate test and review files automatically

* Correct entry for Shift+F in keys.mjs

* Generate test and review files automatically

* Copy files to address merge conflicts

* Regenerate test files

* Generate test and review files automatically

* Copy files to address merge conflicts

* Regenerate test files

* Generate test and review files automatically

Co-authored-by: jscholes <[email protected]>
Co-authored-by: Isabel Del Castillo <[email protected]>
Co-authored-by: IsaDC <[email protected]>
Co-authored-by: Matt King <[email protected]>
Co-authored-by: mcking65 <[email protected]>
  • Loading branch information
6 people authored Mar 25, 2021
1 parent 9646312 commit 9198d4a
Show file tree
Hide file tree
Showing 100 changed files with 8,508 additions and 186 deletions.
20 changes: 14 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,46 +40,54 @@ <h1>Test Patterns for Review</h1>
<td><a href="./tests/checkbox/index.html">Index</a></td>
<td><a href="./review/checkbox.html">Review</a></td>
<td>26</td>
<td><a href="https://github.com/w3c/aria-at/commit/db93fd4" target="_blank">db93fd4 Generate test files again
<td><a href="https://github.com/w3c/aria-at/commit/d02dd7e" target="_blank">d02dd7e Regenerate test files
</a></td>
</tr>
<tr>
<td>combobox-autocomplete-both</td>
<td><a href="./tests/combobox-autocomplete-both/index.html">Index</a></td>
<td><a href="./review/combobox-autocomplete-both.html">Review</a></td>
<td>30</td>
<td><a href="https://github.com/w3c/aria-at/commit/db93fd4" target="_blank">db93fd4 Generate test files again
<td><a href="https://github.com/w3c/aria-at/commit/d02dd7e" target="_blank">d02dd7e Regenerate test files
</a></td>
</tr>
<tr>
<td>combobox-select-only</td>
<td><a href="./tests/combobox-select-only/index.html">Index</a></td>
<td><a href="./review/combobox-select-only.html">Review</a></td>
<td>38</td>
<td><a href="https://github.com/w3c/aria-at/commit/" target="_blank"></a></td>
</tr>
<tr>
<td>menu-button-actions-active-descendant</td>
<td><a href="./tests/menu-button-actions-active-descendant/index.html">Index</a></td>
<td><a href="./review/menu-button-actions-active-descendant.html">Review</a></td>
<td>26</td>
<td><a href="https://github.com/w3c/aria-at/commit/" target="_blank"></a></td>
<td><a href="https://github.com/w3c/aria-at/commit/d02dd7e" target="_blank">d02dd7e Regenerate test files
</a></td>
</tr>
<tr>
<td>menubar-editor</td>
<td><a href="./tests/menubar-editor/index.html">Index</a></td>
<td><a href="./review/menubar-editor.html">Review</a></td>
<td>40</td>
<td><a href="https://github.com/w3c/aria-at/commit/db93fd4" target="_blank">db93fd4 Generate test files again
<td><a href="https://github.com/w3c/aria-at/commit/d02dd7e" target="_blank">d02dd7e Regenerate test files
</a></td>
</tr>
<tr>
<td>modal-dialog</td>
<td><a href="./tests/modal-dialog/index.html">Index</a></td>
<td><a href="./review/modal-dialog.html">Review</a></td>
<td>29</td>
<td><a href="https://github.com/w3c/aria-at/commit/db93fd4" target="_blank">db93fd4 Generate test files again
<td><a href="https://github.com/w3c/aria-at/commit/d02dd7e" target="_blank">d02dd7e Regenerate test files
</a></td>
</tr>
<tr>
<td>tabs-manual-activation</td>
<td><a href="./tests/tabs-manual-activation/index.html">Index</a></td>
<td><a href="./review/tabs-manual-activation.html">Review</a></td>
<td>29</td>
<td><a href="https://github.com/w3c/aria-at/commit/db93fd4" target="_blank">db93fd4 Generate test files again
<td><a href="https://github.com/w3c/aria-at/commit/d02dd7e" target="_blank">d02dd7e Regenerate test files
</a></td>
</tr>
</table>
Expand Down
80 changes: 54 additions & 26 deletions review/checkbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,34 @@
cb.filter = cb.comboboxNode.value;
cb.filterOptions();
cb.open();
}, moveFocusAfterCombobox: function(testPageDocument){
// sets focus on a link after the Combobox
testPageDocument.querySelector('#afterlink').focus();
}, moveFocusBeforeCombobox: function(testPageDocument){
// sets focus on a link before the Combobox
testPageDocument.querySelector('#beforelink').focus();
}, moveFocusToCombobox: function(testPageDocument){
// sets focus on the combobox
testPageDocument.querySelector('[role="combobox"]').focus();
}, openListbox: function(testPageDocument){
// sets focus on and expands the Combobox
testPageDocument.querySelector('[role="combobox"]').focus();
testPageDocument.defaultView.selectController.updateMenuState(true);
}, openListboxToApple: function(testPageDocument){
// sets focus on and expands the Combobox, and sets the focused option to 'Apple'
testPageDocument.querySelector('[role="combobox"]').focus();
testPageDocument.defaultView.selectController.updateMenuState(true);
testPageDocument.defaultView.selectController.onOptionChange(1);
}, openListboxToGuava: function(testPageDocument){
// sets focus on and expands the Combobox, and sets the focused option to 'Guave'
testPageDocument.querySelector('[role="combobox"]').focus();
testPageDocument.defaultView.selectController.updateMenuState(true);
testPageDocument.defaultView.selectController.onOptionChange(11);
}, openListboxToHuckleberry: function(testPageDocument){
// sets focus on and expands the Combobox, and sets the focused option to 'Huckleberry'
testPageDocument.querySelector('[role="combobox"]').focus();
testPageDocument.defaultView.selectController.updateMenuState(true);
testPageDocument.defaultView.selectController.onOptionChange(12);
}, openMenuAndSetFocusToFirstItem: function(testPageDocument){
// opens the menu, and sets focus on 'Action 1'
testPageDocument.defaultView.menuController.openPopup();
Expand Down Expand Up @@ -259,7 +287,7 @@ <h2>Test 1: Navigate to an unchecked checkbox in reading mode</h2>
<ul>
<li>Mode: reading</li>
<li>Applies to: jaws, nvda</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-01-navigate-to-unchecked-checkbox-reading.html?at=jaws">jaws</a></li>
Expand Down Expand Up @@ -332,7 +360,7 @@ <h2>Test 2: Navigate to an unchecked checkbox in interaction mode</h2>
<ul>
<li>Mode: interaction</li>
<li>Applies to: jaws, nvda</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-02-navigate-to-unchecked-checkbox-interaction.html?at=jaws">jaws</a></li>
Expand Down Expand Up @@ -398,7 +426,7 @@ <h2>Test 3: Navigate to an unchecked checkbox</h2>
<ul>
<li>Mode: interaction</li>
<li>Applies to: voiceover_macos</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-03-navigate-to-unchecked-checkbox-interaction.html?at=voiceover_macos">voiceover_macos</a></li>
Expand Down Expand Up @@ -444,7 +472,7 @@ <h2>Test 4: Navigate to a checked checkbox in reading mode</h2>
<ul>
<li>Mode: reading</li>
<li>Applies to: jaws, nvda</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-04-navigate-to-checked-checkbox-reading.html?at=jaws">jaws</a></li>
Expand Down Expand Up @@ -527,7 +555,7 @@ <h2>Test 5: Navigate to a checked checkbox in interaction mode</h2>
<ul>
<li>Mode: interaction</li>
<li>Applies to: jaws, nvda</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-05-navigate-to-checked-checkbox-interaction.html?at=jaws">jaws</a></li>
Expand Down Expand Up @@ -603,7 +631,7 @@ <h2>Test 6: Navigate to a checked checkbox</h2>
<ul>
<li>Mode: interaction</li>
<li>Applies to: voiceover_macos</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-06-navigate-to-checked-checkbox-interaction.html?at=voiceover_macos">voiceover_macos</a></li>
Expand Down Expand Up @@ -654,7 +682,7 @@ <h2>Test 7: Operate a checkbox in reading mode</h2>
<ul>
<li>Mode: reading</li>
<li>Applies to: jaws, nvda</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-07-operate-checkbox-reading.html?at=jaws">jaws</a></li>
Expand Down Expand Up @@ -717,7 +745,7 @@ <h2>Test 8: Operate a checkbox in interaction mode</h2>
<ul>
<li>Mode: interaction</li>
<li>Applies to: jaws, nvda</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-08-operate-checkbox-interaction.html?at=jaws">jaws</a></li>
Expand Down Expand Up @@ -778,7 +806,7 @@ <h2>Test 9: Operate a checkbox</h2>
<ul>
<li>Mode: interaction</li>
<li>Applies to: voiceover_macos</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-09-operate-checkbox-interaction.html?at=voiceover_macos">voiceover_macos</a></li>
Expand Down Expand Up @@ -820,7 +848,7 @@ <h2>Test 10: Read an unchecked checkbox in reading mode</h2>
<ul>
<li>Mode: reading</li>
<li>Applies to: jaws, nvda</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-10-read-unchecked-checkbox-reading.html?at=jaws">jaws</a></li>
Expand Down Expand Up @@ -898,7 +926,7 @@ <h2>Test 11: Read an unchecked checkbox in interaction mode</h2>
<ul>
<li>Mode: interaction</li>
<li>Applies to: jaws, nvda</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-11-read-unchecked-checkbox-interaction.html?at=jaws">jaws</a></li>
Expand Down Expand Up @@ -976,7 +1004,7 @@ <h2>Test 12: Read an unchecked checkbox</h2>
<ul>
<li>Mode: interaction</li>
<li>Applies to: voiceover_macos</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-12-read-unchecked-checkbox-interaction.html?at=voiceover_macos">voiceover_macos</a></li>
Expand Down Expand Up @@ -1026,7 +1054,7 @@ <h2>Test 13: Read a checked checkbox in reading mode</h2>
<ul>
<li>Mode: reading</li>
<li>Applies to: jaws, nvda</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-13-read-checked-checkbox-reading.html?at=jaws">jaws</a></li>
Expand Down Expand Up @@ -1104,7 +1132,7 @@ <h2>Test 14: Read a checked checkbox in interaction mode</h2>
<ul>
<li>Mode: interaction</li>
<li>Applies to: jaws, nvda</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-14-read-checked-checkbox-interaction.html?at=jaws">jaws</a></li>
Expand Down Expand Up @@ -1182,7 +1210,7 @@ <h2>Test 15: Read a checked checkbox</h2>
<ul>
<li>Mode: interaction</li>
<li>Applies to: voiceover_macos</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-15-read-checked-checkbox-interaction.html?at=voiceover_macos">voiceover_macos</a></li>
Expand Down Expand Up @@ -1232,7 +1260,7 @@ <h2>Test 16: Read grouping information of a grouped checkbox in reading mode</h2
<ul>
<li>Mode: reading</li>
<li>Applies to: jaws, nvda</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-16-read-checkbox-group-reading.html?at=jaws">jaws</a></li>
Expand Down Expand Up @@ -1296,7 +1324,7 @@ <h2>Test 17: Read grouping information of a grouped checkbox in interaction mode
<ul>
<li>Mode: interaction</li>
<li>Applies to: jaws, nvda</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-17-read-checkbox-group-interaction.html?at=jaws">jaws</a></li>
Expand Down Expand Up @@ -1360,7 +1388,7 @@ <h2>Test 18: Read grouping information of a grouped checkbox</h2>
<ul>
<li>Mode: interaction</li>
<li>Applies to: voiceover_macos</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-18-read-checkbox-group-interaction.html?at=voiceover_macos">voiceover_macos</a></li>
Expand Down Expand Up @@ -1404,7 +1432,7 @@ <h2>Test 19: Navigate sequentially through a checkbox group in reading mode</h2>
<ul>
<li>Mode: reading</li>
<li>Applies to: jaws, nvda</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-19-navigate-sequentially-through-checkbox-group-reading.html?at=jaws">jaws</a></li>
Expand Down Expand Up @@ -1473,7 +1501,7 @@ <h2>Test 20: Navigate sequentially through a checkbox group</h2>
<ul>
<li>Mode: interaction</li>
<li>Applies to: voiceover_macos</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-20-navigate-sequentially-through-checkbox-group-interaction.html?at=voiceover_macos">voiceover_macos</a></li>
Expand Down Expand Up @@ -1519,7 +1547,7 @@ <h2>Test 21: Navigate into a checkbox group in reading mode</h2>
<ul>
<li>Mode: reading</li>
<li>Applies to: jaws, nvda</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-21-navigate-into-checkbox-group-reading.html?at=jaws">jaws</a></li>
Expand Down Expand Up @@ -1596,7 +1624,7 @@ <h2>Test 22: Navigate into a checkbox group in interaction mode</h2>
<ul>
<li>Mode: interaction</li>
<li>Applies to: jaws, nvda</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-22-navigate-into-checkbox-group-interaction.html?at=jaws">jaws</a></li>
Expand Down Expand Up @@ -1665,7 +1693,7 @@ <h2>Test 23: Navigate into a checkbox group</h2>
<ul>
<li>Mode: interaction</li>
<li>Applies to: voiceover_macos</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-23-navigate-into-checkbox-group-interaction.html?at=voiceover_macos">voiceover_macos</a></li>
Expand Down Expand Up @@ -1715,7 +1743,7 @@ <h2>Test 24: Navigate out of a checkbox group in reading mode</h2>
<ul>
<li>Mode: reading</li>
<li>Applies to: jaws, nvda</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-24-navigate-out-of-checkbox-group-reading.html?at=jaws">jaws</a></li>
Expand Down Expand Up @@ -1784,7 +1812,7 @@ <h2>Test 25: Navigate out of a checkbox group in interaction mode</h2>
<ul>
<li>Mode: interaction</li>
<li>Applies to: jaws, nvda</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-25-navigate-out-of-checkbox-group-interaction.html?at=jaws">jaws</a></li>
Expand Down Expand Up @@ -1853,7 +1881,7 @@ <h2>Test 26: Navigate out of a checkbox group</h2>
<ul>
<li>Mode: interaction</li>
<li>Applies to: voiceover_macos</li>
<li>Lasted edited: Tue Mar 9 17:49:35 2021 -0600</li>
<li>Lasted edited: Wed Mar 24 23:19:35 2021 -0700</li>
<li>Tests:
<ul>
<li><a href="../tests/checkbox/test-26-navigate-out-of-checkbox-group-interaction.html?at=voiceover_macos">voiceover_macos</a></li>
Expand Down
Loading

0 comments on commit 9198d4a

Please sign in to comment.