diff --git a/showcases/screen-reader/__snapshots__/macos/webkit/DBBadge-should-have-texts-inline-or-as-data-label-attributes-next-.txt b/showcases/screen-reader/__snapshots__/macos/webkit/DBBadge-should-have-texts-inline-or-as-data-label-attributes-next-.txt new file mode 100644 index 00000000000..5df1d6c1cb3 --- /dev/null +++ b/showcases/screen-reader/__snapshots__/macos/webkit/DBBadge-should-have-texts-inline-or-as-data-label-attributes-next-.txt @@ -0,0 +1 @@ +["(Default) Inline","Label","LABEL SHOULD BE SET Corner - Top - Left button","Corner - Top - Left","LABEL SHOULD BE SET Corner - Center - Left button"] \ No newline at end of file diff --git a/showcases/screen-reader/__snapshots__/windows/chromium/DBBadge-should-have-texts-inline-or-as-data-label-attributes-next-.txt b/showcases/screen-reader/__snapshots__/windows/chromium/DBBadge-should-have-texts-inline-or-as-data-label-attributes-next-.txt new file mode 100644 index 00000000000..179e367ed51 --- /dev/null +++ b/showcases/screen-reader/__snapshots__/windows/chromium/DBBadge-should-have-texts-inline-or-as-data-label-attributes-next-.txt @@ -0,0 +1 @@ +["(Default) Inline Label","button, LABEL SHOULD BE SET","button, Corner Top Left","Corner Top Left","button, LABEL SHOULD BE SET"] \ No newline at end of file diff --git a/showcases/screen-reader/tests/badge.spec.ts b/showcases/screen-reader/tests/badge.spec.ts new file mode 100644 index 00000000000..38d2f4fe047 --- /dev/null +++ b/showcases/screen-reader/tests/badge.spec.ts @@ -0,0 +1,24 @@ +import { getTest, testDefault } from '../default'; + +const test = getTest(); + +test.describe('DBBadge', () => { + testDefault({ + test, + title: 'should have texts inline or as data-label attributes (next())', + url: './#/06/badge?page=placement', + async testFn(voiceOver, nvda) { + if (nvda) { + await nvda?.next(); + } + + const screenReader = voiceOver ?? nvda; + await screenReader?.clearSpokenPhraseLog(); + await screenReader?.previous(); // Badge inline + await screenReader?.next(); // Badge red + await screenReader?.next(); // Button with badge with data-label 1 + await screenReader?.next(); // Info-text + await screenReader?.next(); // Button with badge with data-label 2 + } + }); +});