QA checklist for Mailviews components and templates.
Use a consistent HTML attributes order for all elements.
<td align?="" class="" style?=""></td><a href="" class="" style?=""></a><img src="" width="" class="">
The following attributes are automatically added by Maizzle:
- For tables:
cellpadding="0",cellspacing="0",role="none" - For images:
alt=""
Always write the desktop/to-be-inlined class first, followed by its responsive variants.
Example:
<divclass="hidden sm:block w-[600px] sm:w-full text-base/6 text-right text-gray-600 bg-white rounded-lg shadow-2xl"></div>Prefer utility classes to HTML attributes. CSS pixel values scale better on high-density screens.
- <table width="64">+ <table class="w-16">For larger or one-off values, use arbitrary values as they are clearer:
- <table class="w-150">+ <table class="w-[600px]">Exception: width/height on images, for Outlook compatibility:
- <img src="" class="w-6">+ <img src="" width="24">Prefer arbitrary utility classes or inline CSS to registering new utilities in tailwind.config.js.
For example, when adding a background image, it's obvious right away what file is used:
- <td class="bg-image-hero">+ <td class="bg-[url(hero.jpg)]">Inline CSS should be used where values need to be dynamic:
- <td class="bg-[url(hero.jpg)]">+ <td style="background-image: url('https://github.laxmiang.work.gd/r/github.com/%7B%7B%20page.image%20%7D%7D')">- ensure
altattributes on all images - decorative images should use an empty
altattribute - images containing text should be avoided by all means
Optional: styled alt text, where applicable.
Make sure aria roles are properly set.
Note: <hr> elements do not need a role="separator", they are already semantically correct.
Div:
<divclass="leading-8" role="separator">‍</div>Table:
<tableclass="w-full" role="separator"><tr><tdclass="leading-4">‍</td></tr></table>Table row:
<trrole="separator"><tdclass="leading-4">‍</td></tr><tableclass="w-full" role="separator"><tr><tdclass="py-6"><divclass="h-px leading-px bg-gray-200">‍</div></td></tr></table>Provide a unique <title> for each Template.
This can be used for the preheader too, but they can also be different.
- ensure viewport zoom is not disabled
- use a legible font size (ideally min. 16px)
- decent line height (i.e. 24px)
- good contrast
- ensure text links are recognizable as links
<h2>-<h4>for headings<p>for paragraphs<em>, not<i><strong>, not<b>ulandolfor lists<span class="text-sm">, not<small>- Link buttons (no VML)
- there should be no
titleattributes - animation must respect
prefers-reduced-motion
At the very minimum, the Component or Template needs to render well in these email clients.
This covers over 95% of the email client market share.
- iPad
- iPhone
- Gmail iOS
- Gmail Android
- Outlook iOS
- Outlook Android
- Apple Mail
- Outlook 2019
- Outlook 2019 (120 DPI)
- Thunderbird
- Gmail
- Office 365
- Outlook.com
- Yahoo!/AOL