Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Remove alt tag from decorative icons #1654

Merged
merged 4 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 2 additions & 13 deletions benefits/core/templates/core/includes/icon.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,2 @@

{% if not name %}
<p class="bg-grey-lightest color-standout">
Missing <strong><code>name</code></strong> argument
</p>
{% elif not alt %}
<p class="bg-grey-lightest color-standout">
Missing <strong><code>alt</code></strong> argument
</p>
{% else %}
{% load static %}
<img class="icon" width="150" height="150" src="{% get_static_prefix %}img/icon/{{ name }}.svg" alt="{{ alt }}" />
{% endif %}
{% load static %}
<img class="icon" width="150" height="150" src="{% get_static_prefix %}img/icon/{{ name }}.svg" alt="" />
5 changes: 1 addition & 4 deletions benefits/core/templates/core/logged-out.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
<div class="row justify-content-lg-center">
<div class="col-md-6">
<h1 class="h2 text-center">
<span class="d-block pb-lg-8 pb-5">
{% translate "Bus icon with smiley face" context "image alt text" as alt_i18n %}
{% include "core/includes/icon.html" with name="happybus" alt=alt_i18n %}
</span>
<span class="d-block pb-lg-8 pb-5">{% include "core/includes/icon.html" with name="happybus" %}</span>
{% translate "You have successfully logged out. Thank you for using Cal-ITP Benefits!" %}
</h1>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
{% load i18n %}

{% block icon %}
{% translate "Bank card icon with contactless symbol and checkmark" context "image alt text" as icon_alt %}
{% include "core/includes/icon.html" with name="bankcardcheck" alt=icon_alt %}
{% include "core/includes/icon.html" with name="bankcardcheck" %}
{% endblock icon %}

