Skip to content

Commit

Permalink
feat(icons): remove alt tag from decorative icons
Browse files Browse the repository at this point in the history
  • Loading branch information
machikoyasuda committed Aug 14, 2023
1 parent 035bb78 commit a870647
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 78 deletions.
6 changes: 1 addition & 5 deletions benefits/core/templates/core/includes/icon.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
<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 }}" />
<img class="icon" width="150" height="150" src="{% get_static_prefix %}img/icon/{{ name }}.svg" alt="" />
{% endif %}
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 %}
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ <h2 id="contactless-modal" class="me-4 me-md-0">{% translate "Learn more about c
</p>
<p class="pt-4">{% translate "The contactless symbol is four curved lines, like this:" %}</p>
<p class="contactless-symbol pt-3">
<img class="icon mx-auto d-block"
width="30"
height="37.5"
src="{% static 'img/icon/contactless.svg' %}"
alt="{% translate "Four curved lines on contactless-enabled cards" context "image alt text" %}" />
<img class="icon mx-auto d-block" width="30" height="37.5" src="{% static 'img/icon/contactless.svg' %}" alt="" />
</p>
<p class="pt-4">{% translate "Your card must include a Visa or Mastercard logo." %}</p>
<p class="pt-4">
Expand Down
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
26 changes: 1 addition & 25 deletions benefits/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: https://github.com/cal-itp/benefits/issues \n"
"POT-Creation-Date: 2023-08-10 22:35+0000\n"
"POT-Creation-Date: 2023-08-14 23:37+0000\n"
"Language: English\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -267,10 +267,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 @@ -292,10 +288,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 @@ -362,10 +354,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 @@ -461,10 +449,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 @@ -506,10 +490,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 @@ -577,7 +557,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 ""
28 changes: 1 addition & 27 deletions benefits/locale/es/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Report-Msgid-Bugs-To: https://github.com/cal-itp/benefits/issues \n"
"POT-Creation-Date: 2023-08-10 22:35+0000\n"
"POT-Creation-Date: 2023-08-14 23:37+0000\n"
"Language: Español\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -348,10 +348,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 @@ -373,11 +369,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 @@ -456,10 +447,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 @@ -568,10 +555,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 @@ -615,11 +598,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 @@ -702,7 +680,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

0 comments on commit a870647

Please sign in to comment.