testilo 19.4.1 → 20.0.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/procs/analyze/credit.js +11 -9
- package/procs/score/tic37.js +2 -2
- package/procs/score/tic38.js +8575 -0
- package/procs/score/tsp38.js +300 -0
package/package.json
CHANGED
package/procs/analyze/credit.js
CHANGED
|
@@ -13,7 +13,8 @@ exports.credit = reports => {
|
|
|
13
13
|
issueCounts: {
|
|
14
14
|
total: 0,
|
|
15
15
|
nonOnlies: 0,
|
|
16
|
-
onlies:
|
|
16
|
+
onlies: 0,
|
|
17
|
+
toolOnlies: {}
|
|
17
18
|
}
|
|
18
19
|
};
|
|
19
20
|
const {instanceCounts, onlies, mosts, tools, issueCounts} = tally;
|
|
@@ -21,10 +22,8 @@ exports.credit = reports => {
|
|
|
21
22
|
reports.forEach(report => {
|
|
22
23
|
// If it is valid:
|
|
23
24
|
if (report.score && report.score.details && report.score.details.issue) {
|
|
24
|
-
// Populate the issue count.
|
|
25
|
-
const issues = report.score.details && report.score.details.issue;
|
|
26
|
-
issueCounts.nonOnlies = issueCounts.total = Object.keys(issues).length;
|
|
27
25
|
// For each issue:
|
|
26
|
+
const issues = report.score.details && report.score.details.issue;
|
|
28
27
|
Object.keys(issues).forEach(issueID => {
|
|
29
28
|
// For each tool with any complaints about it:
|
|
30
29
|
if (! instanceCounts[issueID]) {
|
|
@@ -73,18 +72,21 @@ exports.credit = reports => {
|
|
|
73
72
|
console.log(`ERROR: Report ${report.id} missing score data`);
|
|
74
73
|
}
|
|
75
74
|
});
|
|
75
|
+
// Populate the total and initial non-only issue counts.
|
|
76
|
+
issueCounts.nonOnlies = issueCounts.total = Object.keys(instanceCounts).length;
|
|
76
77
|
// For each tallied issue:
|
|
77
78
|
Object.keys(instanceCounts).forEach(issueID => {
|
|
78
79
|
// If only 1 tool complained about it:
|
|
79
|
-
const toolIDs = Object.keys(instanceCounts[issueID])
|
|
80
|
+
const toolIDs = Object.keys(instanceCounts[issueID]);
|
|
80
81
|
if (toolIDs.length === 1) {
|
|
81
|
-
// Add this to the tally.
|
|
82
|
+
// Add this to the tally and decrement the non-only total.
|
|
82
83
|
const toolID = toolIDs[0];
|
|
83
84
|
onlies[issueID] = toolID;
|
|
84
|
-
|
|
85
|
-
|
|
85
|
+
issueCounts.onlies++;
|
|
86
|
+
if (! issueCounts.toolOnlies[toolID]) {
|
|
87
|
+
issueCounts.toolOnlies[toolID] = 0;
|
|
86
88
|
}
|
|
87
|
-
issueCounts.
|
|
89
|
+
issueCounts.toolOnlies[toolID]++;
|
|
88
90
|
issueCounts.nonOnlies--;
|
|
89
91
|
}
|
|
90
92
|
// Otherwise, i.e. if multiple tools complained about it:
|
package/procs/score/tic37.js
CHANGED
|
@@ -3585,12 +3585,12 @@ exports.issues = {
|
|
|
3585
3585
|
summary: 'autocomplete missing',
|
|
3586
3586
|
why: 'User cannot get help entering personal information in a form',
|
|
3587
3587
|
wcag: '1.3.5',
|
|
3588
|
-
weight:
|
|
3588
|
+
weight: 4,
|
|
3589
3589
|
tools: {
|
|
3590
3590
|
testaro: {
|
|
3591
3591
|
autocomplete: {
|
|
3592
3592
|
variable: false,
|
|
3593
|
-
quality:
|
|
3593
|
+
quality: 0.5,
|
|
3594
3594
|
what: 'Name or email input is missing its required autocomplete attribute'
|
|
3595
3595
|
}
|
|
3596
3596
|
}
|