From 86354609606ee7b9180f660e3420973aadda8795 Mon Sep 17 00:00:00 2001 From: brunoschadeck Date: Tue, 6 Aug 2024 14:11:00 +0200 Subject: [PATCH 01/23] docs: adds install commands to readme --- showcases/screen-reader/README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/showcases/screen-reader/README.md b/showcases/screen-reader/README.md index a642cc52a6a..692488feec0 100644 --- a/showcases/screen-reader/README.md +++ b/showcases/screen-reader/README.md @@ -1,14 +1,23 @@ # Screen Automated Reader (ScAR 🦁🔥💀) +## Install + +```shell +npx playwright install +npx @guidepup/setup +``` + +## Start + Start a test with these commands: -## MacOS +### MacOS ```shell npm run test:screen-reader:macos --workspace=react-showcase -- --ui ``` -## Windows +### Windows ```shell npm run test:screen-reader:windows --workspace=react-showcase -- --ui From 319cab3c8335f3ea52271a5184d97073e1bd01e8 Mon Sep 17 00:00:00 2001 From: brunoschadeck Date: Tue, 6 Aug 2024 14:12:31 +0200 Subject: [PATCH 02/23] feat: adds empty guidepup test for accordion --- .../screen-reader/tests/accordion.spec.ts | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 showcases/screen-reader/tests/accordion.spec.ts diff --git a/showcases/screen-reader/tests/accordion.spec.ts b/showcases/screen-reader/tests/accordion.spec.ts new file mode 100644 index 00000000000..4bee4695b20 --- /dev/null +++ b/showcases/screen-reader/tests/accordion.spec.ts @@ -0,0 +1,22 @@ +import { getTest, testDefault } from '../default'; + +const test = getTest(); + +test.describe('DBAccordion', () => { + testDefault({ + test, + title: 'should ... (next)', + url: './#/04/accordion?page=behaviour', + async testFn(voiceOver, nvda) { + if (nvda) { + await nvda?.next(); + } + + const screenReader = voiceOver ?? nvda; + await screenReader?.clearSpokenPhraseLog(); + await screenReader?.previous(); + await screenReader?.next(); + await screenReader?.next(); + } + }); +}); From 3574daa91efec2837ef04236f704edf349dac998 Mon Sep 17 00:00:00 2001 From: brunoschadeck Date: Tue, 6 Aug 2024 16:53:24 +0200 Subject: [PATCH 03/23] docs: adds installation guide for playwright and guidepup --- showcases/screen-reader/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/showcases/screen-reader/README.md b/showcases/screen-reader/README.md index 692488feec0..9b68f653443 100644 --- a/showcases/screen-reader/README.md +++ b/showcases/screen-reader/README.md @@ -7,6 +7,8 @@ npx playwright install npx @guidepup/setup ``` +If errors occur after the automatic setup of guidepup (e.g. no connection to voicover), the setup must be executed manually. [See instructions](https://www.guidepup.dev/docs/guides/manual-voiceover-setup). + ## Start Start a test with these commands: From d5f71bcfcee2556bc44cf1520dfeb058dabe0390 Mon Sep 17 00:00:00 2001 From: brunoschadeck Date: Tue, 6 Aug 2024 16:54:29 +0200 Subject: [PATCH 04/23] test: adds ignore line --- showcases/screen-reader/default.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/showcases/screen-reader/default.ts b/showcases/screen-reader/default.ts index 5e4627cc193..758c72ca4fb 100644 --- a/showcases/screen-reader/default.ts +++ b/showcases/screen-reader/default.ts @@ -41,7 +41,8 @@ const cleanSpeakInstructions = (phraseLog: string[]): string[] => sPhrase.includes('To click') || sPhrase.includes('To select') || sPhrase.includes('To interact') || - sPhrase.includes('Press Control') + sPhrase.includes('Press Control') || + sPhrase.includes('To expand') ) ) .join('. ') From 5368d69f761fe63f1d0b5be5174113e856e5dc52 Mon Sep 17 00:00:00 2001 From: brunoschadeck Date: Tue, 6 Aug 2024 16:55:10 +0200 Subject: [PATCH 05/23] test: adds guidepup tests for accordion --- ...-should-then-close-automatically-next-.txt | 1 + .../macos/webkit/DBAccordion-should-next-.txt | 1 + .../screen-reader/tests/accordion.spec.ts | 35 +++++++++++++++++-- 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt create mode 100644 showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-should-next-.txt diff --git a/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt b/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt new file mode 100644 index 00000000000..b4202c707ce --- /dev/null +++ b/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt @@ -0,0 +1 @@ +["Item 1 collapsed summary","Item 1 chevron_down expanded summary","Content 1","Item 2 collapsed summary","Item 2 chevron_down expanded summary","Content 2","Item 2 chevron_down expanded summary","Item 1 chevron_down collapsed summary"] diff --git a/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-should-next-.txt b/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-should-next-.txt new file mode 100644 index 00000000000..ebc4b268df1 --- /dev/null +++ b/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-should-next-.txt @@ -0,0 +1 @@ +["Item 1 collapsed summary","Item 1 chevron_down expanded summary","Content 1","Item 2 collapsed summary","Item 2 chevron_down expanded summary","Content 2","Item 2 chevron_down expanded summary","Content 1","Item 1 chevron_down expanded summary"] diff --git a/showcases/screen-reader/tests/accordion.spec.ts b/showcases/screen-reader/tests/accordion.spec.ts index 4bee4695b20..ec4a5e89bfd 100644 --- a/showcases/screen-reader/tests/accordion.spec.ts +++ b/showcases/screen-reader/tests/accordion.spec.ts @@ -5,7 +5,7 @@ const test = getTest(); test.describe('DBAccordion', () => { testDefault({ test, - title: 'should ... (next)', + title: 'should open two items while both remain unfolded (next)', url: './#/04/accordion?page=behaviour', async testFn(voiceOver, nvda) { if (nvda) { @@ -14,9 +14,40 @@ test.describe('DBAccordion', () => { const screenReader = voiceOver ?? nvda; await screenReader?.clearSpokenPhraseLog(); - await screenReader?.previous(); + await screenReader?.next(); // Focus: "item 1" + await screenReader?.act(); // Interact: "item 1" + await screenReader?.next(); // Focus: "content 1" + await screenReader?.next(); // Focus: "item 2" + await screenReader?.act(); // Interact: "item 2" + await screenReader?.next(); // Focus: "content 2" + await screenReader?.previous(); // Focus: "item 2" + await screenReader?.previous(); // Focus: "content 1" + await screenReader?.previous(); // Focus: "item 1" + } + }); + testDefault({ + test, + title: 'one item should open, then the next, whereby the first should then close automatically (next)', + url: './#/04/accordion?page=behaviour', + async testFn(voiceOver, nvda) { + if (nvda) { + await nvda?.next(); + } + + const screenReader = voiceOver ?? nvda; await screenReader?.next(); await screenReader?.next(); + await screenReader?.next(); + await screenReader?.next(); + await screenReader?.clearSpokenPhraseLog(); + await screenReader?.next(); // Focus example "Single","Item 1" + await screenReader?.act(); // Interact: "item 1" + await screenReader?.next(); // Focus: "content 1" + await screenReader?.next(); // Focus: "item 2" + await screenReader?.act(); // Interact: "item 2" + await screenReader?.next(); // Focus: "content 2" + await screenReader?.previous(); // Focus: "item 2" + await screenReader?.previous(); // Focus: "item 1" } }); }); From 7a8724b25a7ee6a8fe73d15a270d7b4a97b9c182 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke Date: Wed, 7 Aug 2024 08:21:16 +0200 Subject: [PATCH 06/23] feat: added missing snapshot --- ...on-should-open-two-items-while-both-remain-unfolded-next-.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt diff --git a/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt b/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt new file mode 100644 index 00000000000..1c4e5d35da1 --- /dev/null +++ b/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt @@ -0,0 +1 @@ +["Item 1 collapsed summary","Item 1 chevron_down expanded summary","Content 1","Item 2 collapsed summary","Item 2 chevron_down expanded summary","Content 2","Item 2 chevron_down expanded summary","Content 1","Item 1 chevron_down expanded summary"] \ No newline at end of file From 6e4311ebcaca343bc85a3a88448e2d0602bcaf30 Mon Sep 17 00:00:00 2001 From: brunoschadeck Date: Wed, 7 Aug 2024 13:20:18 +0200 Subject: [PATCH 07/23] fix: removes empty last line --- ...nex-10d9e-he-first-should-then-close-automatically-next-.txt | 2 +- .../__snapshots__/macos/webkit/DBAccordion-should-next-.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-should-next-.txt diff --git a/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt b/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt index b4202c707ce..792ea13298f 100644 --- a/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt +++ b/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt @@ -1 +1 @@ -["Item 1 collapsed summary","Item 1 chevron_down expanded summary","Content 1","Item 2 collapsed summary","Item 2 chevron_down expanded summary","Content 2","Item 2 chevron_down expanded summary","Item 1 chevron_down collapsed summary"] +["Item 1 collapsed summary","Item 1 chevron_down expanded summary","Content 1","Item 2 collapsed summary","Item 2 chevron_down expanded summary","Content 2","Item 2 chevron_down expanded summary","Item 1 chevron_down collapsed summary"] \ No newline at end of file diff --git a/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-should-next-.txt b/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-should-next-.txt deleted file mode 100644 index ebc4b268df1..00000000000 --- a/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-should-next-.txt +++ /dev/null @@ -1 +0,0 @@ -["Item 1 collapsed summary","Item 1 chevron_down expanded summary","Content 1","Item 2 collapsed summary","Item 2 chevron_down expanded summary","Content 2","Item 2 chevron_down expanded summary","Content 1","Item 1 chevron_down expanded summary"] From 390a43e6a4bc537922efd5f1ab99d33a36bf584f Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Thu, 8 Aug 2024 06:57:10 +0200 Subject: [PATCH 08/23] Update README.md --- showcases/screen-reader/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/showcases/screen-reader/README.md b/showcases/screen-reader/README.md index 9b68f653443..2058b783b6f 100644 --- a/showcases/screen-reader/README.md +++ b/showcases/screen-reader/README.md @@ -7,7 +7,7 @@ npx playwright install npx @guidepup/setup ``` -If errors occur after the automatic setup of guidepup (e.g. no connection to voicover), the setup must be executed manually. [See instructions](https://www.guidepup.dev/docs/guides/manual-voiceover-setup). +If errors occur after the automatic setup of Guidepup (e.g. no connection to Voiceover), the setup must be executed manually. See [instructions](https://www.guidepup.dev/docs/guides/manual-voiceover-setup). ## Start From 246000f5e91ef7a8c912eade33b3c0c8fe903a7a Mon Sep 17 00:00:00 2001 From: Nicolas Merget Date: Thu, 8 Aug 2024 08:09:15 +0200 Subject: [PATCH 09/23] chore: update snapshots for windows --- ...d9e-he-first-should-then-close-automatically-next-.txt | 1 + ...ld-open-two-items-while-both-remain-unfolded-next-.txt | 1 + showcases/screen-reader/default.ts | 4 +++- showcases/screen-reader/tests/accordion.spec.ts | 8 -------- 4 files changed, 5 insertions(+), 9 deletions(-) create mode 100644 showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt create mode 100644 showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt diff --git a/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt b/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt new file mode 100644 index 00000000000..0f721b98a29 --- /dev/null +++ b/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt @@ -0,0 +1 @@ +["button, collapsed, Item 1","expanded","Content 1","button, collapsed, Item 2","expanded","Content 2","button, expanded, Item 2","button, collapsed, Item 1"] diff --git a/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt b/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt new file mode 100644 index 00000000000..c698d574c06 --- /dev/null +++ b/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt @@ -0,0 +1 @@ +["button, collapsed, Item 1","expanded","Content 1","button, collapsed, Item 2","expanded. expanded","Content 2","button, expanded, Item 2","Content 1","button, expanded, Item 1"] diff --git a/showcases/screen-reader/default.ts b/showcases/screen-reader/default.ts index 758c72ca4fb..b5dcbeca61a 100644 --- a/showcases/screen-reader/default.ts +++ b/showcases/screen-reader/default.ts @@ -25,7 +25,9 @@ const translations: Record = { 'has auto complete': ['mit Auto Vervollständigung'], unknown: ['Unbekannt'], dialog: ['Dialogfeld'], - document: ['Dokument'] + document: ['Dokument'], + collapsed: ['reduziert'], + expanded: ['erweitert'] }; const cleanSpeakInstructions = (phraseLog: string[]): string[] => diff --git a/showcases/screen-reader/tests/accordion.spec.ts b/showcases/screen-reader/tests/accordion.spec.ts index ec4a5e89bfd..d52fc71714f 100644 --- a/showcases/screen-reader/tests/accordion.spec.ts +++ b/showcases/screen-reader/tests/accordion.spec.ts @@ -8,10 +8,6 @@ test.describe('DBAccordion', () => { title: 'should open two items while both remain unfolded (next)', url: './#/04/accordion?page=behaviour', async testFn(voiceOver, nvda) { - if (nvda) { - await nvda?.next(); - } - const screenReader = voiceOver ?? nvda; await screenReader?.clearSpokenPhraseLog(); await screenReader?.next(); // Focus: "item 1" @@ -30,10 +26,6 @@ test.describe('DBAccordion', () => { title: 'one item should open, then the next, whereby the first should then close automatically (next)', url: './#/04/accordion?page=behaviour', async testFn(voiceOver, nvda) { - if (nvda) { - await nvda?.next(); - } - const screenReader = voiceOver ?? nvda; await screenReader?.next(); await screenReader?.next(); From 57ea7377d86b5c279e407346812dfe4430bc23c6 Mon Sep 17 00:00:00 2001 From: Nicolas Merget Date: Thu, 8 Aug 2024 08:49:37 +0200 Subject: [PATCH 10/23] fix: issue with sr accordion test --- .../screen-reader/tests/accordion.spec.ts | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/showcases/screen-reader/tests/accordion.spec.ts b/showcases/screen-reader/tests/accordion.spec.ts index d52fc71714f..7cf3f89bf8f 100644 --- a/showcases/screen-reader/tests/accordion.spec.ts +++ b/showcases/screen-reader/tests/accordion.spec.ts @@ -1,7 +1,27 @@ -import { getTest, testDefault } from '../default'; +import type { NVDAPlaywright, VoiceOverPlaywright } from '@guidepup/playwright'; +import { generateSnapshot, getTest, testDefault } from '../default'; const test = getTest(); +const postTestFn = async ( + voiceOver?: VoiceOverPlaywright, + nvda?: NVDAPlaywright, + retry?: number +) => { + if (nvda) { + /* + * There is an issue with nvda duplicating expanded sometimes + */ + await generateSnapshot(nvda, retry, (phraseLog) => + phraseLog.map((log) => + log.replace('expanded. expanded', 'expanded') + ) + ); + } else if (voiceOver) { + await generateSnapshot(voiceOver, retry); + } +}; + test.describe('DBAccordion', () => { testDefault({ test, @@ -19,7 +39,8 @@ test.describe('DBAccordion', () => { await screenReader?.previous(); // Focus: "item 2" await screenReader?.previous(); // Focus: "content 1" await screenReader?.previous(); // Focus: "item 1" - } + }, + postTestFn }); testDefault({ test, @@ -40,6 +61,7 @@ test.describe('DBAccordion', () => { await screenReader?.next(); // Focus: "content 2" await screenReader?.previous(); // Focus: "item 2" await screenReader?.previous(); // Focus: "item 1" - } + }, + postTestFn }); }); From 0ffa2fb26beb020c8f175b1d60bc263cd185df79 Mon Sep 17 00:00:00 2001 From: Nicolas Merget Date: Thu, 8 Aug 2024 09:44:14 +0200 Subject: [PATCH 11/23] chore: remove line ending --- ...nex-10d9e-he-first-should-then-close-automatically-next-.txt | 2 +- ...n-should-open-two-items-while-both-remain-unfolded-next-.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt b/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt index 0f721b98a29..a11ce3567ca 100644 --- a/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt +++ b/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt @@ -1 +1 @@ -["button, collapsed, Item 1","expanded","Content 1","button, collapsed, Item 2","expanded","Content 2","button, expanded, Item 2","button, collapsed, Item 1"] +["button, collapsed, Item 1","expanded","Content 1","button, collapsed, Item 2","expanded","Content 2","button, expanded, Item 2","button, collapsed, Item 1"] \ No newline at end of file diff --git a/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt b/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt index c698d574c06..812747da93d 100644 --- a/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt +++ b/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt @@ -1 +1 @@ -["button, collapsed, Item 1","expanded","Content 1","button, collapsed, Item 2","expanded. expanded","Content 2","button, expanded, Item 2","Content 1","button, expanded, Item 1"] +["button, collapsed, Item 1","expanded","Content 1","button, collapsed, Item 2","expanded. expanded","Content 2","button, expanded, Item 2","Content 1","button, expanded, Item 1"] \ No newline at end of file From d19f412e67e047e0b10ce738ee9df4b244f3700c Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Fri, 9 Aug 2024 14:39:36 +0200 Subject: [PATCH 12/23] Update DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt --- ...n-should-open-two-items-while-both-remain-unfolded-next-.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt b/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt index 812747da93d..ec3891249ff 100644 --- a/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt +++ b/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt @@ -1 +1 @@ -["button, collapsed, Item 1","expanded","Content 1","button, collapsed, Item 2","expanded. expanded","Content 2","button, expanded, Item 2","Content 1","button, expanded, Item 1"] \ No newline at end of file +["button, collapsed, Item 1","expanded","Content 1","button, collapsed, Item 2","expanded","Content 2","button, expanded, Item 2","Content 1","button, expanded, Item 1"] From 0b1d7368cef6ad00aad0452cd7fd7c7d4f0bb02b Mon Sep 17 00:00:00 2001 From: Maximilian Franzke Date: Mon, 12 Aug 2024 12:44:10 +0200 Subject: [PATCH 13/23] chore: prettyfication --- showcases/screen-reader/default.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/showcases/screen-reader/default.ts b/showcases/screen-reader/default.ts index b1f18e76922..1ff9059505c 100644 --- a/showcases/screen-reader/default.ts +++ b/showcases/screen-reader/default.ts @@ -38,7 +38,7 @@ const standardPhrases = [ 'To select', 'To interact', 'Press Control', - 'To expand' + 'To expand' ]; const cleanSpeakInstructions = (phraseLog: string[]): string[] => From 032bb28401762196616f53a00c4d1d3bd131b1a4 Mon Sep 17 00:00:00 2001 From: brunoschadeck Date: Mon, 12 Aug 2024 16:59:59 +0200 Subject: [PATCH 14/23] test: adds title to test, removes obsolete screenshot --- ...emain-unfolded-next-.txt => DBAccordion-multiple-1.txt} | 0 ...se-automatically-next-.txt => DBAccordion-single-1.txt} | 0 showcases/screen-reader/tests/accordion.spec.ts | 7 +++++-- 3 files changed, 5 insertions(+), 2 deletions(-) rename showcases/screen-reader/__snapshots__/macos/webkit/{DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt => DBAccordion-multiple-1.txt} (100%) rename showcases/screen-reader/__snapshots__/macos/webkit/{DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt => DBAccordion-single-1.txt} (100%) diff --git a/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt b/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-multiple-1.txt similarity index 100% rename from showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt rename to showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-multiple-1.txt diff --git a/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt b/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-single-1.txt similarity index 100% rename from showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt rename to showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-single-1.txt diff --git a/showcases/screen-reader/tests/accordion.spec.ts b/showcases/screen-reader/tests/accordion.spec.ts index 7cf3f89bf8f..f29b87bc329 100644 --- a/showcases/screen-reader/tests/accordion.spec.ts +++ b/showcases/screen-reader/tests/accordion.spec.ts @@ -25,7 +25,8 @@ const postTestFn = async ( test.describe('DBAccordion', () => { testDefault({ test, - title: 'should open two items while both remain unfolded (next)', + title: 'multiple', + description: 'should open two items while both remain unfolded (next)', url: './#/04/accordion?page=behaviour', async testFn(voiceOver, nvda) { const screenReader = voiceOver ?? nvda; @@ -44,7 +45,9 @@ test.describe('DBAccordion', () => { }); testDefault({ test, - title: 'one item should open, then the next, whereby the first should then close automatically (next)', + title: 'single', + description: + 'one item should open, then the next, whereby the first should then close automatically (next)', url: './#/04/accordion?page=behaviour', async testFn(voiceOver, nvda) { const screenReader = voiceOver ?? nvda; From cf879f14ffa0a27b57432be23eacbd0280e94de2 Mon Sep 17 00:00:00 2001 From: brunoschadeck Date: Tue, 13 Aug 2024 11:52:59 +0200 Subject: [PATCH 15/23] test: simplifies guidepup test for accordion --- .../macos/webkit/DBAccordion-default-1.txt | 1 + .../macos/webkit/DBAccordion-multiple-1.txt | 1 - .../macos/webkit/DBAccordion-single-1.txt | 1 - ...-should-then-close-automatically-next-.txt | 1 - ...items-while-both-remain-unfolded-next-.txt | 1 - .../screen-reader/tests/accordion.spec.ts | 34 ++----------------- 6 files changed, 4 insertions(+), 35 deletions(-) create mode 100644 showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-default-1.txt delete mode 100644 showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-multiple-1.txt delete mode 100644 showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-single-1.txt delete mode 100644 showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt delete mode 100644 showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt diff --git a/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-default-1.txt b/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-default-1.txt new file mode 100644 index 00000000000..1b047509165 --- /dev/null +++ b/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-default-1.txt @@ -0,0 +1 @@ +["Item 1 collapsed summary","Item 1 chevron_down expanded summary","Content 1","Item 2 collapsed summary","Item 3 collapsed summary"] \ No newline at end of file diff --git a/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-multiple-1.txt b/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-multiple-1.txt deleted file mode 100644 index 1c4e5d35da1..00000000000 --- a/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-multiple-1.txt +++ /dev/null @@ -1 +0,0 @@ -["Item 1 collapsed summary","Item 1 chevron_down expanded summary","Content 1","Item 2 collapsed summary","Item 2 chevron_down expanded summary","Content 2","Item 2 chevron_down expanded summary","Content 1","Item 1 chevron_down expanded summary"] \ No newline at end of file diff --git a/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-single-1.txt b/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-single-1.txt deleted file mode 100644 index 792ea13298f..00000000000 --- a/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-single-1.txt +++ /dev/null @@ -1 +0,0 @@ -["Item 1 collapsed summary","Item 1 chevron_down expanded summary","Content 1","Item 2 collapsed summary","Item 2 chevron_down expanded summary","Content 2","Item 2 chevron_down expanded summary","Item 1 chevron_down collapsed summary"] \ No newline at end of file diff --git a/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt b/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt deleted file mode 100644 index a11ce3567ca..00000000000 --- a/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-one-item-should-open-then-the-nex-10d9e-he-first-should-then-close-automatically-next-.txt +++ /dev/null @@ -1 +0,0 @@ -["button, collapsed, Item 1","expanded","Content 1","button, collapsed, Item 2","expanded","Content 2","button, expanded, Item 2","button, collapsed, Item 1"] \ No newline at end of file diff --git a/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt b/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt deleted file mode 100644 index ec3891249ff..00000000000 --- a/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-should-open-two-items-while-both-remain-unfolded-next-.txt +++ /dev/null @@ -1 +0,0 @@ -["button, collapsed, Item 1","expanded","Content 1","button, collapsed, Item 2","expanded","Content 2","button, expanded, Item 2","Content 1","button, expanded, Item 1"] diff --git a/showcases/screen-reader/tests/accordion.spec.ts b/showcases/screen-reader/tests/accordion.spec.ts index f29b87bc329..b71cb63b956 100644 --- a/showcases/screen-reader/tests/accordion.spec.ts +++ b/showcases/screen-reader/tests/accordion.spec.ts @@ -25,8 +25,8 @@ const postTestFn = async ( test.describe('DBAccordion', () => { testDefault({ test, - title: 'multiple', - description: 'should open two items while both remain unfolded (next)', + title: 'default', + description: 'should open first item (next)', url: './#/04/accordion?page=behaviour', async testFn(voiceOver, nvda) { const screenReader = voiceOver ?? nvda; @@ -35,35 +35,7 @@ test.describe('DBAccordion', () => { await screenReader?.act(); // Interact: "item 1" await screenReader?.next(); // Focus: "content 1" await screenReader?.next(); // Focus: "item 2" - await screenReader?.act(); // Interact: "item 2" - await screenReader?.next(); // Focus: "content 2" - await screenReader?.previous(); // Focus: "item 2" - await screenReader?.previous(); // Focus: "content 1" - await screenReader?.previous(); // Focus: "item 1" - }, - postTestFn - }); - testDefault({ - test, - title: 'single', - description: - 'one item should open, then the next, whereby the first should then close automatically (next)', - url: './#/04/accordion?page=behaviour', - async testFn(voiceOver, nvda) { - const screenReader = voiceOver ?? nvda; - await screenReader?.next(); - await screenReader?.next(); - await screenReader?.next(); - await screenReader?.next(); - await screenReader?.clearSpokenPhraseLog(); - await screenReader?.next(); // Focus example "Single","Item 1" - await screenReader?.act(); // Interact: "item 1" - await screenReader?.next(); // Focus: "content 1" - await screenReader?.next(); // Focus: "item 2" - await screenReader?.act(); // Interact: "item 2" - await screenReader?.next(); // Focus: "content 2" - await screenReader?.previous(); // Focus: "item 2" - await screenReader?.previous(); // Focus: "item 1" + await screenReader?.next(); // Focus: "item 3" }, postTestFn }); From 78468f5b615c34bab68539e5c9a59870d59058d5 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke Date: Wed, 14 Aug 2024 07:33:35 +0200 Subject: [PATCH 16/23] feat: added missing snapshot --- .../__snapshots__/windows/chromium/DBAccordion-default-1.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-default-1.txt diff --git a/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-default-1.txt b/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-default-1.txt new file mode 100644 index 00000000000..42eb5ff038e --- /dev/null +++ b/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-default-1.txt @@ -0,0 +1 @@ +["button, collapsed, Item 1","expanded","Content 1","button, collapsed, Item 2","button, collapsed, Item 3"] \ No newline at end of file From ba90f9ab6d2022d47a2912b7962c2bf3d60662ca Mon Sep 17 00:00:00 2001 From: brunoschadeck Date: Thu, 22 Aug 2024 16:36:32 +0200 Subject: [PATCH 17/23] chore: merged with main --- showcases/screen-reader/translations.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/showcases/screen-reader/translations.ts b/showcases/screen-reader/translations.ts index 97b264d6299..a044b101dc9 100644 --- a/showcases/screen-reader/translations.ts +++ b/showcases/screen-reader/translations.ts @@ -16,5 +16,7 @@ export const translations: Record = { unknown: ['Unbekannt'], dialog: ['Dialogfeld'], document: ['Dokument'], - unavailable: ['nicht verfügbar'] + unavailable: ['nicht verfügbar'], + collapsed: ['reduziert'], + expanded: ['erweitert'] }; From 6f9ade891d4754eaea15c8b31abccc520812c6b5 Mon Sep 17 00:00:00 2001 From: brunoschadeck Date: Thu, 22 Aug 2024 16:52:02 +0200 Subject: [PATCH 18/23] test: improves guidepup accordion test --- showcases/screen-reader/tests/accordion.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/showcases/screen-reader/tests/accordion.spec.ts b/showcases/screen-reader/tests/accordion.spec.ts index b71cb63b956..31ee8fa6051 100644 --- a/showcases/screen-reader/tests/accordion.spec.ts +++ b/showcases/screen-reader/tests/accordion.spec.ts @@ -32,10 +32,11 @@ test.describe('DBAccordion', () => { const screenReader = voiceOver ?? nvda; await screenReader?.clearSpokenPhraseLog(); await screenReader?.next(); // Focus: "item 1" + await screenReader?.next(); // Focus: "item 2" + await screenReader?.previous(); // Focus: "item 1" await screenReader?.act(); // Interact: "item 1" await screenReader?.next(); // Focus: "content 1" await screenReader?.next(); // Focus: "item 2" - await screenReader?.next(); // Focus: "item 3" }, postTestFn }); From 8e678fd0fdb4d31136b2e302dca4eb6abe6aef9a Mon Sep 17 00:00:00 2001 From: brunoschadeck Date: Thu, 22 Aug 2024 16:52:30 +0200 Subject: [PATCH 19/23] test: improves guidepup accordion test --- .../__snapshots__/macos/webkit/DBAccordion-default-1.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-default-1.txt b/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-default-1.txt index 1b047509165..87d7f8418ce 100644 --- a/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-default-1.txt +++ b/showcases/screen-reader/__snapshots__/macos/webkit/DBAccordion-default-1.txt @@ -1 +1 @@ -["Item 1 collapsed summary","Item 1 chevron_down expanded summary","Content 1","Item 2 collapsed summary","Item 3 collapsed summary"] \ No newline at end of file +["Item 1 collapsed summary","Item 2 collapsed summary","Item 1 collapsed summary","","Content 1","Item 2 collapsed summary"] \ No newline at end of file From 54c7802b5ef80487f086efbec49ebc81bee7df34 Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Mon, 2 Sep 2024 18:28:43 +0200 Subject: [PATCH 20/23] Update accordion.spec.ts From 45e250a7b6684fa78b82da35402012eb6f7bc6fc Mon Sep 17 00:00:00 2001 From: brunoschadeck Date: Wed, 4 Sep 2024 11:31:16 +0200 Subject: [PATCH 21/23] chore: fix input test --- .../screen-reader/__snapshots__/macos/webkit/DBInput-next-1.txt | 1 - .../__snapshots__/macos/webkit/DBInput-required-1.txt | 1 - showcases/screen-reader/tests/input.spec.ts | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 showcases/screen-reader/__snapshots__/macos/webkit/DBInput-next-1.txt delete mode 100644 showcases/screen-reader/__snapshots__/macos/webkit/DBInput-required-1.txt diff --git a/showcases/screen-reader/__snapshots__/macos/webkit/DBInput-next-1.txt b/showcases/screen-reader/__snapshots__/macos/webkit/DBInput-next-1.txt deleted file mode 100644 index 2a265deac6b..00000000000 --- a/showcases/screen-reader/__snapshots__/macos/webkit/DBInput-next-1.txt +++ /dev/null @@ -1 +0,0 @@ -["Label (Default) Basic edit text","Label","Label Helper Message edit text","Helper Message"] \ No newline at end of file diff --git a/showcases/screen-reader/__snapshots__/macos/webkit/DBInput-required-1.txt b/showcases/screen-reader/__snapshots__/macos/webkit/DBInput-required-1.txt deleted file mode 100644 index 28a6a206d61..00000000000 --- a/showcases/screen-reader/__snapshots__/macos/webkit/DBInput-required-1.txt +++ /dev/null @@ -1 +0,0 @@ -["Label * Label* Required required edit text","TODO: Add a validMessage. Test","Test selected","Test. Fill out this field","TODO: Add a validMessage. Test"] \ No newline at end of file diff --git a/showcases/screen-reader/tests/input.spec.ts b/showcases/screen-reader/tests/input.spec.ts index 0c29cbccfd7..3f12d9779d2 100644 --- a/showcases/screen-reader/tests/input.spec.ts +++ b/showcases/screen-reader/tests/input.spec.ts @@ -70,7 +70,7 @@ test.describe('DBInput', () => { /* * There is a timing issue for macOS for typing in input we clean the result */ - await generateSnapshot(nvda, retry, (phraseLog) => + await generateSnapshot(voiceOver, retry, (phraseLog) => phraseLog.map((log) => log.replace('t. ', '')) ); } From 9f9af303daf85f378d519b099013ce7d24379c7d Mon Sep 17 00:00:00 2001 From: brunoschadeck Date: Wed, 4 Sep 2024 11:38:06 +0200 Subject: [PATCH 22/23] chore: regenerated snapshots for input --- .../screen-reader/__snapshots__/macos/webkit/DBInput-next-1.txt | 1 + .../__snapshots__/macos/webkit/DBInput-required-1.txt | 1 + 2 files changed, 2 insertions(+) create mode 100644 showcases/screen-reader/__snapshots__/macos/webkit/DBInput-next-1.txt create mode 100644 showcases/screen-reader/__snapshots__/macos/webkit/DBInput-required-1.txt diff --git a/showcases/screen-reader/__snapshots__/macos/webkit/DBInput-next-1.txt b/showcases/screen-reader/__snapshots__/macos/webkit/DBInput-next-1.txt new file mode 100644 index 00000000000..2a265deac6b --- /dev/null +++ b/showcases/screen-reader/__snapshots__/macos/webkit/DBInput-next-1.txt @@ -0,0 +1 @@ +["Label (Default) Basic edit text","Label","Label Helper Message edit text","Helper Message"] \ No newline at end of file diff --git a/showcases/screen-reader/__snapshots__/macos/webkit/DBInput-required-1.txt b/showcases/screen-reader/__snapshots__/macos/webkit/DBInput-required-1.txt new file mode 100644 index 00000000000..f8521dd5853 --- /dev/null +++ b/showcases/screen-reader/__snapshots__/macos/webkit/DBInput-required-1.txt @@ -0,0 +1 @@ +["Label Required required edit text","TODO: Add a validMessage. Test","Test selected","Fill out this field","TODO: Add a validMessage. Test"] \ No newline at end of file From 6824e38015f2e8c75792738601d1993fa835167c Mon Sep 17 00:00:00 2001 From: brunoschadeck Date: Wed, 4 Sep 2024 11:40:47 +0200 Subject: [PATCH 23/23] chore: update windows sr snapshot for accordion --- .../__snapshots__/windows/chromium/DBAccordion-default-1.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-default-1.txt b/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-default-1.txt index 42eb5ff038e..ce6e1ddd982 100644 --- a/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-default-1.txt +++ b/showcases/screen-reader/__snapshots__/windows/chromium/DBAccordion-default-1.txt @@ -1 +1 @@ -["button, collapsed, Item 1","expanded","Content 1","button, collapsed, Item 2","button, collapsed, Item 3"] \ No newline at end of file +["button, collapsed, Item 1","button, collapsed, Item 2","button, collapsed, Item 1","expanded","Content 1","button, collapsed, Item 2"] \ No newline at end of file