1.4.5 Images of Text
What
In the HTML markup, text must be presented as actual text instead of text embedded within an image. This ensures that the text can be resized, read by screen readers, and adapted to different user needs. Except for a few cases where embedding text within an image is essential for branding or design purposes, actual text improves accessibility and usability.
Why
Images of text can create significant barriers for accessibility because:
- Screen readers cannot interpret text inside images unless a text alternative (alt attribute) is provided.
- Users cannot adjust text size, font, or contrast when it is embedded in an image.
- Text in images may appear blurry or pixelated when users zoom in on it.
- Language translation tools cannot translate text in images.
Ensure that text:
Examples
This section provides some pass and fail examples of this success criteria.
Pass examples
Use HTML text instead of an image for headings:
<h1>Welcome to Our Website</h1>
- Why this works: The text can be selected, read by screen readers, and resized easily.
Use CSS to style text instead of embedding the text in an image:
<p style="font-family: Arial, sans-serif; font-size: 20px; font-weight: bold;">
Special Offer: 50% Off!
</p>
- Why this works: The text is real text and not an image. Therefore, it is more accessible.
Provide a text alternative when text in an image is necessary, such as for branding purposes:
<img src="company-logo.png" alt="CompanyName logo">
- Why this works: The logo is an essential image, and the alt text provides an accessible description.
Fail examples
How
This section provides some methods on how to review and fix the issue.
How to review it
- Identify all images on the page.
- Look for images that contain text-based content, and are not decorative or photographic elements.
- Determine if the text in the image is essential with the following questions:
- Is the text part of a logo or branding? ✅ (Allowed Exception).
- Can the text be presented in real text format instead? ✅ (Preferred Approach).
- Check for an appropriate text alternative. If the image must contain text, does it have an
alt attribute that accurately conveys the same information? - Use browser tools to inspect text accessibility with the following methods:
- Try to select the text in the image. If you cannot, it is likely inaccessible.
- Zoom in on the page and check if the text remains clear and readable.
How to fix it
Use real text instead of images whenever possible.
<h2 style="color: #ff5733;">Limited Time Offer: 30% Off!</h2>
Why this works: The text remains accessible and can be resized or read by screen readers.
Use CSS and SVG to create styled text.
.text-banner {
font-size: 24px;
font-weight: bold;
background: linear-gradient(to right, #ff7e5f, #feb47b);
color: white;
padding: 10px;
}
<p class="text-banner">Exclusive Sale – Limited Time Only!</p>
Why this works: The gradient effect is achieved with CSS, while the text remains selectable and accessible.
If an image of text is necessary, provide an accurate alt text.
<img src="event-promo.png" alt="Event Promo: Tech Conference 2025, Register Now!">
Why this works: The alt text conveys the same message as the image.
Additional resources
WCAG success criteria
1.4.5 Images of Text
Images of text
1.4.5 Images of Text
What
In the HTML markup, text must be presented as actual text instead of text embedded within an image. This ensures that the text can be resized, read by screen readers, and adapted to different user needs. Except for a few cases where embedding text within an image is essential for branding or design purposes, actual text improves accessibility and usability.
Why
Images of text can create significant barriers for accessibility because:
- Screen readers cannot interpret text inside images unless a text alternative (alt attribute) is provided.
- Users cannot adjust text size, font, or contrast when it is embedded in an image.
- Text in images may appear blurry or pixelated when users zoom in on it.
- Language translation tools cannot translate text in images.
Ensure that text:
Examples
This section provides some pass and fail examples of this success criteria.
Pass examples
Use HTML text instead of an image for headings:
<h1>Welcome to Our Website</h1>
- Why this works: The text can be selected, read by screen readers, and resized easily.
Use CSS to style text instead of embedding the text in an image:
<p style="font-family: Arial, sans-serif; font-size: 20px; font-weight: bold;">
Special Offer: 50% Off!
</p>
- Why this works: The text is real text and not an image. Therefore, it is more accessible.
Provide a text alternative when text in an image is necessary, such as for branding purposes:
<img src="company-logo.png" alt="CompanyName logo">
- Why this works: The logo is an essential image, and the alt text provides an accessible description.
Fail examples
How
This section provides some methods on how to review and fix the issue.
How to review it
- Identify all images on the page.
- Look for images that contain text-based content, and are not decorative or photographic elements.
- Determine if the text in the image is essential with the following questions:
- Is the text part of a logo or branding? ✅ (Allowed Exception).
- Can the text be presented in real text format instead? ✅ (Preferred Approach).
- Check for an appropriate text alternative. If the image must contain text, does it have an
alt attribute that accurately conveys the same information? - Use browser tools to inspect text accessibility with the following methods:
- Try to select the text in the image. If you cannot, it is likely inaccessible.
- Zoom in on the page and check if the text remains clear and readable.
How to fix it
Use real text instead of images whenever possible.
<h2 style="color: #ff5733;">Limited Time Offer: 30% Off!</h2>
Why this works: The text remains accessible and can be resized or read by screen readers.
Use CSS and SVG to create styled text.
.text-banner {
font-size: 24px;
font-weight: bold;
background: linear-gradient(to right, #ff7e5f, #feb47b);
color: white;
padding: 10px;
}
<p class="text-banner">Exclusive Sale – Limited Time Only!</p>
Why this works: The gradient effect is achieved with CSS, while the text remains selectable and accessible.
If an image of text is necessary, provide an accurate alt text.
<img src="event-promo.png" alt="Event Promo: Tech Conference 2025, Register Now!">
Why this works: The alt text conveys the same message as the image.
Additional resources
WCAG success criteria
1.4.5 Images of Text