W3C

ACT-R2 Validation Tests

Back to rule: ACT-R2

Elements with data-outcome="inapplicable" should be ignored by the rule. Elements with data-outcome="failed" should be returned as failed, and those with data-outcome="passed" should be passed. Other elements may match other rules, these results should be ignored for the purpose of this test file.

pass

Code Snippet:
<img src="../assets/sample-image.jpg"
  aria-describedby="img-desc1">
<div id="img-desc1">The sun is rising 
  over a jetty by a lake</div>
Example Output:
The sun is rising over a jetty by a lake
Code Snippet:
<img src="../assets/sample-image.jpg"
  aria-describedby="img-desc1 non-existing">
<div id="img-desc1">The sun is rising 
  over a jetty by a lake</div>
Example Output:
The sun is rising over a jetty by a lake
Code Snippet:
<object data="../assets/sample-image.jpg"
  aria-describedby="img-desc1"
  role="img"></object>
<div id="img-desc1">The sun is rising 
  over a jetty by a lake</div>
Example Output:
The sun is rising over a jetty by a lake

expectation-1-fail

Code Snippet:
<img src="../assets/sample-image.jpg"
  aria-describedby="123-invalid-ID">
Example Output:

expectation-2-fail

Code Snippet:
<img src="../assets/sample-image.jpg"
  aria-describedby="non-existing">
Example Output:

expectation-3-fail

Code Snippet:
<img src="../assets/sample-image.jpg"
  aria-describedby="bad-description">
<div id="bad-description">sample-image.jpg</div>
Example Output:
sample-image.jpg

Inapplicable

Code Snippet:
<img src="../assets/sample-image.jpg" alt="">
Example Output:
Code Snippet:
<img src="../assets/sample-image.jpg"
  alt="The image is described in the text below">
Example Output:
The image is described in the text below
Code Snippet:
<button aria-describedby="divdesc">Not an img</button>
<div id="divdesc">Description</div>
Example Output:
Description

Back to rule: ACT-R2