Skip to content

Commit

Permalink
Correcting visually hidden spans
Browse files Browse the repository at this point in the history
  • Loading branch information
hjvoid committed Aug 19, 2024
1 parent 4c410a9 commit 58e6acd
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
18 changes: 9 additions & 9 deletions app/views/charge.njk
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@
</label>
{% if highlightErrorFields.cardNo %}
<p class="govuk-error-message" id="error-card-no">
<span class="govuk-visually-hidden">{{ __p("fieldErrors.visuallyHiddenError") }}</span>
{{ highlightErrorFields.cardNo }}
<span class="govuk-visually-hidden">{{ highlightErrorFields.cardNo }}</span>
</p>
{% endif %}

Expand Down Expand Up @@ -260,8 +260,8 @@
</div>
{% if highlightErrorFields.expiryMonth %}
<p class="govuk-error-message" id="error-expiry-date">
<span class="govuk-visually-hidden">{{ __p("fieldErrors.visuallyHiddenError") }}</span>
{{ highlightErrorFields.expiryMonth }}
<span class="govuk-visually-hidden">{{ highlightErrorFields.expiryMonth }}</span>
</p>
{% endif %}
<div class="govuk-date-input__item govuk-date-input__item--month govuk-date-input__item--with-separator">
Expand Down Expand Up @@ -310,8 +310,8 @@

{% if highlightErrorFields.cardholderName %}
<p class="govuk-error-message" id="error-cardholder-name">
<span class="govuk-visually-hidden">{{ __p("fieldErrors.visuallyHiddenError") }}</span>
{{ highlightErrorFields.cardholderName }}
<span class="govuk-visually-hidden">{{ highlightErrorFields.cardholderName }}</span>
</p>
{% endif %}

Expand Down Expand Up @@ -349,8 +349,8 @@

{% if highlightErrorFields.cvc %}
<p class="govuk-error-message" id="error-cvc">
<span class="govuk-visually-hidden">{{ __p("fieldErrors.visuallyHiddenError") }}</span>
{{ highlightErrorFields.cvc }}
<span class="govuk-visually-hidden">{{ highlightErrorFields.cvc }}</span>
</p>
{% endif %}

Expand Down Expand Up @@ -401,8 +401,8 @@

{% if highlightErrorFields.addressLine1 %}
<p class="govuk-error-message" id="error-address-line-1">
<span class="govuk-visually-hidden">{{ __p("fieldErrors.visuallyHiddenError") }}</span>
{{ highlightErrorFields.addressLine1 }}
<span class="govuk-visually-hidden">{{ highlightErrorFields.addressLine1 }}</span>
</p>
{% endif %}

Expand Down Expand Up @@ -455,8 +455,8 @@

{% if highlightErrorFields.addressCity %}
<p class="govuk-error-message" id="error-address-city">
<span class="govuk-visually-hidden">{{ __p("fieldErrors.visuallyHiddenError") }}</span>
{{ highlightErrorFields.addressCity }}
<span class="govuk-visually-hidden">{{ highlightErrorFields.addressCity }}</span>
</p>
{% endif %}

Expand All @@ -481,8 +481,8 @@

{% if highlightErrorFields.addressCountry %}
<p class="govuk-error-message" id="error-address-country">
<span class="govuk-visually-hidden">{{ __p("fieldErrors.visuallyHiddenError") }}</span>
{{ highlightErrorFields.addressCountry }}
<span class="govuk-visually-hidden">{{ highlightErrorFields.addressCountry }}</span>
</p>
{% endif %}

Expand Down Expand Up @@ -511,8 +511,8 @@

{% if highlightErrorFields.addressPostcode %}
<p class="govuk-error-message" id="error-address-postcode">
<span class="govuk-visually-hidden">{{ __p("fieldErrors.visuallyHiddenError") }}</span>
{{ highlightErrorFields.addressPostcode }}
<span class="govuk-visually-hidden">{{ highlightErrorFields.addressPostcode }}</span>
</p>
{% endif %}

Expand Down Expand Up @@ -551,8 +551,8 @@

{% if highlightErrorFields.email %}
<p class="govuk-error-message" id="error-email">
<span class="govuk-visually-hidden">{{ __p("fieldErrors.visuallyHiddenError") }}</span>
{{ highlightErrorFields.email }}
<span class="govuk-visually-hidden">{{ highlightErrorFields.email }}</span>
</p>
{% endif %}

Expand Down
1 change: 1 addition & 0 deletions locales/cy.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
"fieldErrors": {
"summary": "Mae’r meysydd canlynol yn wag neu yn cynnwys camgymeriadau",
"generic": "Rhowch %s dilys",
"visuallyHiddenError": "Gwall:",
"fields": {
"cardholderName": {
"name": "enw",
Expand Down
1 change: 1 addition & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
"fieldErrors": {
"summary": "The following fields are missing or contain errors",
"generic": "Enter a valid %s",
"visuallyHiddenError": "Error:",
"fields": {
"cardholderName": {
"name": "name",
Expand Down

0 comments on commit 58e6acd

Please sign in to comment.