Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(guidepup): checkbox #3005

Merged
merged 36 commits into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
f70d40c
test: adds guidepup test for checkbox
bruno-sch Aug 7, 2024
eebfb16
Merge branch 'main' into test-guidepup-checkbox
bruno-sch Aug 7, 2024
f89690a
chore: update sr test for checkbox
nmerget Aug 8, 2024
976f223
Merge branch 'main' into test-guidepup-checkbox
mfranzke Aug 8, 2024
11e281e
Merge branch 'main' into test-guidepup-checkbox
mfranzke Aug 9, 2024
906f767
Merge branch 'main' into test-guidepup-checkbox
bruno-sch Aug 12, 2024
3147fb7
test: adds title to test, removes obsolete screenshot
bruno-sch Aug 12, 2024
6286ba6
Merge branch 'main' into test-guidepup-checkbox
mfranzke Aug 13, 2024
23ac86c
Merge branch 'main' into test-guidepup-checkbox
mfranzke Aug 14, 2024
2ecd8e8
refactor: updated snapshots
mfranzke Aug 14, 2024
af5d8f6
Merge branch 'main' into test-guidepup-checkbox
bruno-sch Aug 15, 2024
49aeda5
chore: manually merged
bruno-sch Aug 15, 2024
3a10d0f
refactor: adding empty alternative text
mfranzke Aug 15, 2024
18187cd
refactor: updated snapshot
mfranzke Aug 15, 2024
8ae71cb
refactor: updated snapshot
mfranzke Aug 15, 2024
7a530a0
refactor: using the correct notation
mfranzke Aug 15, 2024
0194dc0
feat: alternative text empty for the asterisk
bruno-sch Aug 15, 2024
061e28d
Merge remote-tracking branch 'origin/test-guidepup-checkbox' into tes…
bruno-sch Aug 15, 2024
40ba4b4
test: repeated test
bruno-sch Aug 15, 2024
0be107e
chore: update test for checkbox
nmerget Aug 19, 2024
948e9a4
Discard changes to packages/foundations/scss/icons/_icon-helpers.scss
mfranzke Aug 19, 2024
9af3814
chore: update sr test for checkbox
nmerget Aug 19, 2024
74854e3
Merge remote-tracking branch 'origin/test-guidepup-checkbox' into tes…
nmerget Aug 19, 2024
8136025
Merge branch 'main' into test-guidepup-checkbox
mfranzke Aug 19, 2024
239b7f8
chore: update comments for checkbox st test
nmerget Aug 19, 2024
4e563d3
Merge remote-tracking branch 'origin/test-guidepup-checkbox' into tes…
nmerget Aug 19, 2024
fdb48a3
chore: update snapshots
nmerget Aug 19, 2024
fc81aa8
Merge branch 'main' into test-guidepup-checkbox
bruno-sch Sep 2, 2024
5ab7b63
Merge branch 'main' into test-guidepup-checkbox
bruno-sch Sep 3, 2024
3f38529
Merge branch 'main' into test-guidepup-checkbox
mfranzke Sep 4, 2024
ffce54e
chore: formatting
mfranzke Sep 4, 2024
0e983f6
Merge branch 'main' into test-guidepup-checkbox
nmerget Sep 10, 2024
c866ea1
Update checkbox.spec.ts
mfranzke Sep 10, 2024
a99d772
Merge branch 'main' into test-guidepup-checkbox
mfranzke Sep 10, 2024
f3eb570
chore: update snapshots
nmerget Sep 11, 2024
5e45e95
Merge branch 'main' into test-guidepup-checkbox
mfranzke Sep 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions packages/components/src/styles/_form-components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,8 @@ $input-valid-types: "color", "date", "datetime-local", "email", "file", "hidden"
&:is(label),
label {
&::after {
content: "*";
// Hiding asterisk from screenreaders, https://www.w3.org/TR/css-content-3/#alt
content: "*" / "";
@include icons.icon-content("*");

padding-inline-start: variables.$db-spacing-fixed-2xs;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["Required required unchecked checkbox","Required","Required - Indeterminate mixed checkbox","Required","Required required unchecked checkbox","TODO: Add a validMessage","Required","TODO: Add a validMessage","Required - Indeterminate mixed checkbox","TODO: Add a validMessage","Required","Required TODO: Add a validMessage required checked checkbox","Select this checkbox","Required","Select this checkbox","Required - Indeterminate mixed checkbox"]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
["check box, not checked, required, Required","TODO: Add a valid Message. checked","Required","check box, checked, required, Required","Please check this box if you want to proceed.. not checked","Required","Please check this box if you want to proceed.","check box, half checked, Required Indeterminate"]
46 changes: 46 additions & 0 deletions showcases/screen-reader/tests/checkbox.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { getTest, testDefault } from '../default';

const test = getTest();

test.describe('DBCheckbox', () => {
testDefault({
test,
title: 'default',
description:
'should tick and untick checkbox, feedback messages must appear',
url: './#/03/checkbox?page=requirement',
async testFn(voiceOver, nvda) {
if (nvda) {
await nvda?.next(); // Focus checkbox 2
await nvda?.act(); // Tick checkbox 2
await nvda?.next(); // Focus checkbox 2 message
await nvda?.previous(); // Focus checkbox 2
await nvda?.act(); // Tick checkbox 2
await nvda?.next(); // Focus checkbox 2 label
mfranzke marked this conversation as resolved.
Show resolved Hide resolved
await nvda?.next(); // Focus checkbox 2 message
await nvda?.next(); // Focus checkbox 3
} else if (voiceOver) {
await voiceOver?.next(); // Focus checkbox 1
await voiceOver?.next(); // Focus checkbox 1 label
await voiceOver?.clearSpokenPhraseLog();

await voiceOver?.next(); // Focus checkbox 2
await voiceOver?.next(); // Focus checkbox 2 label
await voiceOver?.next(); // Focus checkbox 3
await voiceOver?.previous(); // Focus checkbox 2 label
await voiceOver?.previous(); // Focus checkbox 2
await voiceOver?.act(); // Tick checkbox 2
await voiceOver?.next(); // Focus checkbox 2 label
await voiceOver?.next(); // Focus checkbox 2 message
await voiceOver?.next(); // Focus checkbox 3
await voiceOver?.previous(); // Focus checkbox 2 message
await voiceOver?.previous(); // Focus checkbox 2 label
await voiceOver?.previous(); // Focus checkbox 2
await voiceOver?.act(); // Tick checkbox 2
await voiceOver?.next(); // Focus checkbox 2 label
await voiceOver?.next(); // Focus checkbox 2 message
await voiceOver?.next(); // Focus checkbox 3
}
}
});
});
3 changes: 3 additions & 0 deletions showcases/screen-reader/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export const translations: Record<string, string[]> = {
edit: ['Eingabefeld'],
'radio button': ['Auswahlschalter'],
blank: ['Leer'],
not: ['Nicht'],
'half checked': ['teilweise aktiviert'],
checked: ['aktiviert'],
' of ': [' von '],
clickable: ['anklickbar'],
Expand All @@ -16,5 +18,6 @@ export const translations: Record<string, string[]> = {
unknown: ['Unbekannt'],
dialog: ['Dialogfeld'],
document: ['Dokument'],
'check box': ['Kontrollfeld'],
unavailable: ['nicht verfügbar']
};
Loading