testilo 3.2.0 → 3.4.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/README.md +33 -3
- package/compare.js +8 -8
- package/package.json +1 -1
- package/procs/compare/cp0/index.html +10 -5
- package/procs/compare/cp0/index.js +2 -4
- package/procs/compare/cp1/index.html +46 -0
- package/procs/compare/cp1/index.js +71 -0
- package/procs/digest/dp10a/index.html +3 -3
- package/procs/digest/dp10b/index.html +74 -0
- package/procs/digest/dp10b/index.js +130 -0
- package/procs/digest/dp10c/index.html +55 -0
- package/procs/digest/dp10c/index.js +129 -0
- package/procs/score/sp10b.js +507 -0
- package/procs/score/sp10c.js +465 -0
- package/reports/comparative/railsites.html +47 -0
- package/reports/comparative/style.css +4 -0
- package/reports/digested/35k1r-railpass.html +1130 -844
- package/reports/digested/3aee6-eurail.html +36233 -0
- package/reports/digested/dp10a/35k1r-railpass.html +9302 -0
- package/reports/digested/dp10a/3aee6-eurail.html +35782 -0
- package/reports/digested/style.css +2 -2
- package/reports/raw/3aee6-eurail.json +35250 -0
- package/reports/scored/35k1r-railpass.json +559 -175
- package/reports/scored/3aee6-eurail.json +35957 -0
- package/score.js +1 -1
- package/scoring/data/duplications.json +22 -22
- package/scoring/data/groups.json +335 -0
- package/scoring/data/packageRules/alfa.tsv +82 -0
- package/scoring/data/packageRules/axe.js +390 -0
- package/scoring/data/packageRules/ibm.tsv +159 -0
- package/scoring/data/packageRules/tenon.tsv +14 -0
- package/scoring/data/packageRules/wave.json +1617 -0
- package/scoring/data/packageRules/wave.tsv +55 -0
- package/scoring/data/testGroups.json +1067 -0
- package/scoring/{data → procs}/correlation.js +0 -0
- package/scoring/{data → procs}/dupCounts.js +0 -0
- package/scoring/procs/groups.js +61 -0
- package/scoring/{data → procs}/packageData.js +0 -0
- package/scoring/{data → procs}/packageIssues.js +0 -0
- package/scoring/procs/regroup.js +39 -0
- package/reports/comparative/35k1r-.html +0 -41
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*
|
|
2
|
+
groups
|
|
3
|
+
Converts duplications.json to groups.json.
|
|
4
|
+
*/
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
// Initialize an array of groups.
|
|
7
|
+
const groups = [];
|
|
8
|
+
// Returns the group that an issue belongs to.
|
|
9
|
+
const getGroupIndex = (package, issueID) => {
|
|
10
|
+
return groups.findIndex(group => group[package] && group[package].includes(issueID));
|
|
11
|
+
};
|
|
12
|
+
// Assign an issue to a group.
|
|
13
|
+
const addToGroup = (package, issue, index) => {
|
|
14
|
+
if (groups[index][package]) {
|
|
15
|
+
groups[index][package].push(issue);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
groups[index][package] = [issue];
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const compile = () => {
|
|
22
|
+
const dupsJSON = fs.readFileSync(`${__dirname}/../data/duplications.json`, 'utf8');
|
|
23
|
+
const dups = JSON.parse(dupsJSON);
|
|
24
|
+
// For each pair of packages:
|
|
25
|
+
const packagePairs = Object.keys(dups);
|
|
26
|
+
packagePairs.forEach(packagePair => {
|
|
27
|
+
const packages = packagePair.split('_');
|
|
28
|
+
// For each issue in the first package:
|
|
29
|
+
Object.keys(dups[packagePair]).forEach(issueA => {
|
|
30
|
+
const groupIndexA = getGroupIndex(packages[0], issueA);
|
|
31
|
+
const issueB = Object.keys(dups[packagePair][issueA])[0];
|
|
32
|
+
const groupIndexB = getGroupIndex(packages[1], issueB);
|
|
33
|
+
// If both issues belong to groups and the groups differ:
|
|
34
|
+
if (groupIndexA > -1 && groupIndexB > -1 && groupIndexB !== groupIndexA) {
|
|
35
|
+
// Report the discrepancy.
|
|
36
|
+
console.log(`Inspect ${packages[0]} ${issueA} and ${packages[1]} ${issueB}`);
|
|
37
|
+
}
|
|
38
|
+
// Otherwise, if only the first issue belongs to a group:
|
|
39
|
+
else if (groupIndexA > -1 && groupIndexB === -1) {
|
|
40
|
+
// Assign the second issue to that group.
|
|
41
|
+
addToGroup(packages[1], issueB, groupIndexA);
|
|
42
|
+
}
|
|
43
|
+
// Otherwise, if only the second issue belongs to a group:
|
|
44
|
+
else if (groupIndexA === -1 && groupIndexB > -1) {
|
|
45
|
+
// Assign the first issue to that group.
|
|
46
|
+
addToGroup(packages[0], issueA, groupIndexB);
|
|
47
|
+
}
|
|
48
|
+
// Otherwise, if neither issue belongs to a group:
|
|
49
|
+
else if (groupIndexA === -1 && groupIndexB === -1) {
|
|
50
|
+
// Create a group and add both issues to it.
|
|
51
|
+
groups.push({
|
|
52
|
+
[packages[0]]: [issueA],
|
|
53
|
+
[packages[1]]: [issueB]
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
return groups;
|
|
59
|
+
};
|
|
60
|
+
fs.writeFileSync(`${__dirname}/../data/groups.json`, JSON.stringify(compile(), null, 2));
|
|
61
|
+
console.log(`File groups.json, containing ${groups.length} groups, created`);
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
regroup
|
|
3
|
+
Converts groups.json to testGroups.json.
|
|
4
|
+
*/
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
// Initialize the data.
|
|
7
|
+
const data = {
|
|
8
|
+
tests: {},
|
|
9
|
+
groups: {}
|
|
10
|
+
};
|
|
11
|
+
const compile = () => {
|
|
12
|
+
// Add the groups to the data.
|
|
13
|
+
const groupsJSON = fs.readFileSync(`${__dirname}/../data/groups.json`, 'utf8');
|
|
14
|
+
const groups = JSON.parse(groupsJSON);
|
|
15
|
+
data.groups = groups;
|
|
16
|
+
// For each group:
|
|
17
|
+
const groupIDs = Object.keys(groups);
|
|
18
|
+
groupIDs.forEach(groupID => {
|
|
19
|
+
// Add its tests to the data.
|
|
20
|
+
const packageIDs = Object.keys(groups[groupID]);
|
|
21
|
+
packageIDs.forEach(packageID => {
|
|
22
|
+
const tests = groups[groupID][packageID];
|
|
23
|
+
tests.forEach(test => {
|
|
24
|
+
const testID = test.replace(/ .+/, '');
|
|
25
|
+
const what = test.replace(/^[^ ]+ /, '');
|
|
26
|
+
if (! data.tests[packageID]) {
|
|
27
|
+
data.tests[packageID] = {};
|
|
28
|
+
}
|
|
29
|
+
data.tests[packageID][testID] = {
|
|
30
|
+
groupID,
|
|
31
|
+
what
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
return data;
|
|
37
|
+
};
|
|
38
|
+
fs.writeFileSync(`${__dirname}/../data/testGroups.json`, JSON.stringify(compile(), null, 2));
|
|
39
|
+
console.log(`File testGroups.json created`);
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE HTML>
|
|
2
|
-
<html lang="en-US">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
-
<meta name="author" content="Testilo">
|
|
7
|
-
<meta name="creator" content="Testilo">
|
|
8
|
-
<meta name="publisher" name="Testilo">
|
|
9
|
-
<meta name="description" content="comparison of accessibility scores from tsp10 procedure">
|
|
10
|
-
<meta name="keywords" content="accessibility a11y web testing">
|
|
11
|
-
<title>Accessibility score comparison</title>
|
|
12
|
-
<link rel="icon" href="favicon.png">
|
|
13
|
-
<link rel="stylesheet" href="style.css">
|
|
14
|
-
</head>
|
|
15
|
-
<body>
|
|
16
|
-
<main>
|
|
17
|
-
<header>
|
|
18
|
-
<h1>Accessibility score comparison</h1>
|
|
19
|
-
</header>
|
|
20
|
-
<h2>Introduction</h2>
|
|
21
|
-
<p>The <code>tp10</code> <a href="https://www.w3.org/WAI/fundamentals/accessibility-intro/">accessibility</a> testing procedure was executed by <a href="https://www.npmjs.com/package/testaro">Testaro</a> on 1 web pages. The procedure performed 808 tests on each page. Of these, 16 tests are custom tests defined by Testaro, and the others belong to packages of tests created by others. Testaro produced reports enumerating the test results.</p>
|
|
22
|
-
<p>Given the reports produced by Testaro, another application, <a href="https://www.npmjs.com/package/testilo">Testilo</a>, used its <code>sp10a</code> procedure to assigned weights to the tests and compute a total score for each page (where 0 is the best possible score), adding a section on scoring to each report.</p>
|
|
23
|
-
<p>Testilo used a third procedure, <code>dp10a</code>, to create a digest from each report, summarizing the tests and how the score was computed. The report for each page is included, as an appendix, in the page’s digest.</p>
|
|
24
|
-
<p>Testilo produced this comparison page with a fourth procedure, <code>cp0</code>, listing the tested web pages in order of their scores (best to worst) and showing their scores in a table. The table includes links to the pages and to the digests.</p>
|
|
25
|
-
<p>Tests and scoring formulae are fallible and subjective. The reported faults merit investigation as potential opportunities for improved accessibility. But some may not actually harm accessibility, and some other accessibility faults may have escaped detection by any of the tests. Different reasonable procedures could yield different test results and different scores. Both Testaro and Testilo can be customized to fit different definitions and weightings of types of accessibility.</p>
|
|
26
|
-
<h2>Comparison</h2>
|
|
27
|
-
<table class="allBorder">
|
|
28
|
-
<caption>Accessibility scores of web pages</caption>
|
|
29
|
-
<thead>
|
|
30
|
-
<tr><th scope="col">Page</th><th scope="col" colspan="2">Score (lower is better)</tr>
|
|
31
|
-
</thead>
|
|
32
|
-
<tbody class="linkSmaller secondCellRight">
|
|
33
|
-
<tr><th scope="row"><a href="https://www.railpass.com/">Railpass</a></th><td><a href="reports/35k1r-railpass.html">1589</a></td><td aria-hidden="true"><svg width="100%" height="0.7em"><rect height="100%" width="100%" fill="red"></rect></svg></td></tr>
|
|
34
|
-
</tbody>
|
|
35
|
-
</table>
|
|
36
|
-
<footer>
|
|
37
|
-
<p class="date">Produced <time itemprop="datePublished" datetime="2022-06-08">2022/06/08</time></p>
|
|
38
|
-
</footer>
|
|
39
|
-
</main>
|
|
40
|
-
</body>
|
|
41
|
-
</html>
|