From 5cd1d8edf009c3bc730ae97fb113383cc76c4839 Mon Sep 17 00:00:00 2001 From: Howard Edwards Date: Mon, 10 Feb 2025 10:14:54 -0500 Subject: [PATCH] Support changes introduced in https://github.com/w3c/aria-at/pull/1125 --- .../InstructionsRenderer.jsx | 10 +- server/models/services/TestsService.js | 5 +- server/resources/ats.json | 240 ++++++++++-------- server/scripts/import-tests/gitOperations.js | 2 +- 4 files changed, 142 insertions(+), 115 deletions(-) diff --git a/client/components/CandidateReview/CandidateTestPlanRun/InstructionsRenderer.jsx b/client/components/CandidateReview/CandidateTestPlanRun/InstructionsRenderer.jsx index 8eb202170..5fb734ba8 100644 --- a/client/components/CandidateReview/CandidateTestPlanRun/InstructionsRenderer.jsx +++ b/client/components/CandidateReview/CandidateTestPlanRun/InstructionsRenderer.jsx @@ -179,8 +179,14 @@ const InstructionsRenderer = ({ {renderableContent.commands.map( ({ id, settings, assertionExceptions = [] }, i) => { const settingsScreenText = isV2 - ? renderableContent.target.at.raw.settings[settings]?.screenText ?? - '' + ? settings + .split(' ') + .map( + setting => + renderableContent.target.at.raw.settings[setting] + ?.screenText + ) + .join(' and ') : null; let mustCount = 0; diff --git a/server/models/services/TestsService.js b/server/models/services/TestsService.js index 047509592..4d542855b 100644 --- a/server/models/services/TestsService.js +++ b/server/models/services/TestsService.js @@ -33,7 +33,10 @@ const getTests = parentRecord => { at, commands: scenario.commandIds.map(commandId => { if (isV2) { - const screenText = at?.settings[scenario.settings]?.screenText; + const screenText = scenario.settings + .split(' ') + .map(setting => at?.settings[setting]?.screenText) + .join(' and '); const commandKVs = getCommandV2(commandId); if (commandKVs.length) { // `scenario` has an identifier to the settings being displayed. diff --git a/server/resources/ats.json b/server/resources/ats.json index 21a0770e9..7bab0d84d 100644 --- a/server/resources/ats.json +++ b/server/resources/ats.json @@ -1,115 +1,133 @@ [ - { - "id": 1, - "name": "JAWS", - "key": "jaws", - "vendorId": 1, - "defaultConfigurationInstructionsHTML": "Configure JAWS with default settings. For help, read <a href="https://github.com/w3c/aria-at/wiki/Configuring-Screen-Readers-for-Testing">Configuring Screen Readers for Testing</a>.", - "assertionTokens": { - "screenReader": "JAWS", - "interactionMode": "PC cursor active", - "readingMode": "virtual cursor active", - "readingCursor": "virtual cursor" - }, - "settings": { - "virtualCursor": { - "screenText": "virtual cursor active", - "instructions": [ - "Press <kbd>Alt</kbd>+<kbd>Delete</kbd> to determine which cursor is active.", - "If the PC cursor is active, press <kbd>Escape</kbd> to activate the virtual cursor." - ] - }, - "pcCursor": { - "screenText": "PC cursor active", - "instructions": [ - "Press <kbd>Alt</kbd>+<kbd>Delete</kbd> to determine which cursor is active.", - "If the virtual cursor is active, press <kbd>Insert</kbd>+<kbd>z</kbd> to disable the virtual cursor." - ] - } - } + { + "id": 1, + "name": "JAWS", + "key": "jaws", + "vendorId": 1, + "defaultConfigurationInstructionsHTML": "Configure JAWS with default settings. For help, read <a href="https://github.com/w3c/aria-at/wiki/Configuring-Screen-Readers-for-Testing">Configuring Screen Readers for Testing</a>.", + "assertionTokens": { + "screenReader": "JAWS", + "interactionMode": "PC cursor active", + "readingMode": "virtual cursor active", + "readingCursor": "virtual cursor" }, - { - "id": 2, - "name": "NVDA", - "key": "nvda", - "vendorId": 6, - "defaultConfigurationInstructionsHTML": "Configure NVDA with default settings. For help, read <a href="https://github.com/w3c/aria-at/wiki/Configuring-Screen-Readers-for-Testing">Configuring Screen Readers for Testing</a>.", - "assertionTokens": { - "screenReader": "NVDA", - "interactionMode": "focus mode", - "readingMode": "browse mode", - "readingCursor": "browse mode caret" - }, - "settings": { - "browseMode": { - "screenText": "browse mode on", - "instructions": [ - "Press <kbd>Insert</kbd>+<kbd>Space</kbd>.", - "If NVDA made the focus mode sound, press <kbd>Insert</kbd>+<kbd>Space</kbd> again to turn browse mode back on." - ] - }, - "focusMode": { - "screenText": "focus mode on", - "instructions": [ - "Press <kbd>Insert</kbd>+<kbd>Space</kbd>.", - "If NVDA made the browse mode sound, press <kbd>Insert</kbd>+<kbd>Space</kbd> again to turn focus mode back on." - ] - } - } + "settings": { + "virtualCursor": { + "screenText": "virtual cursor active", + "instructions": [ + "Press <kbd>Alt</kbd>+<kbd>Delete</kbd> to determine which cursor is active.", + "If the PC cursor is active, press <kbd>Escape</kbd> to activate the virtual cursor." + ] + }, + "pcCursor": { + "screenText": "PC cursor active", + "instructions": [ + "Press <kbd>Alt</kbd>+<kbd>Delete</kbd> to determine which cursor is active.", + "If the virtual cursor is active, press <kbd>Insert</kbd>+<kbd>z</kbd> to disable the virtual cursor." + ] + }, + "speechRateIncrease": { + "screenText": "Speech Rate Increase", + "instructions": [ + "Ensure you are in JAWS mode. Press <kbd>Insert</kbd>+<kbd>j</kbd> if you are unsure.", + "Press <kbd>Insert</kbd>+<kbd>Ctrl</kbd>+<kbd>Page Up</kbd> to increase the speech rate." + ] + }, + "commentAnnouncementOn": { + "screenText": "Comment Announcement On", + "instructions": [ + "Ensure you are in JAWS mode. Press <kbd>Insert</kbd>+<kbd>j</kbd> if you are unsure.", + "Use the arrow keys to select 'Speech & Sounds' from the categories list.", + "Find and choose the option related to comment announcements. This might be listed under 'Speech Settings' or a similar category.", + "Look for a checkbox or toggle to enable comment announcements and check or activate it.", + "Click 'Apply' to save your changes.", + "Press <kbd>Enter</kbd> to confirm and exit the Settings Center." + ] + } + } + }, + { + "id": 2, + "name": "NVDA", + "key": "nvda", + "vendorId": 6, + "defaultConfigurationInstructionsHTML": "Configure NVDA with default settings. For help, read <a href="https://github.com/w3c/aria-at/wiki/Configuring-Screen-Readers-for-Testing">Configuring Screen Readers for Testing</a>.", + "assertionTokens": { + "screenReader": "NVDA", + "interactionMode": "focus mode", + "readingMode": "browse mode", + "readingCursor": "browse mode caret" + }, + "settings": { + "browseMode": { + "screenText": "browse mode on", + "instructions": [ + "Press <kbd>Insert</kbd>+<kbd>Space</kbd>.", + "If NVDA made the focus mode sound, press <kbd>Insert</kbd>+<kbd>Space</kbd> again to turn browse mode back on." + ] + }, + "focusMode": { + "screenText": "focus mode on", + "instructions": [ + "Press <kbd>Insert</kbd>+<kbd>Space</kbd>.", + "If NVDA made the browse mode sound, press <kbd>Insert</kbd>+<kbd>Space</kbd> again to turn focus mode back on." + ] + } + } + }, + { + "id": 3, + "name": "VoiceOver for macOS", + "key": "voiceover_macos", + "vendorId": 4, + "defaultConfigurationInstructionsHTML": "Configure VoiceOver with default settings. For help, read <a href="https://github.com/w3c/aria-at/wiki/Configuring-Screen-Readers-for-Testing">Configuring Screen Readers for Testing</a>.", + "assertionTokens": { + "screenReader": "VoiceOver", + "readingCursor": "VoiceOver cursor" }, - { - "id": 3, - "name": "VoiceOver for macOS", - "key": "voiceover_macos", - "vendorId": 4, - "defaultConfigurationInstructionsHTML": "Configure VoiceOver with default settings. For help, read <a href="https://github.com/w3c/aria-at/wiki/Configuring-Screen-Readers-for-Testing">Configuring Screen Readers for Testing</a>.", - "assertionTokens": { - "screenReader": "VoiceOver", - "readingCursor": "VoiceOver cursor" - }, - "settings": { - "quickNavOn": { - "screenText": "quick nav on", - "instructions": [ - "Simultaneously press <kbd>Left Arrow</kbd> and <kbd>Right Arrow</kbd>.", - "If VoiceOver said 'quick nav off', press <kbd>Left Arrow</kbd> and <kbd>Right Arrow</kbd> again to turn it back on." - ] - }, - "quickNavOff": { - "screenText": "quick nav off", - "instructions": [ - "Simultaneously press <kbd>Left Arrow</kbd> and <kbd>Right Arrow</kbd>.", - "If VoiceOver said 'quick nav on', press <kbd>Left Arrow</kbd> and <kbd>Right Arrow</kbd> again to turn it back off." - ] - }, - "arrowQuickKeyNavOn": { - "screenText": "arrow quick key nav on", - "instructions": [ - "Simultaneously press <kbd>Left Arrow</kbd> and <kbd>Right Arrow</kbd>.", - "If VoiceOver said 'arrow quick key nav off', press <kbd>Left Arrow</kbd> and <kbd>Right Arrow</kbd> again to turn it back on." - ] - }, - "arrowQuickKeyNavOff": { - "screenText": "arrow quick key nav off", - "instructions": [ - "Simultaneously press <kbd>Left Arrow</kbd> and <kbd>Right Arrow</kbd>.", - "If VoiceOver said 'arrow quick key nav on', press <kbd>Left Arrow</kbd> and <kbd>Right Arrow</kbd> again to turn it back off." - ] - }, - "singleQuickKeyNavOn": { - "screenText": "single quick key nav on", - "instructions": [ - "Press <kbd>Control</kbd>+<kbd>Option</kbd>+<kbd>q</kbd>.", - "If VoiceOver said 'single quick key nav off', press <kbd>Control</kbd>+<kbd>Option</kbd>+<kbd>q</kbd> again to turn it back on." - ] - }, - "singleQuickKeyNavOff": { - "screenText": "single quick key nav off", - "instructions": [ - "Press <kbd>Control</kbd>+<kbd>Option</kbd>+<kbd>q</kbd>.", - "If VoiceOver said 'single quick key nav on', press <kbd>Control</kbd>+<kbd>Option</kbd>+<kbd>q</kbd> again to turn it back off." - ] - } - } + "settings": { + "quickNavOn": { + "screenText": "quick nav on", + "instructions": [ + "Simultaneously press <kbd>Left Arrow</kbd> and <kbd>Right Arrow</kbd>.", + "If VoiceOver said 'quick nav off', press <kbd>Left Arrow</kbd> and <kbd>Right Arrow</kbd> again to turn it back on." + ] + }, + "quickNavOff": { + "screenText": "quick nav off", + "instructions": [ + "Simultaneously press <kbd>Left Arrow</kbd> and <kbd>Right Arrow</kbd>.", + "If VoiceOver said 'quick nav on', press <kbd>Left Arrow</kbd> and <kbd>Right Arrow</kbd> again to turn it back off." + ] + }, + "arrowQuickKeyNavOn": { + "screenText": "arrow quick key nav on", + "instructions": [ + "Simultaneously press <kbd>Left Arrow</kbd> and <kbd>Right Arrow</kbd>.", + "If VoiceOver said 'arrow quick key nav off', press <kbd>Left Arrow</kbd> and <kbd>Right Arrow</kbd> again to turn it back on." + ] + }, + "arrowQuickKeyNavOff": { + "screenText": "arrow quick key nav off", + "instructions": [ + "Simultaneously press <kbd>Left Arrow</kbd> and <kbd>Right Arrow</kbd>.", + "If VoiceOver said 'arrow quick key nav on', press <kbd>Left Arrow</kbd> and <kbd>Right Arrow</kbd> again to turn it back off." + ] + }, + "singleQuickKeyNavOn": { + "screenText": "single quick key nav on", + "instructions": [ + "Press <kbd>Control</kbd>+<kbd>Option</kbd>+<kbd>q</kbd>.", + "If VoiceOver said 'single quick key nav off', press <kbd>Control</kbd>+<kbd>Option</kbd>+<kbd>q</kbd> again to turn it back on." + ] + }, + "singleQuickKeyNavOff": { + "screenText": "single quick key nav off", + "instructions": [ + "Press <kbd>Control</kbd>+<kbd>Option</kbd>+<kbd>q</kbd>.", + "If VoiceOver said 'single quick key nav on', press <kbd>Control</kbd>+<kbd>Option</kbd>+<kbd>q</kbd> again to turn it back off." + ] + } } -] \ No newline at end of file + } +] diff --git a/server/scripts/import-tests/gitOperations.js b/server/scripts/import-tests/gitOperations.js index dcf947903..fd10c067c 100644 --- a/server/scripts/import-tests/gitOperations.js +++ b/server/scripts/import-tests/gitOperations.js @@ -3,7 +3,7 @@ const spawn = require('cross-spawn'); const ariaAtRepo = 'https://github.com/w3c/aria-at.git'; -const ariaAtDefaultBranch = 'master'; +const ariaAtDefaultBranch = 'fix-1002-test'; // TODO: Revert to master before merging; based on test PR https://github.com/w3c/aria-at/pull/1126 /** * Executes a git command and returns its output.