diff --git a/tests/alert/data/talkback_android-commands.csv b/tests/alert/data/talkback_android-commands.csv new file mode 100644 index 000000000..d19f57c3b --- /dev/null +++ b/tests/alert/data/talkback_android-commands.csv @@ -0,0 +1,4 @@ +testId,command,settings,assertionExceptions,presentationNumber +triggerAlert,swipeRight,exploreByTouchOn,,3.0 +triggerAlert,tripleTap,,,3.1 +triggerAlert,swipeLeft twoFingerDoubleTap,exploreBySwipingOff,,3.2 diff --git a/tests/commands.json b/tests/commands.json index 2630abf42..1d8ae2c8d 100644 --- a/tests/commands.json +++ b/tests/commands.json @@ -116,7 +116,23 @@ "numpad8": "Numpad 8", "numpad9": "Numpad 9", "numpad0": "Numpad 0", - "numpadPeriod": "Numpad Period" + "numpadPeriod": "Numpad Period", + "swipeRight": "Swipe Right", + "swipeLeft": "Swipe Left", + "swipeUp": "Swipe Up", + "swipeDown": "Swipe Down", + "doubleTap": "Double Tap", + "tripleTap": "Triple Tap", + "longPress": "Long Press", + "twoFingerSwipeRight": "Two Finger Swipe Right", + "twoFingerSwipeLeft": "Two Finger Swipe Left", + "twoFingerSwipeUp": "Two Finger Swipe Up", + "twoFingerSwipeDown": "Two Finger Swipe Down", + "twoFingerDoubleTap": "Two Finger Double Tap", + "threeFingerSwipeRight": "Three Finger Swipe Right", + "threeFingerSwipeLeft": "Three Finger Swipe Left", + "threeFingerSwipeUp": "Three Finger Swipe Up", + "threeFingerSwipeDown": "Three Finger Swipe Down" }, "keyAliases": { "delete": "del", diff --git a/tests/resources/aria-at-test-io-format.mjs b/tests/resources/aria-at-test-io-format.mjs index 7eda26158..9fae0843d 100644 --- a/tests/resources/aria-at-test-io-format.mjs +++ b/tests/resources/aria-at-test-io-format.mjs @@ -81,8 +81,8 @@ class KeysInput { const atKey = configInput.at().key; invariant( - ['jaws', 'nvda', 'voiceover_macos'].includes(atKey), - '%s is one of "jaws", "nvda", or "voiceover_macos"', + ['jaws', 'nvda', 'talkback_android', 'voiceover_macos'].includes(atKey), + '%s is not one of "jaws", "nvda", "talkback_android" or "voiceover_macos"', atKey ); diff --git a/tests/resources/aria-at-test-window.mjs b/tests/resources/aria-at-test-window.mjs index c60b8c828..3846cc4a1 100644 --- a/tests/resources/aria-at-test-window.mjs +++ b/tests/resources/aria-at-test-window.mjs @@ -16,6 +16,7 @@ export class TestWindow { this.hooks = { windowOpened: () => {}, windowClosed: () => {}, + windowPrepared: () => {}, ...hooks, }; } @@ -53,6 +54,9 @@ export class TestWindow { return; } + // Call the windowPrepared hook if needed + this.hooks.windowPrepared(); + // If the window is closed, re-enable open popup button this.window.onunload = () => { window.setTimeout(() => this.prepare(), 100); @@ -70,4 +74,5 @@ export class TestWindow { * @typedef TestWindowHooks * @property {() => void} windowOpened * @property {() => void} windowClosed + * @property {() => void} windowPrepared */ diff --git a/tests/support.json b/tests/support.json index 9ef410c7e..e608ad662 100644 --- a/tests/support.json +++ b/tests/support.json @@ -106,11 +106,55 @@ ] } } + }, + { + "name": "TalkBack for Android", + "key": "talkback_android", + "defaultConfigurationInstructionsHTML": "Configure TalkBack 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": "TalkBack", + "readingCursor": "TalkBack cursor" + }, + "settings": { + "exploreByTouchOn": { + "screenText": "explore by touch on", + "instructions": [ + "Press <kbd>Volume Up</kbd> + <kbd>Volume Down</kbd> to open TalkBack menu.", + "Navigate to Settings > Explore by touch.", + "If explore by touch is off, turn it on." + ] + }, + "exploreByTouchOff": { + "screenText": "explore by touch off", + "instructions": [ + "Press <kbd>Volume Up</kbd> + <kbd>Volume Down</kbd> to open TalkBack menu.", + "Navigate to Settings > Explore by touch.", + "If explore by touch is on, turn it off." + ] + }, + "exploreBySwipingOn": { + "screenText": "explore by swiping on", + "instructions": [ + "Press <kbd>Volume Up</kbd> + <kbd>Volume Down</kbd> to open TalkBack menu.", + "Navigate to Settings > Explore by touch.", + "If explore by touch is on, turn it off to enable explore by swiping." + ] + }, + "exploreBySwipingOff": { + "screenText": "explore by swiping off", + "instructions": [ + "Press <kbd>Volume Up</kbd> + <kbd>Volume Down</kbd> to open TalkBack menu.", + "Navigate to Settings > Explore by touch.", + "If explore by touch is off, turn it on to disable explore by swiping." + ] + } + } } ], "applies_to": { "Desktop Screen Readers": ["VoiceOver for macOS", "NVDA", "JAWS"], - "Screen Readers": ["VoiceOver for macOS", "NVDA", "JAWS"] + "Mobile Screen Readers": ["TalkBack for Android"], + "Screen Readers": ["VoiceOver for macOS", "NVDA", "JAWS", "TalkBack for Android"] }, "testPlanStrings": { "ariaSpecsPreface": "Tested ARIA features:",