Skip to content

[Accessibility] - add role main landmark #2954

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

llepere
Copy link

@llepere llepere commented Jun 4, 2025

TLDLR; Add role main to MjBody

For accessibility the main landmark is important to point the user to the main content of the email and navigate easily with a screen reader. We can use the <main> tag or add a role="main" to a <div>

We don't use <main> tag here because of some limitations from email providers (Outlook, Gmail, etc.).

So update the MjBody class to add role: 'main' as parameter in htmlAttributes function.

More on main here

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.

1 participant