From dc9069d1bfc02d195b43c19f0d2b40ce15b567f9 Mon Sep 17 00:00:00 2001 From: Henry Wilkinson Date: Wed, 12 Jun 2024 21:32:43 -0400 Subject: [PATCH] Improves accessibility for QA features (#1863) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Switches from spans with classes to `ins` and `del` tags for text comparison - Adds `aria-label` attributes for screen readers. Text comparison is accessible now! 🎉 - I kept the strikethrough text on the `del` tag but can remove? Only visible on hover. - Removes autofocus on the delete analysis run cancel button - Adds `aria-label` attribute for the heuristic nav bar to describe the context of the content users will be seeing on each page. --- .../pages/org/archived-item-detail/ui/qa.ts | 1 - .../org/archived-item-qa/archived-item-qa.ts | 1 + .../src/pages/org/archived-item-qa/ui/text.ts | 52 ++++++++++++------- 3 files changed, 34 insertions(+), 20 deletions(-) diff --git a/frontend/src/pages/org/archived-item-detail/ui/qa.ts b/frontend/src/pages/org/archived-item-detail/ui/qa.ts index af0559db..24e5f38d 100644 --- a/frontend/src/pages/org/archived-item-detail/ui/qa.ts +++ b/frontend/src/pages/org/archived-item-detail/ui/qa.ts @@ -425,7 +425,6 @@ export class ArchivedItemDetailQA extends TailwindElement {
void this.deleteQADialog?.hide()} > ${msg("Cancel")} diff --git a/frontend/src/pages/org/archived-item-qa/archived-item-qa.ts b/frontend/src/pages/org/archived-item-qa/archived-item-qa.ts index a5ea3936..1eb2f19e 100644 --- a/frontend/src/pages/org/archived-item-qa/archived-item-qa.ts +++ b/frontend/src/pages/org/archived-item-qa/archived-item-qa.ts @@ -508,6 +508,7 @@ export class ArchivedItemQA extends TailwindElement {
${diff.map((part) => { - return html` - ${part.value}`; + } else if (part.removed) { + return html`${part.value}`; + } else { + return html`${part.value} - `; + >`; + } })}
`;