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

MJML should include the lang attribute on an element inside the body #2475

Closed
avigoldman opened this issue May 18, 2022 · 3 comments
Closed

Comments

@avigoldman
Copy link

Describe the bug

Email clients will often remove the element so it’s recommended for accessibility purposes to include it inside the content as well.

To Reproduce

<mjml lang="en">
  <mj-head>
    <mj-title>hello world</mj-title>
  </mj-head>
  <mj-body>
    <mj-section>
      <mj-column>
        <mj-text>
          <h1>hello world</h1>
        </mj-text>
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>

The output of this code only includes the lang attribute on the <html> tag

Expected behavior
It should probably be included on the wrapping element inside the <body>

MJML environment (please complete the following information):

  • Parcel

Email sending environment(for rendering issues):
N/A

Affected email clients (for rendering issues):

  • Gmail

Screenshots
https://www.loom.com/share/8f9057aceb78408b896b5758c8de99e9

@avigoldman avigoldman changed the title MJML should include the lang attribute in an inner tag as well MJML should include the lang attribute on an element inside the body May 18, 2022
@M-J-Robbins
Copy link

Just a quick note, this also applies to the dir attribute.

@iRyusa
Copy link
Member

iRyusa commented May 19, 2022

#2476 should take care of both issue.

I'll see if I can push it to NPM monday

@iRyusa
Copy link
Member

iRyusa commented Jul 8, 2022

I can publish on npm again ... yay 2 months later 😬

But at least it's in 4.13.0

@iRyusa iRyusa closed this as completed Jul 8, 2022
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

No branches or pull requests

3 participants