Skip to main content
RAWEBA

1.1 Does each image conveying information have a text alternative?

WCAG references
  • 1.1.1 Non-text Content (A)
Techniques
  • F65
  • H24
  • H36
  • H37
  • H53

Official methodology to test criterion 1.1

Test 1 (1.1.1)

  1. Find in the document the images implemented using an <img> element or an element with the WAI-ARIA role="img" attribute.
  2. For each image, determine whether the image conveys information.
  3. If it is an <img> element, check that the image has at least one of the following text alternatives:
    • passage of text associated via the WAI-ARIA aria-labelledby attribute;
    • value of the WAI-ARIA aria-label attribute;
    • value of the alt attribute;
    • value of the title attribute.
  4. In the case of an element with the WAI-ARIA role="img" attribute, check that the image has at least one of the following text alternatives:
    • passage of text associated via the WAI-ARIA aria-labelledby attribute;
    • value of the WAI-ARIA aria-label attribute.
  5. If at least one text alternative is found, the test is validated.

Test 2 (1.1.2)

  1. Find in the document the <area> elements.
  2. For each <area> element, determine whether the image map area carries information.
  3. Check that the image map area has at least one of the following text alternatives:
    • value of the WAI-ARIA aria-label attribute;
    • value of the alt attribute;
  4. If at least one text alternative is found, the test is validated.

Test 3 (1.1.3)

  1. Find in the document the <input> elements with the type="image" attribute.
  2. For each <input> element with the attribute type="image", determine whether the image used conveys information.
  3. Check that the <input> element has at least one of the following text alternatives:
    • passage of text associated via the WAI-ARIA aria-labelledby attribute;
    • value of the WAI-ARIA aria-label attribute;
    • value of the alt attribute;
    • value of the title attribute.
  4. If at least one text alternative is found, the test is validated.

Test 4 (1.1.4)

  1. Find in the document the <img> elements with the ismap attribute.
  2. For each <img> element with the ismap attribute, check for the presence of a link or set of links (or another type of user interface component which plays a similar role, such as a combobox, for example) providing access to the same resources as when the image is clicked.
  3. If this is the case, the test is validated.

Test 5 (1.1.5)

  1. Find in the document the <svg> elements.
  2. For each <svg> element, determine whether the image conveys information.
  3. Check that the <svg> element has a WAI-ARIA role="img" attribute.
  4. If this is not the case, the test is invalidated.
  5. If necessary, check that the <svg> element has at least one of the following text alternatives:
    • value of the <title> element;
    • passage of text linked by the WAI-ARIA aria-labelledby attribute;
    • value of the WAI-ARIA aria-label attribute;
  6. If at least one text alternative is found, the test is validated.

Test 6 (1.1.6)

  1. Find in the document the opening <object> tags with the type="image/..." attribute.
  2. For each opening <object> tag with the type="image/..." attribute, determine whether the image used is conveying information.
  3. Check that the <object> element has a WAI-ARIA role="img" attribute.
  4. Check that the <object> element has at least one of the following text alternatives:
    • passage of text associated via the WAI-ARIA aria-labelledby attribute;
    • value of the WAI-ARIA aria-label attribute;
    • value of the title attribute.
  5. If at least one text alternative is found, the test is validated.
  6. Otherwise, check that:
    • either the <object> element is immediately followed by an adjacent link or button providing access to alternative content;
    • or a mechanism allows the user to replace the <object> element with alternative content.
  7. If this is the case, the test is validated.

Test 7 (1.1.7)

  1. For each <embed> element with the type="image/..." attribute, determine whether the image used is conveying information.
  2. Check that the <embed> element has a WAI-ARIA role="img" attribute.
  3. Check that the <embed> element has at least one of the following text alternatives:
    • passage of text associated via the WAI-ARIA aria-labelledby attribute;
    • value of the WAI-ARIA aria-label attribute;
    • value of the title attribute.
  4. If at least one text alternative is found, the test is validated.
  5. Otherwise, check that:
    • either the <object> element is immediately followed by an adjacent link or button providing access to alternative content;
    • or a mechanism allows the user to replace the <object> element with alternative content.
  6. If this is the case, the test is validated.

Test 8 (1.1.8)

  1. Find <canvas> elements in the document.
  2. For each <canvas> element, determine whether the image used conveys information.
  3. Check that the <canvas> element has a WAI-ARIA role="img" attribute.
  4. Check that the opening <canvas> tag has at least one of the following text alternatives:
    • passage of text associated via the WAI-ARIA aria-labelledby attribute;
    • value of the WAI-ARIA aria-label attribute.
  5. If at least one text alternative is found, the test is validated.
  6. If steps 3 and 4 are not satisfied, check that:
    • either the <canvas> element has alternative content between the <canvas> and </canvas> tags;
    • or the <canvas> element is immediately followed by an adjacent link or button providing access to alternative content;
    • or a mechanism allows the user to replace the <canvas> element with alternative content.
  7. If this is the case, the test is validated.

Note: if the <canvas> element has an img role, its alternative can only be provided by the techniques listed in step 4.