testaro 5.0.0 → 5.0.1
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 +1 -1
- package/samples/scripts/tp12.json +162 -0
- package/tests/htmlcs.js +11 -6
package/package.json
CHANGED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "tp12",
|
|
3
|
+
"what": "Alfa, Axe, HTML CodeSniffer, IBM, Tenon, WAVE, and 16 custom tests",
|
|
4
|
+
"strict": true,
|
|
5
|
+
"commands": [
|
|
6
|
+
{
|
|
7
|
+
"type": "launch",
|
|
8
|
+
"which": "webkit",
|
|
9
|
+
"what": "Webkit browser"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"type": "url",
|
|
13
|
+
"which": "https://*",
|
|
14
|
+
"what": "any page"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"type": "tenonRequest",
|
|
18
|
+
"id": "a",
|
|
19
|
+
"withNewContent": true,
|
|
20
|
+
"what": "Tenon API version 2 test request"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"type": "test",
|
|
24
|
+
"which": "motion",
|
|
25
|
+
"what": "spontaneous change of content; requires webkit",
|
|
26
|
+
"delay": 2500,
|
|
27
|
+
"interval": 2500,
|
|
28
|
+
"count": 5
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"type": "launch",
|
|
32
|
+
"which": "chromium",
|
|
33
|
+
"what": "Chromium browser"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"type": "url",
|
|
37
|
+
"which": "https://*",
|
|
38
|
+
"what": "any page"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "test",
|
|
42
|
+
"which": "bulk",
|
|
43
|
+
"what": "count of visible elements"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"type": "test",
|
|
47
|
+
"which": "embAc",
|
|
48
|
+
"withItems": true,
|
|
49
|
+
"what": "active elements incorrectly embedded in each other"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"type": "test",
|
|
53
|
+
"which": "focAll",
|
|
54
|
+
"what": "Tab-focusability"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"type": "test",
|
|
58
|
+
"which": "focInd",
|
|
59
|
+
"revealAll": false,
|
|
60
|
+
"allowedDelay": 250,
|
|
61
|
+
"withItems": true,
|
|
62
|
+
"what": "focus indicators"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "test",
|
|
66
|
+
"which": "focOp",
|
|
67
|
+
"withItems": true,
|
|
68
|
+
"what": "focusability and operability of elements"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "test",
|
|
72
|
+
"which": "hover",
|
|
73
|
+
"headSize": 20,
|
|
74
|
+
"headSampleSize": 20,
|
|
75
|
+
"tailSampleSize": 15,
|
|
76
|
+
"withItems": true,
|
|
77
|
+
"what": "hover impacts"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"type": "test",
|
|
81
|
+
"which": "labClash",
|
|
82
|
+
"withItems": true,
|
|
83
|
+
"what": "unlabeled and mislabeled form controls"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"type": "test",
|
|
87
|
+
"which": "linkUl",
|
|
88
|
+
"withItems": true,
|
|
89
|
+
"what": "underlining of inline links"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"type": "test",
|
|
93
|
+
"which": "menuNav",
|
|
94
|
+
"withItems": true,
|
|
95
|
+
"what": "keyboard navigation within true-focus menus"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"type": "test",
|
|
99
|
+
"which": "radioSet",
|
|
100
|
+
"withItems": true,
|
|
101
|
+
"what": "grouping of radio buttons in fieldsets"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"type": "test",
|
|
105
|
+
"which": "role",
|
|
106
|
+
"what": "validity and necessity of role assignments"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"type": "test",
|
|
110
|
+
"which": "styleDiff",
|
|
111
|
+
"withItems": true,
|
|
112
|
+
"what": "style consistency of headings, buttons, and links"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"type": "test",
|
|
116
|
+
"which": "tabNav",
|
|
117
|
+
"withItems": true,
|
|
118
|
+
"what": "keyboard navigation within tab lists"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"type": "test",
|
|
122
|
+
"which": "zIndex",
|
|
123
|
+
"withItems": true,
|
|
124
|
+
"what": "elements with non-auto z indexes"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"type": "test",
|
|
128
|
+
"which": "alfa",
|
|
129
|
+
"what": "Siteimprove alfa"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"type": "test",
|
|
133
|
+
"which": "axe",
|
|
134
|
+
"detailLevel": 2,
|
|
135
|
+
"rules": [],
|
|
136
|
+
"what": "Axe core, all rules"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"type": "test",
|
|
140
|
+
"which": "htmlcs",
|
|
141
|
+
"what": "HTML CodeSniffer"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"type": "test",
|
|
145
|
+
"which": "ibm",
|
|
146
|
+
"withItems": true,
|
|
147
|
+
"what": "IBM Accessibility Checker, with page content and again with URL"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"type": "test",
|
|
151
|
+
"which": "tenon",
|
|
152
|
+
"id": "a",
|
|
153
|
+
"what": "Tenon API version 2 result retrieval"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"type": "test",
|
|
157
|
+
"which": "wave",
|
|
158
|
+
"reportType": 4,
|
|
159
|
+
"what": "WAVE, report-type 4"
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
}
|
package/tests/htmlcs.js
CHANGED
|
@@ -32,14 +32,19 @@ exports.reporter = async page => {
|
|
|
32
32
|
}
|
|
33
33
|
// If it is an error or a warning (not a notice):
|
|
34
34
|
else if (['Error', 'Warning'].includes(parts[0])) {
|
|
35
|
-
|
|
35
|
+
/*
|
|
36
|
+
Add the issue to an issueClass.issueCode.description array in the result.
|
|
37
|
+
This saves space, because, although some descriptions are issue-specific, such as
|
|
38
|
+
descriptions that state the contrast ratio of an element, most descriptions are
|
|
39
|
+
generic, so typically many issues share a description.
|
|
40
|
+
*/
|
|
36
41
|
if (! result[parts[0]][parts[1]]) {
|
|
37
|
-
result[parts[0]][parts[1]] = {
|
|
38
|
-
description: parts[4],
|
|
39
|
-
issues: []
|
|
40
|
-
};
|
|
42
|
+
result[parts[0]][parts[1]] = {};
|
|
41
43
|
}
|
|
42
|
-
result[parts[0]][parts[1]]
|
|
44
|
+
if (! result[parts[0]][parts[1]][parts[4]]) {
|
|
45
|
+
result[parts[0]][parts[1]][parts[4]] = [];
|
|
46
|
+
}
|
|
47
|
+
result[parts[0]][parts[1]][parts[4]].push({
|
|
43
48
|
tagName: parts[2],
|
|
44
49
|
id: parts[3],
|
|
45
50
|
code: parts[5]
|