{% block heading %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
{% load i18n %}

{% block icon %}
{% translate "Identification card icon with checkmark" context "image alt text" as icon_alt %}
{% include "core/includes/icon.html" with name="idcardcheck" alt=icon_alt %}
{% include "core/includes/icon.html" with name="idcardcheck" %}
{% endblock icon %}
3 changes: 1 addition & 2 deletions benefits/eligibility/templates/eligibility/unverified.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
<div class="container">
<h1 class="h2 text-center">
<span class="icon d-block pb-5">
{% translate "Identification card icon with question mark" context "image alt text" as alt_i18n %}
{% include "core/includes/icon.html" with name="idcardquestion" alt=alt_i18n %}
{% include "core/includes/icon.html" with name="idcardquestion" %}
</span>
{% translate "Your eligibility could not be verified." %}
</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
{% load i18n %}

{% block icon %}
{% translate "Bank card icon with contactless symbol and checkmark" context "image alt text" as icon_alt %}
{% include "core/includes/icon.html" with name="bankcardcheck" alt=icon_alt %}
{% include "core/includes/icon.html" with name="bankcardcheck" %}
{% endblock icon %}

{% block heading %}
Expand Down
3 changes: 1 addition & 2 deletions benefits/enrollment/templates/enrollment/retry.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@

<div class="container">
<h1 class="h2 text-center">
{% translate "Bank card icon with contactless symbol and question mark" context "image alt text" as alt_i18n %}
<span class="icon d-block pb-5">{% include "core/includes/icon.html" with name="bankcardquestion" alt=alt_i18n %}</span>
<span class="icon d-block pb-5">{% include "core/includes/icon.html" with name="bankcardquestion" %}</span>
{% translate "We couldn’t connect your card" %}
</h1>

Expand Down
24 changes: 0 additions & 24 deletions benefits/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -270,10 +270,6 @@ msgstr ""
msgid "Logged out"
msgstr ""

msgctxt "image alt text"
msgid "Bus icon with smiley face"
msgstr ""

msgid "You have successfully logged out. Thank you for using Cal-ITP Benefits!"
msgstr ""

Expand All @@ -295,10 +291,6 @@ msgstr ""
msgid "This field is required."
msgstr ""

msgctxt "image alt text"
msgid "Bank card icon with contactless symbol and checkmark"
msgstr ""

msgid "Your contactless card details"
msgstr ""

Expand Down Expand Up @@ -365,10 +357,6 @@ msgid ""
"create one. We recommend using Login.gov."
msgstr ""

msgctxt "image alt text"
msgid "Identification card icon with checkmark"
msgstr ""

msgid "Go back"
msgstr ""

Expand Down Expand Up @@ -469,10 +457,6 @@ msgstr ""
msgid "Unable to confirm eligibility"
msgstr ""

msgctxt "image alt text"
msgid "Identification card icon with question mark"
msgstr ""

msgid "Your eligibility could not be verified."
msgstr ""

Expand Down Expand Up @@ -514,10 +498,6 @@ msgstr ""
msgid "Unable to register card"
msgstr ""

msgctxt "image alt text"
msgid "Bank card icon with contactless symbol and question mark"
msgstr ""

msgid "We couldn’t connect your card"
msgstr ""

Expand Down Expand Up @@ -594,7 +574,3 @@ msgid ""
"The page you are looking for might be somewhere else or may not exist "
"anymore."
msgstr ""

msgctxt "image alt text"
msgid "Bus icon with flat tire"
msgstr ""
26 changes: 0 additions & 26 deletions benefits/locale/es/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,6 @@ msgstr ""
msgid "Logged out"
msgstr "Cierre sesión"

msgctxt "image alt text"
msgid "Bus icon with smiley face"
msgstr "Icono de autobús con cara sonriente"

msgid "You have successfully logged out. Thank you for using Cal-ITP Benefits!"
msgstr "Ha cerrado sesión correctamente. ¡Gracias por usar Cal-ITP Benefits!"

Expand All @@ -378,11 +374,6 @@ msgstr "Verifique su entrada. El formato parece incorrecto."
msgid "This field is required."
msgstr "Este campo es requerido."

msgctxt "image alt text"
msgid "Bank card icon with contactless symbol and checkmark"
msgstr ""
"Icono de tarjeta bancaria con símbolo sin contacto y marca de verificación"

msgid "Your contactless card details"
msgstr "Los datos de su tarjeta sin contacto"

Expand Down Expand Up @@ -461,10 +452,6 @@ msgstr ""
"Si no tiene una cuenta con ninguno de estos servicios, deberá crear una. "
"Recomendamos utilizar Login.gov. "

msgctxt "image alt text"
msgid "Identification card icon with checkmark"
msgstr "Icono de tarjeta de identificación con marca de verificación"

msgid "Go back"
msgstr "Volver"

Expand Down Expand Up @@ -580,10 +567,6 @@ msgstr "Necesitará algunos artículos para continuar:"
msgid "Unable to confirm eligibility"
msgstr "No se pudo confirmar la elegibilidad"

msgctxt "image alt text"
msgid "Identification card icon with question mark"
msgstr "Icono de tarjeta de identificación con signo de interrogación"

msgid "Your eligibility could not be verified."
msgstr "No se pudo verificar su elegibilidad."

Expand Down Expand Up @@ -627,11 +610,6 @@ msgstr "Conecta tu tarjeta"
msgid "Unable to register card"
msgstr "No se pudo registrar la tarjeta"

msgctxt "image alt text"
msgid "Bank card icon with contactless symbol and question mark"
msgstr ""
"Icono de tarjeta bancaria con símbolo sin contacto y signo de interrogación"

msgid "We couldn’t connect your card"
msgstr "No pudimos conectar su tarjeta"

Expand Down Expand Up @@ -726,7 +704,3 @@ msgid ""
msgstr ""
"La página que está buscando puede estar en otro lugar o puede que ya no "
"exista."

msgctxt "image alt text"
msgid "Bus icon with flat tire"
msgstr "Icono de autobus con llanta ponchada"
3 changes: 1 addition & 2 deletions benefits/templates/error.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
<div class="container">
<h1 class="icon-title h2 text-center">
<span class="icon d-block pb-5">
{% translate "Bus icon with flat tire" context "image alt text" as alt_i18n %}
{% include "core/includes/icon.html" with name="sadbus" alt=alt_i18n %}
{% include "core/includes/icon.html" with name="sadbus" %}
</span>
{% block headline %}
{% endblock headline %}
Expand Down