Conversation
| attachments['logo.png'].url, | ||
| size: '142x19', | ||
| style: 'width: 142px; height: 19px;', | ||
| alt: 'Login.gov logo', |
There was a problem hiding this comment.
I believe we conventionally use the APP_NAME constant for this rather than hardcoding Login.gov.
| alt: 'Login.gov logo', | |
| alt: "#{APP_NAME} logo", |
I noticed that the only place this is hardcoded are the error pages.
I think we should still use the localization tools even if the text is the same, in case we need to make revisions to one language in the future, and to prevent confusion if a future maintainer assumes that this text is untranslated. |
|
that makes sense, i just updated it |
|
For the build failure, you can bypass the error by adding to the list here as being the same translation across all locales: identity-idp/spec/i18n_spec.rb Lines 15 to 32 in 399e9bb |
aduth
left a comment
There was a problem hiding this comment.
LGTM 👍
I see you added "[skip changelog]", but this seems like something which would be good to highlight in the release notes as an accessibility improvement / fix. You could still add a changelog as part of the editable textarea when merging.
| end | ||
|
|
||
| it 'includes alt text for app logo that reads Login.gov logo' do | ||
| expect(rendered).to have_css("img[alt='Login.gov logo']") |
There was a problem hiding this comment.
While this probably passes, it'd be good to make this assertion locale-independent.
| expect(rendered).to have_css("img[alt='Login.gov logo']") | |
| expect(rendered).to have_css("img[alt='#{t('mailer.logo', app_name: APP_NAME)}']") |
Ticket
What: This pr adds alt text to the Login.gov logo in order to allow screen reader users to hear text that describes the logo image in emails.
How: Alt tag added to image_tag in the base email used by other emails.
Note: Did not add this text to the i18l files as the text is the same in the 3 languages we support.
Testing:
http://localhost:3000/rails/mailers/user_mailer/in_person_verified.html?locale=enScreenshot
changelog: Improvement, Accessibility, add alt text for login.gov logo