From 71e3992e09497fd58802fbe731df48a25c7dc2c9 Mon Sep 17 00:00:00 2001 From: cmorten Date: Sat, 15 Aug 2026 09:40:04 +0100 Subject: [PATCH 1/2] fix: move away from move to top due to flakiness now that auto-navigation should be disabled --- src/screenReaderTest.ts | 19 ++----------------- src/voiceOverTest.ts | 19 ++----------------- 2 files changed, 4 insertions(+), 34 deletions(-) diff --git a/src/screenReaderTest.ts b/src/screenReaderTest.ts index c73f023..fd593a2 100644 --- a/src/screenReaderTest.ts +++ b/src/screenReaderTest.ts @@ -264,7 +264,7 @@ export const screenReaderTest = test.extend<{ // Ensure application is brought to front and focused. await macOSActivate(applicationName); - // Cancel auto navigation. + // Cancel automatic behaviours/previous commands. await screenReaderPlaywright.perform( { keyCode: MacOSKeyCodes.Control }, { capture: false }, @@ -326,28 +326,13 @@ export const screenReaderTest = test.extend<{ await screenReaderPlaywright.interact({ capture: false }); await delay(100); - // Navigate to the beginning of the web content. - await screenReaderPlaywright.perform( - voiceOverKeyCodeCommands.moveToBeginningOfText, - { capture: false }, - ); - await delay(100); - - // Cancel auto navigation + // Cancel automatic behaviours/previous commands. await screenReaderPlaywright.perform( { keyCode: MacOSKeyCodes.Control }, { capture: false }, ); await delay(100); - // Navigate to the Guidepup marker element at beginning of the web - // content. - await screenReaderPlaywright.perform( - voiceOverKeyCodeCommands.moveToBeginningOfText, - { capture: false }, - ); - await delay(100); - // Navigate to the first element of the page using the provided // capture settings. await screenReaderPlaywright.next({ capture }); diff --git a/src/voiceOverTest.ts b/src/voiceOverTest.ts index cace6d2..927bbab 100644 --- a/src/voiceOverTest.ts +++ b/src/voiceOverTest.ts @@ -99,7 +99,7 @@ export const voiceOverTest = test.extend<{ // Ensure application is brought to front and focused. await macOSActivate(applicationName); - // Cancel auto navigation. + // Cancel automatic behaviours/previous commands. await voiceOverPlaywright.perform( { keyCode: MacOSKeyCodes.Control }, { capture: false }, @@ -161,28 +161,13 @@ export const voiceOverTest = test.extend<{ await voiceOverPlaywright.interact({ capture: false }); await delay(100); - // Navigate to the beginning of the web content. - await voiceOverPlaywright.perform( - voiceOverPlaywright.keyboardCommands.moveToBeginningOfText, - { capture: false }, - ); - await delay(100); - - // Cancel auto navigation + // Cancel automatic behaviours/previous commands. await voiceOverPlaywright.perform( { keyCode: MacOSKeyCodes.Control }, { capture: false }, ); await delay(100); - // Navigate to the Guidepup marker element at beginning of the web - // content. - await voiceOverPlaywright.perform( - voiceOverPlaywright.keyboardCommands.moveToBeginningOfText, - { capture: false }, - ); - await delay(100); - // Navigate to the first element of the page using the provided // capture settings. await voiceOverPlaywright.next({ capture }); From 0dd7ff187a9541cdba2f4a79a9c96f54b17c102d Mon Sep 17 00:00:00 2001 From: cmorten Date: Sun, 16 Aug 2026 08:52:59 +0100 Subject: [PATCH 2/2] fix: don't cancel on interaction to ensure VO bootstraps on an interactive element (meaning will later track focus) --- src/screenReaderTest.ts | 7 ------- src/voiceOverTest.ts | 7 ------- 2 files changed, 14 deletions(-) diff --git a/src/screenReaderTest.ts b/src/screenReaderTest.ts index fd593a2..2c24abd 100644 --- a/src/screenReaderTest.ts +++ b/src/screenReaderTest.ts @@ -326,13 +326,6 @@ export const screenReaderTest = test.extend<{ await screenReaderPlaywright.interact({ capture: false }); await delay(100); - // Cancel automatic behaviours/previous commands. - await screenReaderPlaywright.perform( - { keyCode: MacOSKeyCodes.Control }, - { capture: false }, - ); - await delay(100); - // Navigate to the first element of the page using the provided // capture settings. await screenReaderPlaywright.next({ capture }); diff --git a/src/voiceOverTest.ts b/src/voiceOverTest.ts index 927bbab..727ba95 100644 --- a/src/voiceOverTest.ts +++ b/src/voiceOverTest.ts @@ -161,13 +161,6 @@ export const voiceOverTest = test.extend<{ await voiceOverPlaywright.interact({ capture: false }); await delay(100); - // Cancel automatic behaviours/previous commands. - await voiceOverPlaywright.perform( - { keyCode: MacOSKeyCodes.Control }, - { capture: false }, - ); - await delay(100); - // Navigate to the first element of the page using the provided // capture settings. await voiceOverPlaywright.next({ capture });