Skip to content

Commit

Permalink
Updates for WCAG 2.2 (#132)
Browse files Browse the repository at this point in the history
* 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 <michel.hansma@han.nl>
  • Loading branch information
iadawn and mhansma96 authored Dec 11, 2023
1 parent c966d6c commit 1a2d00d
Show file tree
Hide file tree
Showing 12 changed files with 543 additions and 18 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ build
# but not by platforms like Github Pages.
# Files prefixed with `_` are ignored by default.
translations_*.json
package-lock.json
2 changes: 2 additions & 0 deletions src/components/form/SampleInput/SampleInput.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down Expand Up @@ -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);
}
}
Expand Down
1 change: 0 additions & 1 deletion src/components/pages/Evaluation/DefineScopePage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@
subject = $subjects.find((subject) => {
return subject.type.indexOf(TestSubjectTypes.WEBSITE) >= 0;
});
test = $tests.find(($test) => {
return $test.num === check;
});
Expand Down
27 changes: 19 additions & 8 deletions src/components/ui/Auditor/Criterion.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,22 @@
<h3>{num}: {TRANSLATED.CRITERION.TITLE}</h3>
<em class="criterion-header__level">Level {conformanceLevel}</em>
<div class="criterion__resource-links">
<ResourceLink
href="https://www.w3.org/WAI/WCAG21/Understanding/{id}.html"
>
{TRANSLATED.UNDERSTAND_BUTTON}
{num}
</ResourceLink>
<ResourceLink href="https://www.w3.org/WAI/WCAG21/quickref/#{id}">
{#if wcagVersion == '20'}
<ResourceLink
href="https://www.w3.org/TR/UNDERSTANDING-WCAG{wcagVersion}/{id}.html"
>
{TRANSLATED.UNDERSTAND_BUTTON}
{num}
</ResourceLink>
{:else}
<ResourceLink
href="https://www.w3.org/WAI/WCAG{wcagVersion}/Understanding/{id}.html"
>
{TRANSLATED.UNDERSTAND_BUTTON}
{num}
</ResourceLink>
{/if}
<ResourceLink href="https://www.w3.org/WAI/WCAG{wcagVersion}/quickref/#{id}">
{TRANSLATED.HOW_TO_BUTTON}
{num}
</ResourceLink>
Expand Down Expand Up @@ -133,7 +142,9 @@ import Acknowledgements from '../../pages/Acknowledgements.svelte';
export let criterionDetailsOpen = false;
let criterionDetails;
const { translate, translateToObject } = getContext('app');
const { translate, translateToObject, scopeStore } = getContext('app');
$: wcagVersion = $scopeStore['WCAG_VERSION'].replace(".", "");
$: TRANSLATED = {
UNDERSTAND_BUTTON: $translate('PAGES.AUDIT.UNDERSTAND'),
Expand Down
Loading

0 comments on commit 1a2d00d

Please sign in to comment.