Skip to content
easeweb
Search topics

Images of text instead of real HTML text

A shop draws its size chart and shipping cut-off into a product image: the alt text is right, but on a phone the lettering shrinks with the picture, and nobody can enlarge, restyle or translate it.

WCAG 2.2
SC 1.4.5AA
Required by
Section 508 · EN 301 549 (EU)
Broken <img src="linen-shirt-details.png" alt="Size guide in cm. S: chest 96…">
The accessibility problem illustrated: On a phone, the chart shrinks with the picture.
01

The problem

Shoppers can't enlarge, restyle or translate a size chart drawn into an image, and on a phone it shrinks too small to read.

02

Try it

Narrow the screen to phone width and find your size.

Drag the Screen width slider to 320px. Can you still read the chest measurement for M, and when your order ships?

640px

Broken Can you fix this?

Linen shirt

¥8,800

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Move the chart and the notice out of the image into an HTML table and a paragraph, styled with CSS.

  1. 1Tables, prices, dates and notices are HTML text, never lettering in an image.
  2. 2Give them their look with CSS and web fonts, sized in rem or em.
  3. 3Keep images for photos, diagrams and logos, with words only as short labels.
Before The chart and the notice drawn into one image
<img src="/img/linen-shirt-details.png" width="640" height="400"  alt="Size guide in cm. S: chest 96, length 68, sleeve 20. M: chest 102, length 70, sleeve 21. L: chest 108, length 72, sleeve 22. Order by 15:00 and we ship the same day.">
After The same panel, as a real table and a paragraph
<section class="size-guide"><table>  <caption>Size guide (cm)</caption>  <thead>    <tr><th scope="col">Size</th><th scope="col">Chest</th><th scope="col">Length</th><th scope="col">Sleeve</th></tr>  </thead>  <tbody>    <tr><th scope="row">S</th><td>96</td><td>68</td><td>20</td></tr>    <tr><th scope="row">M</th><td>102</td><td>70</td><td>21</td></tr>    <tr><th scope="row">L</th><td>108</td><td>72</td><td>22</td></tr>  </tbody></table><p class="ship">Order by 15:00 and we ship the same day.</p></section>

Why this fix: Keep words as text

Fixing this with an AI coding assistant? Get this guide as Markdown

04

Verify the fix

5 checks, no mouse.

Test with: Zoom, Forced colors

0 of 5 checked

Record the OS, browser and assistive-technology versions, the build, the date, and the actual result of each step. Repeat whenever a product template or the description editor changes.

Limits

This is a starting pattern, not a guarantee for every application. Paths, colours and class names in the snippets are placeholders. Whether a remaining image counts as a logo, or as a photo or diagram whose words are only labels, is a judgement, so keep it in your design and publishing review. Test the complete journey with your real products on real phones.

This is a recreated teaching example, not a finding about a named client. The code is a starting pattern: test it in your own product. No completed assistive-technology test is claimed here.

Keep this fixed as your code changes.

Turn guides like this into rules your coding agents and CI follow, then have the result retested with a keyboard and screen readers.

How retests work