Warning:
This wiki has been archived and is now read-only.

Moved permanently 10

From Automated WCAG Monitoring Community Group
(Redirected from SC1-1-1-img-empty-alt)
Jump to: navigation, search

Status

Version 0: For review

Description

This test checks that <img> elements providing an empty alt attribute are solely for decorative purposes or part of a group of images, of which one provides a sufficient text alternative. Furthermore, it tests if the title attribute is not set.

  • The value of an alt attribute may be null,
    • if the image is solely for decorative purposes.
    • if the image is part of a group of images and one adjacent item contains the text alternative for the group.
    • if the image is part of a link and the link-text is sufficiently descriptive.
    • if a non empty aria-label attribute is set.
    • if a aria-labelledby attribute is set pointing to a non empty element.
  • If the value of the alt attribute is null and the image is solely for decorative purposes, the title attribute must be not set or empty.

Background

Assumptions

  • The selector //img[@alt=""] matches the null value or the empty string, it does not match the negation of non-empty.
Open question: Is provision of an aria-label or aria-labelledby attribute sufficient and should be handled here?

"Please note that dropping the alt attribute and replacing it with aria-label is not a recommended practice. The alt attribute is still required for images and omitting it will result in a validation error. Ommitting the alt attribute will also cause severe problems for people still stuck with equipment and older browsers / screen readers that do not (sufficiently) support ARIA."


Test properties

Property Possible values
Success Criterion 1.1.1 Non-text Content
Test mode SemiAuto
Test environment rendered page
Test subject web page state

Test procedure

Selector

Test mode: earl:automatic


//img[@alt=""]

Step 1

Test mode: earl:automatic


Check if the <img> element has adjacent siblings of type <img>, of which one has a non-empty alt attribute.

if yes, continue with #Step 2

else continue with #Step 3

Step 2

Test mode: earl:manual


Present the image in context with the other images of the group and their corresponding alternative text to the user.
Question: Does the text sufficiently describe the image group?

Open question: Is this question misleading, because answers may be inaccurate?
Open question: Maybe this should be handled by a reference to img-with-alt (because it is a very similar method)

if yes, return

Property Value
TestCase SC1-1-1-img-empty-alt
Identifier SC1-1-1-img-empty-alt-pass1
Outcome passed
Pointer position
Info


else return

Property Value
TestCase SC1-1-1-img-empty-alt
Identifier SC1-1-1-img-empty-alt-fail1
Outcome failed
ErrorMessage ALT attribute not sufficiently descriptive.
Pointer position
Info


Step 3

Test mode: earl:automatic


Check if the <img> element has a non-empty <aria-label> attribute.

if yes, continue with #Step 6

else continue with #Step 4

Step 4

Test mode: earl:automatic


Check if the <img> element has a non-empty <aria-labelledby> attribute.

if yes, continue with #Step 6

else continue with #Step 7

Step 5

Test mode: earl:automatic


Check if the <img> element is part of an a element containing additional text.

if yes, continue with #Step 6

else continue with #Step 7

Step 6

Test mode: earl:manual


Present the image and the corresponding alternative text to the user.
Question: Does the text sufficiently describe the image? Is there any textual information contained in the image and is this information also written in the text?

Open question: Is this question misleading, because answers may be inaccurate?
Open question: Maybe this should be handled by a reference to img-with-alt (because it is a very similar method)

if yes, return

Property Value
TestCase SC1-1-1-img-empty-alt
Identifier SC1-1-1-img-empty-alt-pass2
Outcome passed
Pointer position
Info


else return

Property Value
TestCase SC1-1-1-img-empty-alt
Identifier SC1-1-1-img-empty-alt-fail2
Outcome failed
ErrorMessage ALT attribute not sufficiently descriptive.
Pointer position
Info


Step 7

Test mode: earl:manual


Present the image to the user.
Question: Is this image solely for decorative purposes and does not contain information?

Open question: Is this question misleading, because answers may be inaccurate?

if yes, continue with #Step 8

else return

Property Value
TestCase SC1-1-1-img-empty-alt
Identifier SC1-1-1-img-empty-alt-fail3
Outcome failed
ErrorMessage Empty ALT attribute on image with informational content.
Pointer position
Info


Step 8

Test mode: earl:automatic


Check if the <img> element has a non-empty <title> attribute.

if yes, return

Property Value
TestCase SC1-1-1-img-empty-alt
Identifier SC1-1-1-img-empty-alt-fail4
Outcome failed
ErrorMessage Non-empty title attribute combined with empty ALT attribute on image with no informational content.
Pointer position
Info


else return

Property Value
TestCase SC1-1-1-img-empty-alt
Identifier SC1-1-1-img-empty-alt-pass3
Outcome passed
Pointer position
Info