testaro 5.0.1 → 5.1.0
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/tests/htmlcs.js +7 -6
package/package.json
CHANGED
package/tests/htmlcs.js
CHANGED
|
@@ -10,7 +10,7 @@ exports.reporter = async page => {
|
|
|
10
10
|
path: `${__dirname}/../htmlcs/HTMLCS.js`
|
|
11
11
|
});
|
|
12
12
|
let messageStrings = [];
|
|
13
|
-
for (const standard of ['
|
|
13
|
+
for (const standard of ['WCAG2AA']) {
|
|
14
14
|
const nextIssues = await page.evaluate(standard => HTMLCS_RUNNER.run(standard), standard);
|
|
15
15
|
messageStrings.push(... nextIssues);
|
|
16
16
|
}
|
|
@@ -38,13 +38,14 @@ exports.reporter = async page => {
|
|
|
38
38
|
descriptions that state the contrast ratio of an element, most descriptions are
|
|
39
39
|
generic, so typically many issues share a description.
|
|
40
40
|
*/
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
const issueCode = parts[1].replace(/^WCAG2|\.Principle\d\.Guideline[\d_]+/g, '');
|
|
42
|
+
if (! result[parts[0]][issueCode]) {
|
|
43
|
+
result[parts[0]][issueCode] = {};
|
|
43
44
|
}
|
|
44
|
-
if (! result[parts[0]][
|
|
45
|
-
result[parts[0]][
|
|
45
|
+
if (! result[parts[0]][issueCode][parts[4]]) {
|
|
46
|
+
result[parts[0]][issueCode][parts[4]] = [];
|
|
46
47
|
}
|
|
47
|
-
result[parts[0]][
|
|
48
|
+
result[parts[0]][issueCode][parts[4]].push({
|
|
48
49
|
tagName: parts[2],
|
|
49
50
|
id: parts[3],
|
|
50
51
|
code: parts[5]
|