Warning:
This wiki has been archived and is now read-only.
SC1-1-1-img-group-alt Example
From Automated WCAG Monitoring Community Group
(Redirected from SC1-1-1-img-group-alt-example)
The following HTML example shows the limitations of the xpath selector used in SC1-1-1-img-group-alt.
The image group wrapped by the top-level <div> element will not be selected, because other elements than <img> are children of the <div>.
<div>
This is an exception - will also be selected, even if there are other elements than the group of images:
<img class="x" src="star1" alt="do" />
<img class="x" src="star1" alt="" />
<p>
Case 0: Single image - will not be selected:
<img src="star1" alt="3 out of 5 stars" />
</p>
<p>
Case 1: No alt - will not be selected:
<img class="1" src="star1" />
<img class="1" src="star2" />
<img class="1" src="star2" />
</p>
<p>
Case 2: Multiple alt - will not be selected:
<img class="2" src="star1" alt="3 out of 5 stars" />
<img class="2" src="star1" alt=" .,!" />
<img class="2" src="star1" alt="" />
</p>
<p>
<img class="2" src="star1" alt="3 out of 5 stars" />
<img class="2" src="star1" alt=" .,!" />
<img class="2" src="star2" alt="do" />
</p>
<p>
Case 3: One alt - This is correct:
<img class="3" src="star1" alt="" />
<img class="3" src="star1" alt="" />
<img class="3" src="star2" alt="do" />
</p>
<p>
Case 4: All alt empty - will not be selected:
<img class="4" src="star1" alt="" />
<img class="4" src="star2" alt="" />
<img class="4" src="star2" alt="" />
</p>
<p>
Case 5: One alt missing - will not be selected:
<img class="5" src="star1" alt="" />
<img class="5" src="star2" />
<img class="5" src="star2" alt="do" />
</p>
<p>
Case 6: Case 3 repeated:
<img class="6" src="star1" alt="" />
<img class="6" src="star1" alt="" />
<img class="6" src="star2" alt="do" />
</p>
<img class="x" src="star2" alt="" />
</div>