diff --git a/index.html b/index.html index df9f9c27f..32dbf2e33 100644 --- a/index.html +++ b/index.html @@ -40,7 +40,7 @@

Test Patterns for Review

Index Review 26 - 852a6fd chore: Renormalize line endings + a9c11e8 Execute setup script on popup for review page @@ -48,7 +48,7 @@

Test Patterns for Review

Index Review 30 - 852a6fd chore: Renormalize line endings + a9c11e8 Execute setup script on popup for review page @@ -56,7 +56,7 @@

Test Patterns for Review

Index Review 40 - 852a6fd chore: Renormalize line endings + a9c11e8 Execute setup script on popup for review page diff --git a/review/checkbox.html b/review/checkbox.html index 8a4d949a7..6d66ef06d 100644 --- a/review/checkbox.html +++ b/review/checkbox.html @@ -55,6 +55,119 @@ } } } + + function executeScriptInTestPage(setupScriptName, testPageWindow) { + if (testPageWindow.location.origin !== window.location.origin // make sure the origin is the same, and prevent this from firing on an 'about' page + || testPageWindow.document.readyState !== 'complete' + ) { + window.setTimeout(() => { + executeScriptInTestPage(setupScriptName, testPageWindow); + }, 100); + return; + } + + if (setupScriptName) { + var scripts = { + checkFirstCheckbox: function(testPageDocument){ + // Set aria-checked on first checkbox + testPageDocument.querySelector('[role="checkbox"]').setAttribute('aria-checked', 'true'); +}, moveFocusAndCheckFirstCheckbox: function(testPageDocument){ + // Move focus and set aria-checked on first checkbox + const checkbox = testPageDocument.querySelector('[role="checkbox"]'); + checkbox.focus(); + checkbox.setAttribute('aria-checked', 'true'); +}, moveFocusToFirstCheckbox: function(testPageDocument){ + // Move focus to first checkbox + testPageDocument.querySelector('[role="checkbox"]').focus(); +}, buttonFocusEmptyCollpased: function(testPageDocument){ + // Set focus on button + // Ensure in collapsed state. + var cb = testPageDocument.comboboxAutocomplete; + cb.buttonNode.focus(); +}, buttonFocusEmptyExpanded: function(testPageDocument){ + // Set focus on button + // Ensure in expanded state. + var cb = testPageDocument.comboboxAutocomplete; + cb.buttonNode.focus(); + cb.filter = cb.comboboxNode.value; + cb.filterOptions(); + cb.open(); +}, comboboxFocusEmptyCollapsed: function(testPageDocument){ + // Set focus on combobox + // Set value of 'combobox' is empty + // Ensure in collapsed state + var cb = testPageDocument.comboboxAutocomplete; + cb.comboboxNode.value = ''; + cb.combobox.focus(); +}, comboboxFocusEmptyExpanded: function(testPageDocument){ + // Set focus on combobox + // Set value of 'combobox' to 'Alabama' + // Ensure in expanded state. + var cb = testPageDocument.comboboxAutocomplete; + cb.comboboxNode.value = ''; + cb.combobox.focus(); + cb.filter = cb.comboboxNode.value; + cb.filterOptions(); + cb.open(); +}, comboboxValueSetCollapsedState: function(testPageDocument){ + // Set focus on combobox + // Set value of 'combobox' to 'Alabama' + // Ensure in collapsed state. + var cb = testPageDocument.comboboxAutocomplete; + cb.comboboxNode.value = 'Alabama'; + cb.comboboxNode.focus(); + cb.filter = cb.comboboxNode.value; + cb.filterOptions(); +}, comboboxValueSetExpandedState: function(testPageDocument){ + // Set focus on combobox + // Set value of 'combobox' to 'a' + // Ensure in expanded state. + var cb = testPageDocument.comboboxAutocomplete; + cb.comboboxNode.value = 'a'; + cb.comboboxNode.focus(); + cb.filter = cb.comboboxNode.value; + cb.filterOptions(); + cb.open(); +}, focusonfirstlink: function(testPageDocument){ + // Move focus to the link just before the meunbar + testPageDocument.querySelector('a').focus(); +}, focusonfont: function(testPageDocument){ + // Move focus to the "Font" menu item + testPageDocument.querySelectorAll('[role=menuitem]')[0].focus(); +}, focusonsize: function(testPageDocument){ + // Move focus to the "Size" menu item + testPageDocument.querySelectorAll('[role=menuitem]')[3].focus(); +}, focusonstylecolor: function(testPageDocument){ + // Move focus to the "Style/Color" menu item + testPageDocument.querySelectorAll('[role=menuitem]')[1].focus(); +}, focusontextalign: function(testPageDocument){ + // Move focus to the "Text Align" menu item + testPageDocument.querySelectorAll('[role=menuitem]')[2].focus(); +} + }; + + scripts[setupScriptName](testPageWindow.document); + } + } + + function openTestPage(testPageUri, testNumber, setupScriptName) { + testPageWindow = window.open(testPageUri, '_blank', 'toolbar=0,location=0,menubar=0,width=400,height=400'); + + document.getElementById('open-test-page-' + testNumber).disabled = true; + + // If the window is closed, re-enable open popup button + testPageWindow.onunload = function(event) { + window.setTimeout(() => { + if (testPageWindow.closed) { + testPageWindow = undefined; + document.getElementById('open-test-page-' + testNumber).disabled = false; + } + }, 100); + + }; + + executeScriptInTestPage(setupScriptName, testPageWindow); + } @@ -74,7 +187,7 @@

Test 1: Navigate to an unchecked checkbox in reading mode

+ +

JAWS

@@ -144,7 +260,7 @@

Test 2: Navigate to an unchecked checkbox in interaction mode

+ +

JAWS

@@ -207,7 +326,7 @@

Test 3: Navigate to an unchecked checkbox

+ +

VoiceOver for macOS

@@ -250,7 +372,7 @@

Test 4: Navigate to a checked checkbox in reading mode

  • Mode: reading
  • Applies to: jaws, nvda
  • -
  • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
  • +
  • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
  • Tests:
    • jaws
    • @@ -265,6 +387,9 @@

      Test 4: Navigate to a checked checkbox in reading mode

+ +

JAWS

@@ -330,7 +455,7 @@

Test 5: Navigate to a checked checkbox in interaction mode

  • Mode: interaction
  • Applies to: jaws, nvda
  • -
  • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
  • +
  • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
  • Tests:
    • jaws
    • @@ -345,6 +470,9 @@

      Test 5: Navigate to a checked checkbox in interaction mode

+ +

JAWS

@@ -403,7 +531,7 @@

Test 6: Navigate to a checked checkbox

  • Mode: interaction
  • Applies to: voiceover_macos
  • -
  • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
  • +
  • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
  • Tests:
    • voiceover_macos
    • @@ -417,6 +545,9 @@

      Test 6: Navigate to a checked checkbox

+ +

VoiceOver for macOS

@@ -451,7 +582,7 @@

Test 7: Operate a checkbox in reading mode

  • Mode: reading
  • Applies to: jaws, nvda
  • -
  • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
  • +
  • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
  • Tests:
    • jaws
    • @@ -465,6 +596,9 @@

      Test 7: Operate a checkbox in reading mode

+ +

JAWS

@@ -511,7 +645,7 @@

Test 8: Operate a checkbox in interaction mode

  • Mode: interaction
  • Applies to: jaws, nvda
  • -
  • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
  • +
  • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
  • Tests:
    • jaws
    • @@ -525,6 +659,9 @@

      Test 8: Operate a checkbox in interaction mode

+ +

JAWS

@@ -569,7 +706,7 @@

Test 9: Operate a checkbox

  • Mode: interaction
  • Applies to: voiceover_macos
  • -
  • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
  • +
  • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
  • Tests:
+ +

VoiceOver for macOS

@@ -608,7 +748,7 @@

Test 10: Read an unchecked checkbox in reading mode

  • Mode: reading
  • Applies to: jaws, nvda
  • -
  • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
  • +
  • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
  • Tests:
    • jaws
    • @@ -623,6 +763,9 @@

      Test 10: Read an unchecked checkbox in reading mode

+ +

JAWS

@@ -683,7 +826,7 @@

Test 11: Read an unchecked checkbox in interaction mode

  • Mode: interaction
  • Applies to: jaws, nvda
  • -
  • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
  • +
  • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
  • Tests:
    • jaws
    • @@ -698,6 +841,9 @@

      Test 11: Read an unchecked checkbox in interaction mode

+ +

JAWS

@@ -758,7 +904,7 @@

Test 12: Read an unchecked checkbox

  • Mode: interaction
  • Applies to: voiceover_macos
  • -
  • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
  • +
  • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
  • Tests:
+ +

VoiceOver for macOS

@@ -805,7 +954,7 @@

Test 13: Read a checked checkbox in reading mode

  • Mode: reading
  • Applies to: jaws, nvda
  • -
  • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
  • +
  • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
  • Tests:
    • jaws
    • @@ -820,6 +969,9 @@

      Test 13: Read a checked checkbox in reading mode

+ +

JAWS

@@ -880,7 +1032,7 @@

Test 14: Read a checked checkbox in interaction mode

  • Mode: interaction
  • Applies to: jaws, nvda
  • -
  • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
  • +
  • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
  • Tests:
    • jaws
    • @@ -895,6 +1047,9 @@

      Test 14: Read a checked checkbox in interaction mode

+ +

JAWS

@@ -955,7 +1110,7 @@

Test 15: Read a checked checkbox

  • Mode: interaction
  • Applies to: voiceover_macos
  • -
  • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
  • +
  • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
  • Tests:
+ +

VoiceOver for macOS

@@ -1002,7 +1160,7 @@

Test 16: Read grouping information of a grouped checkbox in reading mode

  • Mode: reading
  • Applies to: jaws, nvda
  • -
  • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
  • +
  • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
  • Tests:
    • jaws
    • @@ -1017,6 +1175,9 @@

      Test 16: Read grouping information of a grouped checkbox in reading mode

    + +

    JAWS

    @@ -1063,7 +1224,7 @@

    Test 17: Read grouping information of a grouped checkbox in interaction mode
    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1078,6 +1239,9 @@

        Test 17: Read grouping information of a grouped checkbox in interaction mode

    + +

    JAWS

    @@ -1124,7 +1288,7 @@

    Test 18: Read grouping information of a grouped checkbox

    • Mode: interaction
    • Applies to: voiceover_macos
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • voiceover_macos
      • @@ -1138,6 +1302,9 @@

        Test 18: Read grouping information of a grouped checkbox

    + +

    VoiceOver for macOS

    @@ -1165,7 +1332,7 @@

    Test 19: Navigate sequentially through a checkbox group in reading mode

    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1181,6 +1348,9 @@

        Test 19: Navigate sequentially through a checkbox group in reading mode

    + +

    JAWS

    @@ -1231,7 +1401,7 @@

    Test 20: Navigate sequentially through a checkbox group

    • Mode: interaction
    • Applies to: voiceover_macos
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • voiceover_macos
      • @@ -1246,6 +1416,9 @@

        Test 20: Navigate sequentially through a checkbox group

    + +

    VoiceOver for macOS

    @@ -1274,7 +1447,7 @@

    Test 21: Navigate into a checkbox group in reading mode

    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1290,6 +1463,9 @@

        Test 21: Navigate into a checkbox group in reading mode

    + +

    JAWS

    @@ -1348,7 +1524,7 @@

    Test 22: Navigate into a checkbox group in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1364,6 +1540,9 @@

        Test 22: Navigate into a checkbox group in interaction mode

    + +

    JAWS

    @@ -1414,7 +1593,7 @@

    Test 23: Navigate into a checkbox group

    • Mode: interaction
    • Applies to: voiceover_macos
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • voiceover_macos
      • @@ -1429,6 +1608,9 @@

        Test 23: Navigate into a checkbox group

    + +

    VoiceOver for macOS

    @@ -1461,7 +1643,7 @@

    Test 24: Navigate out of a checkbox group in reading mode

    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1477,6 +1659,9 @@

        Test 24: Navigate out of a checkbox group in reading mode

    + +

    JAWS

    @@ -1527,7 +1712,7 @@

    Test 25: Navigate out of a checkbox group in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1543,6 +1728,9 @@

        Test 25: Navigate out of a checkbox group in interaction mode

    + +

    JAWS

    @@ -1593,7 +1781,7 @@

    Test 26: Navigate out of a checkbox group

    • Mode: interaction
    • Applies to: voiceover_macos
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • voiceover_macos
      • @@ -1608,6 +1796,9 @@

        Test 26: Navigate out of a checkbox group

    + +

    VoiceOver for macOS

    diff --git a/review/combobox-autocomplete-both.html b/review/combobox-autocomplete-both.html index c551495a9..6c1de036e 100644 --- a/review/combobox-autocomplete-both.html +++ b/review/combobox-autocomplete-both.html @@ -55,6 +55,119 @@ } } } + + function executeScriptInTestPage(setupScriptName, testPageWindow) { + if (testPageWindow.location.origin !== window.location.origin // make sure the origin is the same, and prevent this from firing on an 'about' page + || testPageWindow.document.readyState !== 'complete' + ) { + window.setTimeout(() => { + executeScriptInTestPage(setupScriptName, testPageWindow); + }, 100); + return; + } + + if (setupScriptName) { + var scripts = { + checkFirstCheckbox: function(testPageDocument){ + // Set aria-checked on first checkbox + testPageDocument.querySelector('[role="checkbox"]').setAttribute('aria-checked', 'true'); +}, moveFocusAndCheckFirstCheckbox: function(testPageDocument){ + // Move focus and set aria-checked on first checkbox + const checkbox = testPageDocument.querySelector('[role="checkbox"]'); + checkbox.focus(); + checkbox.setAttribute('aria-checked', 'true'); +}, moveFocusToFirstCheckbox: function(testPageDocument){ + // Move focus to first checkbox + testPageDocument.querySelector('[role="checkbox"]').focus(); +}, buttonFocusEmptyCollpased: function(testPageDocument){ + // Set focus on button + // Ensure in collapsed state. + var cb = testPageDocument.comboboxAutocomplete; + cb.buttonNode.focus(); +}, buttonFocusEmptyExpanded: function(testPageDocument){ + // Set focus on button + // Ensure in expanded state. + var cb = testPageDocument.comboboxAutocomplete; + cb.buttonNode.focus(); + cb.filter = cb.comboboxNode.value; + cb.filterOptions(); + cb.open(); +}, comboboxFocusEmptyCollapsed: function(testPageDocument){ + // Set focus on combobox + // Set value of 'combobox' is empty + // Ensure in collapsed state + var cb = testPageDocument.comboboxAutocomplete; + cb.comboboxNode.value = ''; + cb.combobox.focus(); +}, comboboxFocusEmptyExpanded: function(testPageDocument){ + // Set focus on combobox + // Set value of 'combobox' to 'Alabama' + // Ensure in expanded state. + var cb = testPageDocument.comboboxAutocomplete; + cb.comboboxNode.value = ''; + cb.combobox.focus(); + cb.filter = cb.comboboxNode.value; + cb.filterOptions(); + cb.open(); +}, comboboxValueSetCollapsedState: function(testPageDocument){ + // Set focus on combobox + // Set value of 'combobox' to 'Alabama' + // Ensure in collapsed state. + var cb = testPageDocument.comboboxAutocomplete; + cb.comboboxNode.value = 'Alabama'; + cb.comboboxNode.focus(); + cb.filter = cb.comboboxNode.value; + cb.filterOptions(); +}, comboboxValueSetExpandedState: function(testPageDocument){ + // Set focus on combobox + // Set value of 'combobox' to 'a' + // Ensure in expanded state. + var cb = testPageDocument.comboboxAutocomplete; + cb.comboboxNode.value = 'a'; + cb.comboboxNode.focus(); + cb.filter = cb.comboboxNode.value; + cb.filterOptions(); + cb.open(); +}, focusonfirstlink: function(testPageDocument){ + // Move focus to the link just before the meunbar + testPageDocument.querySelector('a').focus(); +}, focusonfont: function(testPageDocument){ + // Move focus to the "Font" menu item + testPageDocument.querySelectorAll('[role=menuitem]')[0].focus(); +}, focusonsize: function(testPageDocument){ + // Move focus to the "Size" menu item + testPageDocument.querySelectorAll('[role=menuitem]')[3].focus(); +}, focusonstylecolor: function(testPageDocument){ + // Move focus to the "Style/Color" menu item + testPageDocument.querySelectorAll('[role=menuitem]')[1].focus(); +}, focusontextalign: function(testPageDocument){ + // Move focus to the "Text Align" menu item + testPageDocument.querySelectorAll('[role=menuitem]')[2].focus(); +} + }; + + scripts[setupScriptName](testPageWindow.document); + } + } + + function openTestPage(testPageUri, testNumber, setupScriptName) { + testPageWindow = window.open(testPageUri, '_blank', 'toolbar=0,location=0,menubar=0,width=400,height=400'); + + document.getElementById('open-test-page-' + testNumber).disabled = true; + + // If the window is closed, re-enable open popup button + testPageWindow.onunload = function(event) { + window.setTimeout(() => { + if (testPageWindow.closed) { + testPageWindow = undefined; + document.getElementById('open-test-page-' + testNumber).disabled = false; + } + }, 100); + + }; + + executeScriptInTestPage(setupScriptName, testPageWindow); + } @@ -74,7 +187,7 @@

    Test 1: Navigate to empty, editable combobox in reading mode

    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -87,6 +200,9 @@

        Test 1: Navigate to empty, editable combobox in reading mode

    + +

    JAWS

    @@ -141,7 +257,7 @@

    Test 2: Navigate sequentially to empty, editable combobox in reading mode
  • Mode: reading
  • Applies to: jaws, nvda
  • -
  • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
  • +
  • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
  • Tests:
    • jaws
    • @@ -154,6 +270,9 @@

      Test 2: Navigate sequentially to empty, editable combobox in reading mode

    + +

    JAWS

    @@ -204,7 +323,7 @@

    Test 3: Navigate to empty, editable combobox in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -217,6 +336,9 @@

        Test 3: Navigate to empty, editable combobox in interaction mode

    + +

    JAWS

    @@ -267,7 +389,7 @@

    Test 4: Read empty, editable combobox in reading mode

    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -280,6 +402,9 @@

        Test 4: Read empty, editable combobox in reading mode

    + +

    JAWS

    @@ -330,7 +455,7 @@

    Test 5: Read empty, editable combobox in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -343,6 +468,9 @@

        Test 5: Read empty, editable combobox in interaction mode

    + +

    JAWS

    @@ -393,7 +521,7 @@

    Test 6: Navigate to filled, editable, collapsed combobox in reading mode
  • Mode: reading
  • Applies to: jaws, nvda
  • -
  • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
  • +
  • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
  • Tests:
    • jaws
    • @@ -406,6 +534,9 @@

      Test 6: Navigate to filled, editable, collapsed combobox in reading mode

    + +

    JAWS

    @@ -472,7 +603,7 @@

    Test 7: Navigate to filled, editable, collapsed combobox in interaction mod
    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -485,6 +616,9 @@

        Test 7: Navigate to filled, editable, collapsed combobox in interaction mod

    + +

    JAWS

    @@ -547,7 +681,7 @@

    Test 8: Read filled, editable, collapsed combobox in reading mode

    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -560,6 +694,9 @@

        Test 8: Read filled, editable, collapsed combobox in reading mode

    + +

    JAWS

    @@ -622,7 +759,7 @@

    Test 9: Read filled, editable, collapsed combobox in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -635,6 +772,9 @@

        Test 9: Read filled, editable, collapsed combobox in interaction mode

    + +

    JAWS

    @@ -697,7 +837,7 @@

    Test 10: Navigate to filled, editable, expanded combobox in reading mode

  • Mode: reading
  • Applies to: jaws, nvda
  • -
  • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
  • +
  • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
  • Tests:
    • jaws
    • @@ -710,6 +850,9 @@

      Test 10: Navigate to filled, editable, expanded combobox in reading mode

    + +

    JAWS

    @@ -776,7 +919,7 @@

    Test 11: Navigate sequentially to filled, editable, expanded combobox in rea
    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -789,6 +932,9 @@

        Test 11: Navigate sequentially to filled, editable, expanded combobox in rea

    + +

    JAWS

    @@ -841,7 +987,7 @@

    Test 12: Navigate to filled, editable, expanded combobox in interaction mode
    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -854,6 +1000,9 @@

        Test 12: Navigate to filled, editable, expanded combobox in interaction mode

    + +

    JAWS

    @@ -916,7 +1065,7 @@

    Test 13: Read filled, editable, expanded combobox in reading mode

    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -929,6 +1078,9 @@

        Test 13: Read filled, editable, expanded combobox in reading mode

    + +

    JAWS

    @@ -991,7 +1143,7 @@

    Test 14: Read filled, editable, expanded combobox in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1004,6 +1156,9 @@

        Test 14: Read filled, editable, expanded combobox in interaction mode

    + +

    JAWS

    @@ -1066,7 +1221,7 @@

    Test 15: Navigate to editable combobox with commands that switch mode from r
    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1079,6 +1234,9 @@

        Test 15: Navigate to editable combobox with commands that switch mode from r

    + +

    JAWS

    @@ -1123,7 +1281,7 @@

    Test 16: Activate editable combobox in reading mode

    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1136,6 +1294,9 @@

        Test 16: Activate editable combobox in reading mode

    + +

    JAWS

    @@ -1190,7 +1351,7 @@

    Test 17: Open combobox in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1203,6 +1364,9 @@

        Test 17: Open combobox in interaction mode

    + +

    JAWS

    @@ -1261,7 +1425,7 @@

    Test 18: Close combobox in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1274,6 +1438,9 @@

        Test 18: Close combobox in interaction mode

    + +

    JAWS

    @@ -1328,7 +1495,7 @@

    Test 19: Open combobox with 'States' button in reading mode

    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1341,6 +1508,9 @@

        Test 19: Open combobox with 'States' button in reading mode

    + +

    JAWS

    @@ -1393,7 +1563,7 @@

    Test 20: Open combobox with 'States' button

    • Mode: interaction
    • Applies to: voiceover_macos
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • voiceover_macos
      • @@ -1405,6 +1575,9 @@

        Test 20: Open combobox with 'States' button

    + +

    VoiceOver for macOS

    @@ -1433,7 +1606,7 @@

    Test 21: Close combobox with 'States' button in reading mode

    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1446,6 +1619,9 @@

        Test 21: Close combobox with 'States' button in reading mode

    + +

    JAWS

    @@ -1502,7 +1678,7 @@

    Test 22: Close combobox with 'States' button in reading mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1515,6 +1691,9 @@

        Test 22: Close combobox with 'States' button in reading mode

    + +

    JAWS

    @@ -1569,7 +1748,7 @@

    Test 23: Navigate into popup from empty combobox in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1582,6 +1761,9 @@

        Test 23: Navigate into popup from empty combobox in interaction mode

    + +

    JAWS

    @@ -1644,7 +1826,7 @@

    Test 24: Type portion of valid value in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1657,6 +1839,9 @@

        Test 24: Type portion of valid value in interaction mode

    + +

    JAWS

    @@ -1717,7 +1902,7 @@

    Test 25: Navigate options in popup in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1730,6 +1915,9 @@

        Test 25: Navigate options in popup in interaction mode

    + +

    JAWS

    @@ -1790,7 +1978,7 @@

    Test 26: Read popup item in reading mode

    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1803,6 +1991,9 @@

        Test 26: Read popup item in reading mode

    + +

    JAWS

    @@ -1862,7 +2053,7 @@

    Test 27: Read popup item in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1875,6 +2066,9 @@

        Test 27: Read popup item in interaction mode

    + +

    JAWS

    @@ -1934,7 +2128,7 @@

    Test 28: Activate option in popup in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1947,6 +2141,9 @@

        Test 28: Activate option in popup in interaction mode

    + +

    JAWS

    @@ -2009,7 +2206,7 @@

    Test 29: Cancel option selection in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -2022,6 +2219,9 @@

        Test 29: Cancel option selection in interaction mode

    + +

    JAWS

    @@ -2084,7 +2284,7 @@

    Test 30: Initiate caret movement from listbox in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -2097,6 +2297,9 @@

        Test 30: Initiate caret movement from listbox in interaction mode

    + +

    JAWS

    diff --git a/review/menubar-editor.html b/review/menubar-editor.html index b2e9a6305..22739fc68 100644 --- a/review/menubar-editor.html +++ b/review/menubar-editor.html @@ -55,6 +55,119 @@ } } } + + function executeScriptInTestPage(setupScriptName, testPageWindow) { + if (testPageWindow.location.origin !== window.location.origin // make sure the origin is the same, and prevent this from firing on an 'about' page + || testPageWindow.document.readyState !== 'complete' + ) { + window.setTimeout(() => { + executeScriptInTestPage(setupScriptName, testPageWindow); + }, 100); + return; + } + + if (setupScriptName) { + var scripts = { + checkFirstCheckbox: function(testPageDocument){ + // Set aria-checked on first checkbox + testPageDocument.querySelector('[role="checkbox"]').setAttribute('aria-checked', 'true'); +}, moveFocusAndCheckFirstCheckbox: function(testPageDocument){ + // Move focus and set aria-checked on first checkbox + const checkbox = testPageDocument.querySelector('[role="checkbox"]'); + checkbox.focus(); + checkbox.setAttribute('aria-checked', 'true'); +}, moveFocusToFirstCheckbox: function(testPageDocument){ + // Move focus to first checkbox + testPageDocument.querySelector('[role="checkbox"]').focus(); +}, buttonFocusEmptyCollpased: function(testPageDocument){ + // Set focus on button + // Ensure in collapsed state. + var cb = testPageDocument.comboboxAutocomplete; + cb.buttonNode.focus(); +}, buttonFocusEmptyExpanded: function(testPageDocument){ + // Set focus on button + // Ensure in expanded state. + var cb = testPageDocument.comboboxAutocomplete; + cb.buttonNode.focus(); + cb.filter = cb.comboboxNode.value; + cb.filterOptions(); + cb.open(); +}, comboboxFocusEmptyCollapsed: function(testPageDocument){ + // Set focus on combobox + // Set value of 'combobox' is empty + // Ensure in collapsed state + var cb = testPageDocument.comboboxAutocomplete; + cb.comboboxNode.value = ''; + cb.combobox.focus(); +}, comboboxFocusEmptyExpanded: function(testPageDocument){ + // Set focus on combobox + // Set value of 'combobox' to 'Alabama' + // Ensure in expanded state. + var cb = testPageDocument.comboboxAutocomplete; + cb.comboboxNode.value = ''; + cb.combobox.focus(); + cb.filter = cb.comboboxNode.value; + cb.filterOptions(); + cb.open(); +}, comboboxValueSetCollapsedState: function(testPageDocument){ + // Set focus on combobox + // Set value of 'combobox' to 'Alabama' + // Ensure in collapsed state. + var cb = testPageDocument.comboboxAutocomplete; + cb.comboboxNode.value = 'Alabama'; + cb.comboboxNode.focus(); + cb.filter = cb.comboboxNode.value; + cb.filterOptions(); +}, comboboxValueSetExpandedState: function(testPageDocument){ + // Set focus on combobox + // Set value of 'combobox' to 'a' + // Ensure in expanded state. + var cb = testPageDocument.comboboxAutocomplete; + cb.comboboxNode.value = 'a'; + cb.comboboxNode.focus(); + cb.filter = cb.comboboxNode.value; + cb.filterOptions(); + cb.open(); +}, focusonfirstlink: function(testPageDocument){ + // Move focus to the link just before the meunbar + testPageDocument.querySelector('a').focus(); +}, focusonfont: function(testPageDocument){ + // Move focus to the "Font" menu item + testPageDocument.querySelectorAll('[role=menuitem]')[0].focus(); +}, focusonsize: function(testPageDocument){ + // Move focus to the "Size" menu item + testPageDocument.querySelectorAll('[role=menuitem]')[3].focus(); +}, focusonstylecolor: function(testPageDocument){ + // Move focus to the "Style/Color" menu item + testPageDocument.querySelectorAll('[role=menuitem]')[1].focus(); +}, focusontextalign: function(testPageDocument){ + // Move focus to the "Text Align" menu item + testPageDocument.querySelectorAll('[role=menuitem]')[2].focus(); +} + }; + + scripts[setupScriptName](testPageWindow.document); + } + } + + function openTestPage(testPageUri, testNumber, setupScriptName) { + testPageWindow = window.open(testPageUri, '_blank', 'toolbar=0,location=0,menubar=0,width=400,height=400'); + + document.getElementById('open-test-page-' + testNumber).disabled = true; + + // If the window is closed, re-enable open popup button + testPageWindow.onunload = function(event) { + window.setTimeout(() => { + if (testPageWindow.closed) { + testPageWindow = undefined; + document.getElementById('open-test-page-' + testNumber).disabled = false; + } + }, 100); + + }; + + executeScriptInTestPage(setupScriptName, testPageWindow); + } @@ -74,7 +187,7 @@

    Test 1: Navigate to menubar in reading mode

    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -88,6 +201,9 @@

        Test 1: Navigate to menubar in reading mode

    + +

    JAWS

    @@ -152,7 +268,7 @@

    Test 2: Activate menubar in reading mode

    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -166,6 +282,9 @@

        Test 2: Activate menubar in reading mode

    + +

    JAWS

    @@ -212,7 +331,7 @@

    Test 3: Navigate to menubar with commands that switch mode from reading to i
    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -226,6 +345,9 @@

        Test 3: Navigate to menubar with commands that switch mode from reading to i

    + +

    JAWS

    @@ -290,7 +412,7 @@

    Test 4: Navigate to menubar in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -304,6 +426,9 @@

        Test 4: Navigate to menubar in interaction mode

    + +

    JAWS

    @@ -366,7 +491,7 @@

    Test 5: Navigate to menubar

    • Mode: interaction
    • Applies to: voiceover_macos
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
    + +

    VoiceOver for macOS

    @@ -414,7 +542,7 @@

    Test 6: Navigate to menu item in menubar in reading mode

    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -428,6 +556,9 @@

        Test 6: Navigate to menu item in menubar in reading mode

    + +

    JAWS

    @@ -480,7 +611,7 @@

    Test 7: Navigate to menu item in menubar in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -494,6 +625,9 @@

        Test 7: Navigate to menu item in menubar in interaction mode

    + +

    JAWS

    @@ -556,7 +690,7 @@

    Test 8: Navigate to menu item in menubar

    • Mode: interaction
    • Applies to: voiceover_macos
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • voiceover_macos
      • @@ -569,6 +703,9 @@

        Test 8: Navigate to menu item in menubar

    + +

    VoiceOver for macOS

    @@ -604,7 +741,7 @@

    Test 9: Navigate to open menu item in menubar in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -618,6 +755,9 @@

        Test 9: Navigate to open menu item in menubar in interaction mode

    + +

    JAWS

    @@ -680,7 +820,7 @@

    Test 10: Navigate to open menu item in menubar

    • Mode: interaction
    • Applies to: voiceover_macos
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • voiceover_macos
      • @@ -693,6 +833,9 @@

        Test 10: Navigate to open menu item in menubar

    + +

    VoiceOver for macOS

    @@ -727,7 +870,7 @@

    Test 11: Open submenu in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -742,6 +885,9 @@

        Test 11: Open submenu in interaction mode

    + +

    JAWS

    @@ -804,7 +950,7 @@

    Test 12: Open submenu

    • Mode: interaction
    • Applies to: voiceover_macos
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
    + +

    VoiceOver for macOS

    @@ -853,7 +1002,7 @@

    Test 13: Close submenu in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -868,6 +1017,9 @@

        Test 13: Close submenu in interaction mode

    + +

    JAWS

    @@ -928,7 +1080,7 @@

    Test 14: Close submenu

    • Mode: interaction
    • Applies to: voiceover_macos
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
    + +

    VoiceOver for macOS

    @@ -975,7 +1130,7 @@

    Test 15: Navigate to checked menu item radio in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -990,6 +1145,9 @@

        Test 15: Navigate to checked menu item radio in interaction mode

    + +

    JAWS

    @@ -1050,7 +1208,7 @@

    Test 16: Navigate to checked menu item radio

    • Mode: interaction
    • Applies to: voiceover_macos
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • voiceover_macos
      • @@ -1064,6 +1222,9 @@

        Test 16: Navigate to checked menu item radio

    + +

    VoiceOver for macOS

    @@ -1098,7 +1259,7 @@

    Test 17: Navigate to unchecked menu item radio in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1113,6 +1274,9 @@

        Test 17: Navigate to unchecked menu item radio in interaction mode

    + +

    JAWS

    @@ -1173,7 +1337,7 @@

    Test 18: Navigate to unchecked menu item radio

    • Mode: interaction
    • Applies to: voiceover_macos
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • voiceover_macos
      • @@ -1187,6 +1351,9 @@

        Test 18: Navigate to unchecked menu item radio

    + +

    VoiceOver for macOS

    @@ -1221,7 +1388,7 @@

    Test 19: Navigate to unchecked menu item checkbox in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1236,6 +1403,9 @@

        Test 19: Navigate to unchecked menu item checkbox in interaction mode

    + +

    JAWS

    @@ -1298,7 +1468,7 @@

    Test 20: Navigate to unchecked menu item checkbox

    • Mode: interaction
    • Applies to: voiceover_macos
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • voiceover_macos
      • @@ -1312,6 +1482,9 @@

        Test 20: Navigate to unchecked menu item checkbox

    + +

    VoiceOver for macOS

    @@ -1347,7 +1520,7 @@

    Test 21: Navigate to checked menu item checkbox in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1362,6 +1535,9 @@

        Test 21: Navigate to checked menu item checkbox in interaction mode

    + +

    JAWS

    @@ -1430,7 +1606,7 @@

    Test 22: Navigate to checked menu item checkbox

    • Mode: interaction
    • Applies to: voiceover_macos
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • voiceover_macos
      • @@ -1444,6 +1620,9 @@

        Test 22: Navigate to checked menu item checkbox

    + +

    VoiceOver for macOS

    @@ -1482,7 +1661,7 @@

    Test 23: Read menu item in reading mode

    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1499,6 +1678,9 @@

        Test 23: Read menu item in reading mode

    + +

    JAWS

    @@ -1553,7 +1735,7 @@

    Test 24: Read menu item in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1570,6 +1752,9 @@

        Test 24: Read menu item in interaction mode

    + +

    JAWS

    @@ -1634,7 +1819,7 @@

    Test 25: Read menu item

    • Mode: interaction
    • Applies to: voiceover_macos
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
    + +

    VoiceOver for macOS

    @@ -1685,7 +1873,7 @@

    Test 26: Read unchecked menu item radio in reading mode

    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1702,6 +1890,9 @@

        Test 26: Read unchecked menu item radio in reading mode

    + +

    JAWS

    @@ -1766,7 +1957,7 @@

    Test 27: Read unchecked menu item radio in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1783,6 +1974,9 @@

        Test 27: Read unchecked menu item radio in interaction mode

    + +

    JAWS

    @@ -1847,7 +2041,7 @@

    Test 28: Read unchecked menu item radio

    • Mode: interaction
    • Applies to: voiceover_macos
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • voiceover_macos
      • @@ -1863,6 +2057,9 @@

        Test 28: Read unchecked menu item radio

    + +

    VoiceOver for macOS

    @@ -1898,7 +2095,7 @@

    Test 29: Read checked menu item radio in reading mode

    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1915,6 +2112,9 @@

        Test 29: Read checked menu item radio in reading mode

    + +

    JAWS

    @@ -1979,7 +2179,7 @@

    Test 30: Read checked menu item radio in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -1996,6 +2196,9 @@

        Test 30: Read checked menu item radio in interaction mode

    + +

    JAWS

    @@ -2060,7 +2263,7 @@

    Test 31: Read checked menu item radio

    • Mode: interaction
    • Applies to: voiceover_macos
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • voiceover_macos
      • @@ -2076,6 +2279,9 @@

        Test 31: Read checked menu item radio

    + +

    VoiceOver for macOS

    @@ -2111,7 +2317,7 @@

    Test 32: Read unchecked menu item checkbox in reading mode

    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -2128,6 +2334,9 @@

        Test 32: Read unchecked menu item checkbox in reading mode

    + +

    JAWS

    @@ -2192,7 +2401,7 @@

    Test 33: Read unchecked menu item checkbox in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -2209,6 +2418,9 @@

        Test 33: Read unchecked menu item checkbox in interaction mode

    + +

    JAWS

    @@ -2273,7 +2485,7 @@

    Test 34: Read unchecked menu item checkbox

    • Mode: interaction
    • Applies to: voiceover_macos
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • voiceover_macos
      • @@ -2289,6 +2501,9 @@

        Test 34: Read unchecked menu item checkbox

    + +

    VoiceOver for macOS

    @@ -2324,7 +2539,7 @@

    Test 35: Read checked menu item checkbox in reading mode

    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -2341,6 +2556,9 @@

        Test 35: Read checked menu item checkbox in reading mode

    + +

    JAWS

    @@ -2405,7 +2623,7 @@

    Test 36: Read checked menu item checkbox in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -2422,6 +2640,9 @@

        Test 36: Read checked menu item checkbox in interaction mode

    + +

    JAWS

    @@ -2486,7 +2707,7 @@

    Test 37: Read checked menu item checkbox

    • Mode: interaction
    • Applies to: voiceover_macos
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • voiceover_macos
      • @@ -2502,6 +2723,9 @@

        Test 37: Read checked menu item checkbox

    + +

    VoiceOver for macOS

    @@ -2537,7 +2761,7 @@

    Test 38: Read disabled menu item in reading mode

    • Mode: reading
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -2554,6 +2778,9 @@

        Test 38: Read disabled menu item in reading mode

    + +

    JAWS

    @@ -2616,7 +2843,7 @@

    Test 39: Read disabled menu item in interaction mode

    • Mode: interaction
    • Applies to: jaws, nvda
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
      • jaws
      • @@ -2633,6 +2860,9 @@

        Test 39: Read disabled menu item in interaction mode

    + +

    JAWS

    @@ -2695,7 +2925,7 @@

    Test 40: Read disabled menu item

    • Mode: interaction
    • Applies to: voiceover_macos
    • -
    • Lasted edited: Tue Oct 27 10:43:44 2020 -0700
    • +
    • Lasted edited: Tue Nov 17 17:22:14 2020 -0500
    • Tests:
    + +

    VoiceOver for macOS

    diff --git a/scripts/review-template.mustache b/scripts/review-template.mustache index 76cda6ae0..48105f7e5 100644 --- a/scripts/review-template.mustache +++ b/scripts/review-template.mustache @@ -55,6 +55,44 @@ } } } + + function executeScriptInTestPage(setupScriptName, testPageWindow) { + if (testPageWindow.location.origin !== window.location.origin // make sure the origin is the same, and prevent this from firing on an 'about' page + || testPageWindow.document.readyState !== 'complete' + ) { + window.setTimeout(() => { + executeScriptInTestPage(setupScriptName, testPageWindow); + }, 100); + return; + } + + if (setupScriptName) { + var scripts = { + {{{setupScripts}}} + }; + + scripts[setupScriptName](testPageWindow.document); + } + } + + function openTestPage(testPageUri, testNumber, setupScriptName) { + testPageWindow = window.open(testPageUri, '_blank', 'toolbar=0,location=0,menubar=0,width=400,height=400'); + + document.getElementById('open-test-page-' + testNumber).disabled = true; + + // If the window is closed, re-enable open popup button + testPageWindow.onunload = function(event) { + window.setTimeout(() => { + if (testPageWindow.closed) { + testPageWindow = undefined; + document.getElementById('open-test-page-' + testNumber).disabled = false; + } + }, 100); + + }; + + executeScriptInTestPage(setupScriptName, testPageWindow); + } @@ -91,6 +129,9 @@

  • + +

    {{#ATTests}}
    diff --git a/scripts/test-reviewer.mjs b/scripts/test-reviewer.mjs index 5e8982413..bb4f5aaf6 100644 --- a/scripts/test-reviewer.mjs +++ b/scripts/test-reviewer.mjs @@ -1,4 +1,5 @@ import path from 'path'; +import fs from 'fs'; import fse from 'fs-extra'; import htmlparser2 from 'htmlparser2'; import { spawnSync } from 'child_process'; @@ -17,6 +18,7 @@ let allATKeys = []; support.ats.forEach(at => { allATKeys.push(at.key); }); +const scripts = []; const getPriorityString = function(priority) { priority = parseInt(priority); @@ -43,6 +45,26 @@ fse.readdirSync(testDir).forEach(function (subDir) { const commAPI = new commandsAPI(commands, support); const tests = []; + + const referencesCsv = fs.readFileSync(path.join(subDirFullPath, 'data', 'references.csv'), 'UTF-8'); + const reference = referencesCsv.split(/\r?\n/).find(s => s.startsWith('reference,')).split(',')[1]; + + const scriptsPath = path.join(subDirFullPath, 'data', 'js'); + fse.readdirSync(scriptsPath).forEach(function (scriptFile) { + let script = ''; + try { + const data = fs.readFileSync(path.join(scriptsPath, scriptFile), 'UTF-8'); + const lines = data.split(/\r?\n/); + lines.forEach((line) => { + if (line.trim().length) + script += '\t' + line.trim() + '\n'; + }); + } catch (err) { + console.error(err); + } + scripts.push(`\t${scriptFile.split('.js')[0]}: function(testPageDocument){\n${script}}`); + }); + fse.readdirSync(subDirFullPath).forEach(function (test) { if (path.extname(test) === '.html' && path.basename(test) !== 'index.html') { @@ -116,7 +138,7 @@ fse.readdirSync(testDir).forEach(function (subDir) { assertions: assertions && assertions.length ? assertions.map(a => ({ priority: getPriorityString(a[0]), description: a[1] })) : undefined, userInstruction, modeInstruction: commAPI.getModeInstructions(mode, at), - setupScriptDescription: testData.setup_script_description + setupScriptDescription: testData.setup_script_description, }); } @@ -129,8 +151,10 @@ fse.readdirSync(testDir).forEach(function (subDir) { testNumber: tests.length+1, name: testFullName, location: `/${subDir}/${test}`, + reference: `/${subDir}/${reference}`, allReleventATsFormatted: testData.applies_to.join(', '), allReleventATs: testData.applies_to, + setupScriptName: testData.setupTestPage, task, mode, ATTests, @@ -161,7 +185,8 @@ for (let pattern in allTestsForPattern) { pattern: pattern, totalTests: allTestsForPattern[pattern].length, tests: allTestsForPattern[pattern], - AToptions: support.ats + AToptions: support.ats, + setupScripts: scripts }); let summaryFile = path.resolve(reviewDir, `${pattern}.html`);