Warning:
This wiki has been archived and is now read-only.
Moved permanently 11
Status
Contents
Description
This test checks that in groups of adjacent <img>
elements exactly one has an alt
attribute providing a sufficient description of the group.
Background
- G196: Using a text alternative on one item within a group of images that describes all items in the group
- H37: Using alt attributes on img elements
- H67: Using null alt text and no title attribute on img elements for images that AT should ignore
Assumptions
- This test makes no assumptions
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
earl:automatic
Selects all elements, which contain a group of adjacent <img>
elements, of which only one has a non-empty alt
attribute set.
Note that this will also select nodes that contain other elements beside the image group. See this example for clarification.
(: Select all nodes containing image elements with non-empty alt attribute, :)
//*[img[not(@alt=)]
(: with adjacent images with empty alt attributes :)
[following-sibling::*[1][self::img[@alt=]]
or preceding-sibling::*[1][self::img[@alt=]]]
(: if the node contains only one image element with non-empty alt attribute :)
and count(img[not(@alt=)]) = 1]
Step 1
earl:manual
Present the image group and the corresponding alt text to the user.
Question: Does the text sufficiently describe the image group?
if yes, return
Property | Value |
---|---|
TestCase | SC1-1-1-img-group-alt |
Identifier | SC1-1-1-img-group-alt-pass1 |
Outcome | passed |
Pointer | position |
Info |
else return
Property | Value |
---|---|
TestCase | SC1-1-1-img-group-alt |
Identifier | SC1-1-1-img-group-alt-fail1 |
Outcome | failed |
ErrorMessage | ALT attribute not sufficiently descriptive. |
Pointer | position |
Info |