diff --git a/app/views/layouts/user_mailer.html.erb b/app/views/layouts/user_mailer.html.erb index 243a7b28278..8ed95c823ec 100644 --- a/app/views/layouts/user_mailer.html.erb +++ b/app/views/layouts/user_mailer.html.erb @@ -46,6 +46,7 @@ attachments['logo.png'].url, size: '142x19', style: 'width: 142px; height: 19px;', + alt: t('mailer.logo', app_name: APP_NAME), ) %> diff --git a/config/locales/mailer/en.yml b/config/locales/mailer/en.yml index 879ffe1ffcc..7efbe725413 100644 --- a/config/locales/mailer/en.yml +++ b/config/locales/mailer/en.yml @@ -5,5 +5,6 @@ en: email_reuse_notice: subject: This email address is already associated with an account. help: If you need help, visit %{link} + logo: '%{app_name} logo' no_reply: Please do not reply to this message. privacy_policy: Privacy policy diff --git a/config/locales/mailer/es.yml b/config/locales/mailer/es.yml index a372efd30d7..e9cd9abe3d7 100644 --- a/config/locales/mailer/es.yml +++ b/config/locales/mailer/es.yml @@ -5,5 +5,6 @@ es: email_reuse_notice: subject: Este email ya está asociado a una cuenta. help: Si necesita ayuda, visite %{link} + logo: '%{app_name} logo' no_reply: Por favor, no responda a este mensaje. privacy_policy: Póliza de privacidad diff --git a/config/locales/mailer/fr.yml b/config/locales/mailer/fr.yml index 973fd7b1a4a..ebcad3e0227 100644 --- a/config/locales/mailer/fr.yml +++ b/config/locales/mailer/fr.yml @@ -5,5 +5,6 @@ fr: email_reuse_notice: subject: Cette adresse courriel est déjà associée à un compte. help: Si vous avez besoin d’aide, visitez le site %{link} + logo: '%{app_name} logo' no_reply: Veuillez ne pas répondre à ce message. privacy_policy: Politique de confidentialité diff --git a/spec/i18n_spec.rb b/spec/i18n_spec.rb index a19f6c95957..48f5da5c5b4 100644 --- a/spec/i18n_spec.rb +++ b/spec/i18n_spec.rb @@ -29,6 +29,7 @@ class BaseTask { key: 'time.pm' }, # "PM" is "PM" in French and Spanish { key: 'datetime.dotiw.minutes.one' }, # "minute is minute" in French and English { key: 'datetime.dotiw.minutes.other' }, # "minute is minute" in French and English + { key: 'mailer.logo' }, # "logo is logo" in English, French and Spanish ].freeze # rubocop:enable Layout/LineLength diff --git a/spec/views/layouts/user_mailer.html.erb_spec.rb b/spec/views/layouts/user_mailer.html.erb_spec.rb index b05277588c1..d2acbf298de 100644 --- a/spec/views/layouts/user_mailer.html.erb_spec.rb +++ b/spec/views/layouts/user_mailer.html.erb_spec.rb @@ -19,6 +19,10 @@ expect(rendered).to have_css("img[src*='.mail']") end + it 'includes alt text for app logo that reads Login.gov logo' do + expect(rendered).to have_css("img[alt='#{t('mailer.logo', app_name: APP_NAME)}']") + end + it 'includes the message subject in the body' do expect(rendered).to have_content @mail.subject end