From 315fe7749a2211995803e69a149e8b8c262f3ebc Mon Sep 17 00:00:00 2001 From: Dana Cotoran Date: Wed, 19 Jun 2024 12:39:41 +0100 Subject: [PATCH] BAU: a11y statement inset text tweak Tweak the way the webchat accessibility statement paragraph is displayed on the contact triage page. The inset text used to have several paragraphs which were stored as an array in the translation files. This has since been updated so there is one paragraph only, which means the current solution is a bit overengineered. Some small style updates: use em dash instead of a regular hyphen and move the full stop outside of the anchor tag. --- src/components/contact-govuk-one-login/index.njk | 7 ++----- src/locales/cy/translation.json | 8 +------- src/locales/en/translation.json | 8 +------- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/src/components/contact-govuk-one-login/index.njk b/src/components/contact-govuk-one-login/index.njk index b0b2e55d9..1c9053487 100644 --- a/src/components/contact-govuk-one-login/index.njk +++ b/src/components/contact-govuk-one-login/index.njk @@ -35,7 +35,7 @@ {% endfor %}

- {{'pages.contact.refCodeBlock.refCode' | translate}} + {{ 'pages.contact.refCodeBlock.refCode' | translate }} {{ referenceCode }}

{% endset %} @@ -127,10 +127,7 @@

{% set accessibilityTextHtml %} - {% set insetTextParagraphs = 'pages.contact.section3.webchat.accessibility-statement.insetText.paragraphs' | translate({ returnObjects: true }) %} - {% for paragraph in insetTextParagraphs %} -

{{ paragraph | safe | replace('[accessibilityStatementLinkHref]', accessibilityStatementUrl ) }}

- {% endfor %} +

{{ 'pages.contact.section3.webchat.accessibilityStatementParagraph' | translate | safe | replace('[accessibilityStatementLinkHref]', accessibilityStatementUrl ) }}

{% endset %} {{ govukInsetText({ diff --git a/src/locales/cy/translation.json b/src/locales/cy/translation.json index 5fff82a18..f9e638209 100644 --- a/src/locales/cy/translation.json +++ b/src/locales/cy/translation.json @@ -522,13 +522,7 @@ "Mae'r cynorthwyydd digidol bob amser ar gael." ], "linkText": "Defnyddio gwe-sgwrs", - "accessibility-statement": { - "insetText": { - "paragraphs": [ - "Nid yw ein gwe-sgwrs yn gwbl hygyrch eto - rydym yn gweithio i’w wella. Gallwch ddarganfod mwy am y cyfyngiadau a sut rydym yn eu cywiro." - ] - } - } + "accessibilityStatementParagraph": "Nid yw ein gwe-sgwrs yn gwbl hygyrch eto — rydym yn gweithio i’w wella. Gallwch ddarganfod mwy am y cyfyngiadau a sut rydym yn eu cywiro." }, "phone": { "heading": "Ffôn", diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 81247ff9c..a1687a093 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -638,13 +638,7 @@ "The digital assistant is always available." ], "linkText": "Use webchat", - "accessibility-statement": { - "insetText": { - "paragraphs": [ - "Our webchat is not fully accessible yet - we’re working to improve it. You can find out more about the limitations and how we’re fixing them." - ] - } - } + "accessibilityStatementParagraph": "Our webchat is not fully accessible yet — we’re working to improve it. You can find out more about the limitations and how we’re fixing them." }, "phone": { "heading": "Phone",