-
Notifications
You must be signed in to change notification settings - Fork 1
/
AX_01-test.html
38 lines (29 loc) · 1.34 KB
/
AX_01-test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<html>
<head>
<title></title>
<!--Loading all script tags in the head for now -->
<script src="dist/a11y-auditor.min.js"></script>
<script>
window.onload = function(){
console.log(window.auditRunner.run('img'));
}
</script>
</head>
<body>
<div>
<div></div>
</div>
<!-- PASSED : because it has a valid ALT attribute-->
<img alt="jquery" src="http://api.jquery.com/jquery-wp-content/themes/jquery/images/logo-jquery.png" id="img_1"></img>
<!-- Failed because of no ALT nor valid ROLE attribute-->
<img src="http://api.jquery.com/jquery-wp-content/themes/jquery/images/logo-jquery.png" id="img_2"></img>
<!-- PASSED WITH WARNING. As ALT attribute exist but its empty -->
<img alt="" src="http://api.jquery.com/jquery-wp-content/themes/jquery/images/logo-jquery.png" id="img_3"></img>
<!-- PASSED. Has a valid ROLE attribute -->
<img src="http://api.jquery.com/jquery-wp-content/themes/jquery/images/logo-jquery.png" role="presentation" id="img_4"></img>
<!-- Failed because of invalid role attribute and -->
<img src="http://api.jquery.com/jquery-wp-content/themes/jquery/images/logo-jquery.png" role="xcvdfer" id="img_6"></img>
<!-- Failed because it has no role nor alt attribute -->
<img src="http://api.jquery.com/jquery-wp-content/themes/jquery/images/logo-jquery.png" id="img_5"></img>
</body>
</html>