From 1a2d00d58b4ea8cb25435f4978d8ef9370b86e9a Mon Sep 17 00:00:00 2001 From: Kevin White Date: Mon, 11 Dec 2023 16:07:31 +0000 Subject: [PATCH] Updates for WCAG 2.2 (#132) * First steps for WCAG 2.2 * Ignore package-lock * Change version of Understanding links based on WCAG version * Update contacts * Remove 4.1.1 * Fix for missing criteria when changing scope * Handle removal of 4.1.1 * Remove duplicated criteria * Correct links to 2.0 understanding documents This links to the 2.0 understanding documents within the TR space, not the ones in the WAI space. The default on opening EM Report tool is 2.2 and most people will be using that or 2.1. So the slightly less than ideal experience for 2.0 is acceptable. Agreed by @shawna-slh and @iadawn --------- Co-authored-by: mhansma96 --- .gitignore | 1 + .../form/SampleInput/SampleInput.svelte | 2 + .../pages/Evaluation/DefineScopePage.svelte | 1 - src/components/ui/Auditor/Criterion.svelte | 27 +- src/data/wcag.json | 412 ++++++++++++++++++ src/locales/en/PAGES/SCOPE.json | 3 +- src/locales/en/WCAG.json | 45 ++ src/locales/nl/WCAG.json | 45 ++ src/stores/earl/assertionStore/models.js | 1 - src/stores/earl/testStore/index.js | 20 +- src/stores/scopeStore.js | 2 +- w3c.json | 2 +- 12 files changed, 543 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index bd65a668..ffeaaae4 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ build # but not by platforms like Github Pages. # Files prefixed with `_` are ignored by default. translations_*.json +package-lock.json diff --git a/src/components/form/SampleInput/SampleInput.svelte b/src/components/form/SampleInput/SampleInput.svelte index 10eebb42..58eb3cba 100644 --- a/src/components/form/SampleInput/SampleInput.svelte +++ b/src/components/form/SampleInput/SampleInput.svelte @@ -81,6 +81,7 @@ let valueContainer; let showHelptext = false; const { translate } = getContext('app'); + import assertions from '@app/stores/earl/assertionStore/index.js'; $: TRANSLATED = { NO_SAMPLE: $translate('PAGES.SAMPLE.NO_PAGES_DEFINED'), @@ -119,6 +120,7 @@ newValue.splice(indexSample, 1); value = newValue; // @TODO: removeSample.delete(); !required for cleanup + $assertions = $assertions.filter(assertion => assertion.subject.id !== removeSample.id); subjects.remove(removeSample); } } diff --git a/src/components/pages/Evaluation/DefineScopePage.svelte b/src/components/pages/Evaluation/DefineScopePage.svelte index ba064ecb..fe3b2053 100644 --- a/src/components/pages/Evaluation/DefineScopePage.svelte +++ b/src/components/pages/Evaluation/DefineScopePage.svelte @@ -157,7 +157,6 @@ subject = $subjects.find((subject) => { return subject.type.indexOf(TestSubjectTypes.WEBSITE) >= 0; }); - test = $tests.find(($test) => { return $test.num === check; }); diff --git a/src/components/ui/Auditor/Criterion.svelte b/src/components/ui/Auditor/Criterion.svelte index 442580be..7dff2dd4 100644 --- a/src/components/ui/Auditor/Criterion.svelte +++ b/src/components/ui/Auditor/Criterion.svelte @@ -7,13 +7,22 @@

{num}: {TRANSLATED.CRITERION.TITLE}

Level {conformanceLevel}