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

Add content type meta tag for system messages #12156

Merged
merged 3 commits into from
Oct 23, 2022

Conversation

kennethormandy
Copy link
Contributor

Description

This pull request adds the content type meta tag to the default HTML email for system messages:

<meta http-equiv="Content-Type" content="text/html charset=UTF-8" />

Litmus and Email on Acid both suggest this is required to properly support screen readers.

Apparently, email clients will only use the Content-Type: already set in message header sent as part of the email itself, and ignore this in the HTML. Screen readers, however, do need it.

There were no changes in the visual tests, either.

Related issues

Ideally, we’d also set the lang attribute on the root HTML tag for screen readers, but I’m not sure if we can set this reliably:

Without a [lang] attribute, screen readers will assume the email is in the default language the subscriber chose when setting up their screen reader. If your email is not in that user’s language, the screen reader may not accurately transcribe your message.

The system messages have to be manually translated and might not be the same as the system language, correct?

@kennethormandy kennethormandy requested a review from a team as a code owner October 19, 2022 18:18
@brandonkelly brandonkelly changed the base branch from develop to 4.3 October 23, 2022 23:00
@brandonkelly brandonkelly merged commit 125f513 into 4.3 Oct 23, 2022
@brandonkelly brandonkelly deleted the a11y/system-message-conent-type branch October 23, 2022 23:44
@brandonkelly
Copy link
Member

Ideally, we’d also set the lang attribute on the root HTML tag for screen readers, but I’m not sure if we can set this reliably

Done (85e00b5). Should be pretty reliable since the default system messages are all translated, and they’ve overridden on a per-language basis, so in theory no one will override them for a language they haven’t translated yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants