Skip to content
easeweb
Search topics

Images of text instead of real HTML text

A shop draws its size chart into a product image: the alt text is right, but the text shrinks on a phone 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: Low vision:I can't read the size chart.
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?

Simulate
640px

Broken Can you fix this?

BrokenThe chart and the notice drawn into one image

Linen shirt

¥8,800

A recreated demo. The broken version is intentionally inaccessible.

03

The fix

Put the words and figures on the page as real text

Before
BrokenThe 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.">
What is wrong3 points
  • On a phone the chart is too small to read. The picture shrinks with the screen, and its 16-pixel lettering shrinks to about 8 pixels.
  • A larger text setting, dark mode, the reader's own colours or spacing, and translation all leave the chart as it was. Its words exist only as pixels.
  • Nobody can select the figures or find them in the page. The alt text gives the words to screen readers only.
After
FixThe 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>
How it is fixed3 steps
  1. Replace the image and its long alt text with a real table, with a caption, a header for each column and a header for each size. The table says it all, and screen readers can now read the chart cell by cell with its headers instead of as one long sentence.
  2. Write the shipping notice as a paragraph after it.
  3. Draw the panel, the bold title, the shaded header row, the rules between rows and the red line with CSS, so the page looks as the image did at full width.

This fixes the Before and passes 1.4.5. The figures are now text: on a phone the four columns fit at full size, the phone's larger text setting enlarges them, dark mode and forced colors recolour them, and find in page and translation work on them.

Why this fix: Keep words as text

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. Level AA also lets a picture of text through when it shows a font the site has no right to embed; Level AAA doesn't, as headings set as pictures of text in a brand font shows. 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.

EaseWeb service

Fixed it? Keep it from coming back.

I turn guides like this one into rules your coding agents follow and checks your CI runs. Then I retest by hand with a keyboard and screen readers, periodically.

See the service