# Images of Text: Use Real Text Instead

Source: https://allyway.ai/glossary/images-of-text

Images of Text is WCAG success criterion 1.4.5. If the technology can achieve the same visual presentation, information is conveyed with real text rather than with text rendered into an image – unless the image can be customized or the presentation is essential.

Images of text are words that were rendered into a picture – a banner with the sale price in the JPG, a heading exported as a PNG, a menu made of image buttons. WCAG asks you to use real text instead whenever HTML and CSS can create the same look. Real text can be enlarged sharply, recolored, spaced out and translated; text in images cannot.

## What it means

[WCAG 1.4.5 Images of Text](https://www.w3.org/WAI/WCAG22/Understanding/images-of-text.html) is a Level AA criterion of [WCAG 2.2](https://allyway.ai/regulations/wcag-2-2). If the technologies being used can achieve the visual presentation, text is used to convey information rather than images of text. There are two exceptions:

| Exception | What it covers | Example |
|---|---|---|
| Customizable | The image of text can be visually customized to the user's requirements – font, size, color and background can be set | A server-generated image with controls for size and colors |
| Essential | A particular presentation of text is essential to the information | A logo or brand name (logotypes count as essential), a font specimen |

W3C also says what is not an image of text: text that is part of a picture with significant other visual content, such as graphs, screenshots and diagrams that convey important information through more than just text.

People who benefit: people with low vision who change font, size and colors; people with visual tracking problems who adjust line spacing and alignment; and people with cognitive disabilities who restyle text so they can read it. Text in a picture blurs when zoomed, ignores [text spacing](https://allyway.ai/glossary/text-spacing) settings and often breaks [reflow](https://allyway.ai/glossary/reflow) on small screens.

> **Note:** > **Alt text does not make an image of text acceptable**
> Every informative image needs [alt text](https://allyway.ai/glossary/alt-text) (1.1.1) – but alt text only helps screen reader users. 1.4.5 is about people who look at the page and need to adapt how the text looks. A banner with good alt text can still fail 1.4.5.

## Examples

```html title="Example"
<!-- Bad: the offer exists only as pixels -->
<img src="autumn-sale-banner.jpg" alt="Autumn sale: 30% off all jackets until Sunday">

<!-- Good: photo as background, the offer as real text -->
<section class="promo">
  <img src="jackets.jpg" alt="">
  <h2>Autumn sale</h2>
  <p>30% off all jackets until Sunday</p>
</section>

<style>
  .promo h2 { font: 700 2.5rem/1.1 "Playfair Display", serif; color: #fff;
              text-shadow: 0 2px 6px rgba(0,0,0,.6); }
</style>
```

Web fonts, CSS shadows, gradients and rotation (W3C technique C22) create almost every look that once needed a graphic. Where a designer insists on a picture, W3C technique C30 lets users switch it to real text.

**Do:** Do

Write headings, buttons, prices and quotes as HTML text, style them with CSS and web fonts, keep logos as images with alt text, and publish the text of posters or flyers on the page as well.

**Don't:** Don't

Export headings or navigation as PNGs, put opening hours or prices only inside a slider image, or scan a document and upload it as a picture without real text.

## How to check images of text



## Questions

Q: Is text in images allowed under WCAG?
A: Only in exceptions: when users can customize how the text looks, or when a particular presentation is essential, such as a logo. Otherwise WCAG 1.4.5 asks for real text whenever HTML and CSS can create the same look.

Q: Are logos images of text?
A: Yes, but they are allowed. W3C counts logotypes – text that is part of a logo or brand name – as essential, so they may stay images. They still need alt text.

Q: Do charts and screenshots count as images of text?
A: No, if they contain significant other visual content. W3C excludes graphs, screenshots and diagrams that convey important information through more than just text. Describe their key information in text near the image.

Q: Is good alt text enough for a text banner?
A: No. Alt text helps screen reader users, but sighted people with low vision still cannot enlarge, recolor or space out text in a picture. Put the offer on the page as real text and keep the photo as background.
