testaro 26.3.2 → 26.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/tests/testaro.js
CHANGED
|
@@ -13,6 +13,7 @@ const fs = require('fs/promises');
|
|
|
13
13
|
// ######## CONSTANTS
|
|
14
14
|
|
|
15
15
|
const evalRules = {
|
|
16
|
+
adbID: 'elements with ambiguous or missing referenced descriptions',
|
|
16
17
|
allCaps: 'leaf elements with entirely upper-case text longer than 7 characters',
|
|
17
18
|
allHidden: 'page that is entirely or mostly hidden',
|
|
18
19
|
allSlanted: 'leaf elements with entirely italic or oblique text longer than 39 characters',
|
|
@@ -34,6 +35,7 @@ const evalRules = {
|
|
|
34
35
|
hover: 'hover-caused content changes',
|
|
35
36
|
hovInd: 'hover indication nonstandard',
|
|
36
37
|
hr: 'hr element instead of styles used for vertical segmentation',
|
|
38
|
+
imageLink: 'links with image files as their destinations',
|
|
37
39
|
labClash: 'labeling inconsistencies',
|
|
38
40
|
legendLoc: 'legend elements that are not first children of fieldset elements',
|
|
39
41
|
lineHeight: 'text with a line height less than 1.5 times its font size',
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "adbID",
|
|
3
|
+
"what": "validation of adbID test",
|
|
4
|
+
"strict": true,
|
|
5
|
+
"timeLimit": 20,
|
|
6
|
+
"acts": [
|
|
7
|
+
{
|
|
8
|
+
"type": "launch",
|
|
9
|
+
"which": "chromium",
|
|
10
|
+
"url": "file://validation/tests/targets/adbID/index.html",
|
|
11
|
+
"what": "page with elements having good and bad description references"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"type": "test",
|
|
15
|
+
"which": "testaro",
|
|
16
|
+
"withItems": true,
|
|
17
|
+
"stopOnFail": true,
|
|
18
|
+
"expect": [
|
|
19
|
+
[
|
|
20
|
+
"standardResult.totals.0",
|
|
21
|
+
"=",
|
|
22
|
+
0
|
|
23
|
+
],
|
|
24
|
+
[
|
|
25
|
+
"standardResult.totals.3",
|
|
26
|
+
"=",
|
|
27
|
+
2
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"standardResult.instances.0.ruleID",
|
|
31
|
+
"=",
|
|
32
|
+
"adbID"
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"standardResult.instances.0.what",
|
|
36
|
+
"=",
|
|
37
|
+
"Referenced description of the element is ambiguous or missing"
|
|
38
|
+
],
|
|
39
|
+
[
|
|
40
|
+
"standardResult.instances.0.ordinalSeverity",
|
|
41
|
+
"=",
|
|
42
|
+
3
|
|
43
|
+
],
|
|
44
|
+
[
|
|
45
|
+
"standardResult.instances.0.tagName",
|
|
46
|
+
"=",
|
|
47
|
+
"SPAN"
|
|
48
|
+
],
|
|
49
|
+
[
|
|
50
|
+
"standardResult.instances.0.location.doc",
|
|
51
|
+
"=",
|
|
52
|
+
"dom"
|
|
53
|
+
],
|
|
54
|
+
[
|
|
55
|
+
"standardResult.instances.0.location.type",
|
|
56
|
+
"=",
|
|
57
|
+
"box"
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
"standardResult.instances.0.location.spec.height",
|
|
61
|
+
">",
|
|
62
|
+
0
|
|
63
|
+
],
|
|
64
|
+
[
|
|
65
|
+
"standardResult.instances.0.excerpt",
|
|
66
|
+
"=",
|
|
67
|
+
"the World Wide Web"
|
|
68
|
+
],
|
|
69
|
+
[
|
|
70
|
+
"standardResult.instances.1.what",
|
|
71
|
+
"=",
|
|
72
|
+
"Referenced description of the element is ambiguous or missing"
|
|
73
|
+
],
|
|
74
|
+
[
|
|
75
|
+
"standardResult.instances.1.tagName",
|
|
76
|
+
"=",
|
|
77
|
+
"LI"
|
|
78
|
+
],
|
|
79
|
+
[
|
|
80
|
+
"standardResult.instances.1.excerpt",
|
|
81
|
+
"=",
|
|
82
|
+
"Defect 2: United States of America"
|
|
83
|
+
],
|
|
84
|
+
[
|
|
85
|
+
"standardResult.instances.1.location.spec.y",
|
|
86
|
+
">",
|
|
87
|
+
0
|
|
88
|
+
]
|
|
89
|
+
],
|
|
90
|
+
"rules": [
|
|
91
|
+
"y",
|
|
92
|
+
"adbID"
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"type": "test",
|
|
97
|
+
"which": "testaro",
|
|
98
|
+
"withItems": false,
|
|
99
|
+
"stopOnFail": true,
|
|
100
|
+
"expect": [
|
|
101
|
+
[
|
|
102
|
+
"standardResult.totals.1",
|
|
103
|
+
"=",
|
|
104
|
+
0
|
|
105
|
+
],
|
|
106
|
+
[
|
|
107
|
+
"standardResult.totals.3",
|
|
108
|
+
"=",
|
|
109
|
+
2
|
|
110
|
+
],
|
|
111
|
+
[
|
|
112
|
+
"standardResult.instances.0.ruleID",
|
|
113
|
+
"=",
|
|
114
|
+
"adbID"
|
|
115
|
+
],
|
|
116
|
+
[
|
|
117
|
+
"standardResult.instances.0.what",
|
|
118
|
+
"=",
|
|
119
|
+
"Referenced descriptions of elements are ambiguous or missing"
|
|
120
|
+
],
|
|
121
|
+
[
|
|
122
|
+
"standardResult.instances.0.ordinalSeverity",
|
|
123
|
+
"=",
|
|
124
|
+
3
|
|
125
|
+
],
|
|
126
|
+
[
|
|
127
|
+
"standardResult.instances.0.count",
|
|
128
|
+
"=",
|
|
129
|
+
2
|
|
130
|
+
]
|
|
131
|
+
],
|
|
132
|
+
"rules": [
|
|
133
|
+
"y",
|
|
134
|
+
"adbID"
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"sources": {
|
|
139
|
+
"script": "",
|
|
140
|
+
"host": {},
|
|
141
|
+
"requester": ""
|
|
142
|
+
},
|
|
143
|
+
"creationTime": "2013-05-28T12:00:00",
|
|
144
|
+
"timeStamp": "00000"
|
|
145
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "imageLink",
|
|
3
|
+
"what": "validation of imageLink test",
|
|
4
|
+
"strict": true,
|
|
5
|
+
"timeLimit": 20,
|
|
6
|
+
"acts": [
|
|
7
|
+
{
|
|
8
|
+
"type": "launch",
|
|
9
|
+
"which": "chromium",
|
|
10
|
+
"url": "file://validation/tests/targets/imageLink/index.html",
|
|
11
|
+
"what": "page with links to web pages and to image files"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"type": "test",
|
|
15
|
+
"which": "testaro",
|
|
16
|
+
"withItems": true,
|
|
17
|
+
"stopOnFail": true,
|
|
18
|
+
"expect": [
|
|
19
|
+
[
|
|
20
|
+
"standardResult.totals.0",
|
|
21
|
+
"=",
|
|
22
|
+
4
|
|
23
|
+
],
|
|
24
|
+
[
|
|
25
|
+
"standardResult.totals.2",
|
|
26
|
+
"=",
|
|
27
|
+
0
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"standardResult.instances.length",
|
|
31
|
+
"=",
|
|
32
|
+
4
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"standardResult.instances.0.ruleID",
|
|
36
|
+
"=",
|
|
37
|
+
"imageLink"
|
|
38
|
+
],
|
|
39
|
+
[
|
|
40
|
+
"standardResult.instances.0.what",
|
|
41
|
+
"i",
|
|
42
|
+
"Link destination is an image file"
|
|
43
|
+
],
|
|
44
|
+
[
|
|
45
|
+
"standardResult.instances.0.ordinalSeverity",
|
|
46
|
+
"=",
|
|
47
|
+
0
|
|
48
|
+
],
|
|
49
|
+
[
|
|
50
|
+
"standardResult.instances.0.tagName",
|
|
51
|
+
"=",
|
|
52
|
+
"A"
|
|
53
|
+
],
|
|
54
|
+
[
|
|
55
|
+
"standardResult.instances.0.location.doc",
|
|
56
|
+
"=",
|
|
57
|
+
"dom"
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
"standardResult.instances.0.location.type",
|
|
61
|
+
"=",
|
|
62
|
+
"selector"
|
|
63
|
+
],
|
|
64
|
+
[
|
|
65
|
+
"standardResult.instances.0.location.spec",
|
|
66
|
+
"=",
|
|
67
|
+
"#mapGIF"
|
|
68
|
+
],
|
|
69
|
+
[
|
|
70
|
+
"standardResult.instances.0.excerpt",
|
|
71
|
+
"=",
|
|
72
|
+
"an animated map of the USA"
|
|
73
|
+
],
|
|
74
|
+
[
|
|
75
|
+
"standardResult.instances.2.ruleID",
|
|
76
|
+
"=",
|
|
77
|
+
"imageLink"
|
|
78
|
+
],
|
|
79
|
+
[
|
|
80
|
+
"standardResult.instances.3.excerpt",
|
|
81
|
+
"=",
|
|
82
|
+
"a bird"
|
|
83
|
+
]
|
|
84
|
+
],
|
|
85
|
+
"rules": [
|
|
86
|
+
"y",
|
|
87
|
+
"imageLink"
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"type": "test",
|
|
92
|
+
"which": "testaro",
|
|
93
|
+
"withItems": false,
|
|
94
|
+
"stopOnFail": true,
|
|
95
|
+
"expect": [
|
|
96
|
+
[
|
|
97
|
+
"standardResult.totals.0",
|
|
98
|
+
"=",
|
|
99
|
+
4
|
|
100
|
+
],
|
|
101
|
+
[
|
|
102
|
+
"standardResult.totals.1",
|
|
103
|
+
"=",
|
|
104
|
+
0
|
|
105
|
+
],
|
|
106
|
+
[
|
|
107
|
+
"standardResult.instances.length",
|
|
108
|
+
"=",
|
|
109
|
+
1
|
|
110
|
+
],
|
|
111
|
+
[
|
|
112
|
+
"standardResult.instances.0.ruleID",
|
|
113
|
+
"=",
|
|
114
|
+
"imageLink"
|
|
115
|
+
],
|
|
116
|
+
[
|
|
117
|
+
"standardResult.instances.0.count",
|
|
118
|
+
"=",
|
|
119
|
+
4
|
|
120
|
+
],
|
|
121
|
+
[
|
|
122
|
+
"standardResult.instances.0.what",
|
|
123
|
+
"=",
|
|
124
|
+
"Links have image files as their destinations"
|
|
125
|
+
],
|
|
126
|
+
[
|
|
127
|
+
"standardResult.instances.0.tagName",
|
|
128
|
+
"=",
|
|
129
|
+
"A"
|
|
130
|
+
]
|
|
131
|
+
],
|
|
132
|
+
"rules": [
|
|
133
|
+
"y",
|
|
134
|
+
"imageLink"
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"sources": {
|
|
139
|
+
"script": "",
|
|
140
|
+
"host": {},
|
|
141
|
+
"requester": ""
|
|
142
|
+
},
|
|
143
|
+
"creationTime": "2013-05-28T12:00:00",
|
|
144
|
+
"timeStamp": "00000"
|
|
145
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en-US">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>Page with good and bad ARIA description references</title>
|
|
6
|
+
<meta name="description" content="tester">
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<main>
|
|
11
|
+
<h1>Page with good and bad ARIA description references</h1>
|
|
12
|
+
<p>WAVE is an application that tests web pages for <span aria-describedby="a11yWhat">accessibility</span></p>
|
|
13
|
+
<p>Defect 1: MDN Web Docs is a website that documents the standards underlying <span aria-describedby="wwwWhat">the World Wide Web</span></p>
|
|
14
|
+
<p>The three largest countries in North America are:</p>
|
|
15
|
+
<ul>
|
|
16
|
+
<li>Canada</li>
|
|
17
|
+
<li aria-describedby="usaAlt">Defect 2: United States of America</li>
|
|
18
|
+
<li>Mexico</li>
|
|
19
|
+
</ul>
|
|
20
|
+
<p id="usaALT">The United States of America is often called <q>America</q>.</p>
|
|
21
|
+
<p id="a11yWhat">Accessibility is the quality of being designed and implemented for universal usability for users with a range of abilities and disabilities.</p>
|
|
22
|
+
<p id="usaALT">The United States of America is often called <q>USA</q>.</p>
|
|
23
|
+
</main>
|
|
24
|
+
</body>
|
|
25
|
+
</html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en-US">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>Page with links to web pages and images</title>
|
|
6
|
+
<meta name="description" content="tester">
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<main>
|
|
11
|
+
<h1>Page with links to web pages and images</h1>
|
|
12
|
+
<p>This is a link to <a href="https://urbaninstitute.github.io/r-at-urban/">a page containing an image</a>.</p>
|
|
13
|
+
<p>Defect 1: This is a link directly to a GIF image of <a id="mapGIF" href="https://urbaninstitute.github.io/r-at-urban/mapping/www/images/yay_maps.gif">an animated map of the USA</a>.</p>
|
|
14
|
+
<p>Defect 2: This is a link directly to a PNG image of <a id="mapPNG" href="https://upload.wikimedia.org/wikipedia/commons/f/f7/Blank_map_of_states.png">a map of the USA</a>.</p>
|
|
15
|
+
<p>Defect 3: This is a link directly to a JPG image of <a id="familyJPG" href="https://upload.wikimedia.org/wikipedia/commons/c/c9/-Family_Portrait-_MET_DT8784.jpg">a family</a>.</p>
|
|
16
|
+
<p>Defect 4: This is a link directly to an SVG image of <a id="birdSVG" href="https://upload.wikimedia.org/wikipedia/commons/b/b0/NewTux.svg">a bird</a>.</p>
|
|
17
|
+
</main>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|