Sub topic 7
Accessibility Checks and the Plain-Text Version
This chapter assumes you can edit an email's HTML or use your platform's editor, you know what a test send and a seed list are (covered earlier in this tutorial), and you understand basic HTML elements such as img, a and table. It covers two related checks: whether people using assistive technology can read your email, and whether the plain-text alternative is usable.
Why accessibility belongs in pre-send testing
Accessibility means a message works for people with different abilities and setups. Readers may use a screen reader (software that reads the screen aloud), magnify text, rely on high contrast, navigate by keyboard or switch device, or have images blocked. Many readers without a disability also depend on the same features. A person reading in bright sunlight needs strong contrast. A person with images turned off needs alt text.
Accessibility problems are cheap to fix before sending and impossible to fix after. You cannot edit an email once it sits in someone's inbox. Most of these checks take only a few minutes if you run them on the final version of the message.
Most accessibility errors fall into a small number of categories:
- Text that is baked into images, with no text equivalent.
- Missing or unhelpful alt text.
- Low contrast between text and background.
- Text that is too small or cannot be resized.
- Vague link text such as "click here".
- A layout that reads in a confusing order when linearized.
- Missing language declaration or document title.
Image alt text
Alt text is the alt attribute on an img tag. It is what a screen reader announces, and what many clients display when images are blocked. Apply these rules:
- Informative images need a short description of what matters. For a product photo, name the product. For a sale banner, repeat the offer:
alt="20% off all shoes until Sunday". - Decorative images (spacers, dividers, flourishes) need an empty attribute:
alt="". This tells a screen reader to skip the image. Leaving the attribute out entirely is different. Some screen readers then read the file name aloud. - Linked images need alt text that describes the link's destination or action, not the picture. A logo that links to your site might use
alt="Acme home page". - Images containing text need that same text in the
altattribute. Better still, put the text in live HTML text so it also survives image blocking and is resizable.
A common failure is a hero banner that is a single image holding the headline, the offer and the button. With images blocked, the reader sees an empty box. A screen reader user hears nothing or a file name. Rebuild such banners with live text over a background colour, and keep the image purely supporting.
You can check alt text on a saved copy of the HTML with a short script. This one lists every img tag and reports whether it has an alt attribute and whether that attribute is empty.
import sys
from html.parser import HTMLParser
class ImgAudit(HTMLParser):
def handle_starttag(self, tag, attrs):
if tag != "img":
return
attrs = dict(attrs)
src = attrs.get("src", "(no src)")
if "alt" not in attrs:
print("MISSING ALT ", src)
elif attrs["alt"].strip() == "":
print("empty alt ", src, "(fine only if decorative)")
else:
print("alt ok ", src, "->", attrs["alt"])
with open(sys.argv[1], encoding="utf-8") as f:
ImgAudit().feed(f.read())The script cannot judge whether the text is meaningful. An alt of "image1.png" passes the script and fails the reader. Review the output by hand.
Contrast, size and colour
Contrast is the difference in brightness between text and its background. The Web Content Accessibility Guidelines (WCAG) set a minimum contrast ratio of 4.5:1 for normal text and 3:1 for large text (roughly 18 pt, or 14 pt bold). Light grey text on white, and white text on a pale brand colour, are the usual offenders. Check each text and background pair with a contrast checker tool, including button labels and footer text, which designers often make the faintest.
Other points to check:
- Font size. Body text of at least 14 to 16 px is a safe default. Footer legal text should not shrink below about 12 px.
- Colour alone. Do not use colour as the only signal. A red price and a green price mean nothing to a reader with colour blindness. Add a word, a symbol or an underline.
- Dark mode. Contrast can change when a client inverts colours. This was covered in the rendering chapter. Look at your accessibility checks again in a dark-mode screenshot, because a pass in light mode does not carry over.
- Tap targets. Buttons and links should be large enough for a thumb, commonly at least 44 by 44 px, with space between neighbouring links.
Link text and structure
Screen reader users often pull up a list of all links on the page. A list reading "click here, click here, read more, read more" is useless. Make each link's text meaningful on its own: "Read the spring catalogue" rather than "Click here". Avoid pasting raw URLs as visible text, since they are read out character by character.
Structure matters too:
- Use real heading tags (
h1,h2) for headings where your platform allows it, rather than bold large text. This lets screen reader users jump between sections. - Use real list markup for lists.
- Keep the source order the same as the visual reading order. Email layouts often use nested tables. A screen reader reads the table cells in source order, so a two-column layout that looks fine can read in a jumbled order.
- When you use tables for layout, add
role="presentation"so a screen reader does not announce rows and columns as if they were data. - Set
langon thehtmlelement (for examplelang="en") so the screen reader uses the right pronunciation. Include atitleelement, since some clients show it.
<html lang="en">
<head>
<title>Spring sale: 20% off all shoes</title>
</head>
<body>
<table role="presentation" width="100%">
<tr>
<td>
<h1>Spring sale</h1>
<p>Take 20% off all shoes until Sunday.</p>
<a href="https://www.example.com/sale">Shop the spring sale</a>
</td>
</tr>
</table>
</body>
</html>A manual accessibility pass
Automated tools catch missing attributes and contrast failures. They miss meaning. Add a short manual pass to your testing:
- Open the test send with images blocked. Can you still understand the offer and find the main button?
- Zoom the text to 200%. Does the layout still work, without text being cut off?
- Tab through the links with the keyboard in a web-based client. Is the order sensible and is the focus visible?
- Turn on a screen reader (VoiceOver on Apple devices, TalkBack on Android, or NVDA on Windows) and listen to the first screen. Do the subject, preheader and opening make sense in order?
A callout is useful here, since this step is the one most teams skip.
The plain-text version
Most email platforms send a multipart message. That means one message carries two bodies: an HTML part and a plain-text part. The receiving client picks one. The plain-text part is also used by some screen readers and text-only clients, by smartwatches and notification previews in some cases, and by spam filters that compare the two parts. A message with no plain-text part, or with a part that does not match the HTML, can look suspicious to filters and leaves some readers with nothing usable.
Platforms often auto-generate the plain-text part from the HTML. Auto-generation is a starting point. Check it in a test send, because it can go wrong in these ways:
- Image-only content produces an empty or near-empty message.
- Buttons become bare, unlabelled URLs.
- Tracking URLs make long, unreadable strings.
- Layout tables leave stray blank lines or odd spacing.
- The unsubscribe link or postal address is missing or lost.
- The text is out of date because someone edited the HTML after the plain-text part was written by hand.
What a good plain-text part contains
- The same offer, message and call to action as the HTML, in the same order.
- Each link on its own line with a short label before it.
- The unsubscribe link and the legal footer, covered in a later chapter.
- Short lines and blank lines between sections, so it reads cleanly without styling.
- Personalization with fallback values, tested the same way as in the HTML part.
Spring sale: 20% off all shoes
Hello {{ first_name | default: "there" }},
Take 20% off all shoes until Sunday.
Shop the spring sale:
https://www.example.com/sale?utm_campaign=spring_sale
Unsubscribe: https://www.example.com/unsubscribe
Acme Ltd, 1 Example Street, ExampletonChecking the plain-text version
To see it, open the test message in a client and use its "view source" or "show original" option. This shows both parts. Confirm that the text part exists, reads well, and carries working links. Click the links in the text part as well, since they may be generated differently from the HTML links and may lack the tracking parameters you checked earlier.
Common errors and edge cases
| Problem | Why it happens | Fix |
|---|---|---|
| Screen reader reads file names | `alt` attribute missing | Add descriptive alt, or `alt=""` for decoration |
| Offer invisible with images off | Offer exists only in a banner image | Use live text for the offer |
| "Click here" repeated | Template buttons reuse a stock label | Write a specific label for each link |
| Plain text is empty | Content is all images | Write the text part by hand |
| Plain text out of date | Edited HTML after generation | Regenerate or edit, then send a new test |
| Text unreadable in dark mode | Client inverted colours | Test a dark-mode screenshot and adjust colours |
Some clients and platforms strip role, lang or heading tags. Verify in the received message source that your markup survived. Accessibility support also differs between clients, so treat a pass in one as evidence, not proof, and keep the checks you run on your own seed list.
Accessible email also tends to be better email. Live text, clear link labels and good contrast help every reader, and a clean plain-text part helps deliverability.
Exercises
Exercise
A test send shows the hero banner, a single image that contains the headline "Free delivery this weekend", with no alt attribute. Name two problems this causes and give one fix.
Show answer
With images blocked, the reader sees an empty box and loses the offer. A screen reader may read the file name or nothing. Fix it by adding alt="Free delivery this weekend". Better, put the headline in live HTML text over a background colour, and keep alt text for any supporting image.
Exercise
Your platform auto-generated the plain-text part. List three things you check in it before approving the send.
Show answer
Any three of these: it exists and is not empty; it matches the HTML offer and order; every link works and has a short label; tracking parameters are present where expected; the unsubscribe link and legal footer are included; the personalization fallback values work; it is not out of date after later HTML edits.