Element

img

Error Type

Potential

Guidelines

  • Stanca Act
    Guideline GroupRequirement 3: Text Equivalents
  • WCAG 2.0 (Level A)
    Guideline Group1.1 Text Altrernatives: Provide text alternatives for any non-text content
    Guideline SubgroupSuccess Criteria 1.1.1 Non-text Content (A)
  • WCAG 2.0 (Level AA)
    Guideline Group1.1 Text Alternatives: Provide text alternatives for any non-text content
    Guideline SubgroupSuccess Criteria 1.1.1 Non-text Content (A)
  • WCAG 2.0 (Level AAA)
    Guideline Group1.1 Text Alternatives: Provide text alternatives for all non-text content
    Guideline SubgroupSuccess Criteria 1.1.1 Non-text Content (A)

Requirement

Alt text for all img elements is the empty string ("") if the image is decorative.

Error

Alt text is not empty and image may be decorative.

Short Description

Decorative images must have empty string ("") Alt text.

How To Determine

Question Is this image decorative?
PASS Image is not decorative.
FAIL Image is decorative.

Steps To Check

Procedure

1. Check each img element and view its Alt text.
2. Determine if the image is decorative.
3. Note: For this document, "decorative" is defined as "content that does not provide information, functionality, sensory experience and is neither multimedia nor time-dependent interactive".

Expected Result

1. Alt text for all img elements is the empty string ("") if the image is decorative.

Failed Result

1. Change the Alt text to an empty string ("") or confirm that
the image is not decorative.

Examples

Pass Examples

Image is decorative and Alt text is an empty string ("").
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>OAC Testfile - Check #16 - Negative</title>
</head>
<body>
<p>My poem requires a big space<img src="10pttab.gif" alt="" width="5" height="5"/>here.</p>
</body>
</html>

Fail Examples

Image is decorative and Alt text is not an empty string ("").
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>OAC Testfile - Check #16 - Positive</title>
</head>
<body>
<p>My poem requires a big space<img src="10pttab.gif" alt="big space" width="5" height="5"/>here.</p>
</body>
</html>
Web site engine's code is copyright © 2023
Inclusive Design Institute