testilo 3.11.2 → 3.12.2
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/compare/cp16a/index.html +47 -0
- package/procs/compare/cp16a/index.js +74 -0
- package/procs/digest/dp16a/index.html +80 -0
- package/procs/digest/dp16a/index.js +126 -0
- package/procs/score/sp16a.js +13 -7
- package/procs/score/sp17a.js +6099 -0
package/package.json
CHANGED
|
@@ -0,0 +1,47 @@
|
|
|
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">
|
|
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 table below compares __pageCount__ web pages on <a href="https://www.w3.org/WAI/fundamentals/accessibility-intro/">accessibility</a>. The page names are links to the pages on the web. The scores are links to digests that explain in detail how the scores were computed.</p>
|
|
22
|
+
<p>The pages were:</p>
|
|
23
|
+
<ol id="summary">
|
|
24
|
+
<li>Tested by <a href="https://www.npmjs.com/package/testaro">Testaro</a> with procedure <code>tp16</code></li>
|
|
25
|
+
<li>Scored by <a href="https://www.npmjs.com/package/testilo">Testilo</a> with procedure <code>sp16a</code></li>
|
|
26
|
+
<li>Digested by Testilo with procedure <code>dp16a</code></li>
|
|
27
|
+
<li>Compared by Testilo with procedure <code>cp16a</code></li>
|
|
28
|
+
</ol>
|
|
29
|
+
<p>The Testaro procedure performs 1225 tests on each page. Of these, 19 tests are custom tests defined by Testaro, and the others belong to packages of tests created by others.</p>
|
|
30
|
+
<h2>Comparison</h2>
|
|
31
|
+
<table class="allBorder">
|
|
32
|
+
<caption>Accessibility scores of web pages</caption>
|
|
33
|
+
<thead>
|
|
34
|
+
<tr><th scope="col">Page</th><th scope="col" colspan="2">Score (lower is better)</tr>
|
|
35
|
+
</thead>
|
|
36
|
+
<tbody class="linkSmaller secondCellRight">
|
|
37
|
+
__tableBody__
|
|
38
|
+
</tbody>
|
|
39
|
+
</table>
|
|
40
|
+
<h2>Discussion</h2>
|
|
41
|
+
<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 are not detectable with these tests. Different reasonable procedures could yield different test results and different scores. Testaro and Testilo can be customized to fit different definitions and weightings of types of accessibility.</p>
|
|
42
|
+
<footer>
|
|
43
|
+
<p class="date">Produced <time itemprop="datePublished" datetime="__dateISO__">__dateSlash__</time></p>
|
|
44
|
+
</footer>
|
|
45
|
+
</main>
|
|
46
|
+
</body>
|
|
47
|
+
</html>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/*
|
|
2
|
+
cp16a.js
|
|
3
|
+
Returns a query for an HTML page including a bar-graph table.
|
|
4
|
+
Makes the bar widths the square roots of their proportional widths, for cases of extreme
|
|
5
|
+
score disparity.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// ########## IMPORTS
|
|
9
|
+
|
|
10
|
+
// Module to keep secrets local.
|
|
11
|
+
require('dotenv').config();
|
|
12
|
+
// Module to access files.
|
|
13
|
+
const fs = require('fs/promises');
|
|
14
|
+
|
|
15
|
+
// ########## CONSTANTS
|
|
16
|
+
|
|
17
|
+
const reportDirScored = process.env.REPORTDIR_SCORED || 'reports/scored';
|
|
18
|
+
const query = {};
|
|
19
|
+
|
|
20
|
+
// ########## FUNCTIONS
|
|
21
|
+
|
|
22
|
+
// Returns data on the hosts in the report directory.
|
|
23
|
+
const getData = async () => {
|
|
24
|
+
const reportDirAbs = `${__dirname}/../../../${reportDirScored}`;
|
|
25
|
+
const reportFileNamesAll = await fs.readdir(reportDirAbs);
|
|
26
|
+
const reportFileNamesSource = reportFileNamesAll.filter(fileName => fileName.endsWith('.json'));
|
|
27
|
+
const pageCount = reportFileNamesSource.length;
|
|
28
|
+
const bodyData = [];
|
|
29
|
+
for (const fileName of reportFileNamesSource) {
|
|
30
|
+
const fileJSON = await fs.readFile(`${reportDirAbs}/${fileName}`, 'utf8');
|
|
31
|
+
const file = JSON.parse(fileJSON);
|
|
32
|
+
const {id, host, score} = file;
|
|
33
|
+
bodyData.push({
|
|
34
|
+
id,
|
|
35
|
+
org: host.what,
|
|
36
|
+
url: host.which,
|
|
37
|
+
score: score.summary.total
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
return {
|
|
41
|
+
pageCount,
|
|
42
|
+
bodyData
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
// Returns the maximum score.
|
|
46
|
+
const getMaxScore = tableData => tableData.reduce((max, item) => Math.max(max, item.score), 0);
|
|
47
|
+
// Converts report data to a table body.
|
|
48
|
+
const getTableBody = async bodyData => {
|
|
49
|
+
const maxScore = getMaxScore(bodyData);
|
|
50
|
+
const rows = bodyData
|
|
51
|
+
.sort((a, b) => a.score - b.score)
|
|
52
|
+
.map(item => {
|
|
53
|
+
const {id, org, url, score} = item;
|
|
54
|
+
const pageCell = `<th scope="row"><a href="${url}">${org}</a></th>`;
|
|
55
|
+
const numCell = `<td><a href="digests/${id}.html">${score}</a></td>`;
|
|
56
|
+
// Make the bar width the square root of its proportional width.
|
|
57
|
+
const barWidth = 100 * Math.sqrt(score / maxScore);
|
|
58
|
+
const bar = `<rect height="100%" width="${barWidth}%" fill="red"></rect>`;
|
|
59
|
+
const barCell = `<td aria-hidden="true"><svg width="100%" height="0.7em">${bar}</svg></td>`;
|
|
60
|
+
const row = `<tr>${pageCell}${numCell}${barCell}</tr>`;
|
|
61
|
+
return row;
|
|
62
|
+
});
|
|
63
|
+
return rows.join('\n ');
|
|
64
|
+
};
|
|
65
|
+
// Returns a query for a comparative table.
|
|
66
|
+
exports.getQuery = async () => {
|
|
67
|
+
const data = await getData();
|
|
68
|
+
query.pageCount = data.pageCount;
|
|
69
|
+
query.tableBody = await getTableBody(data.bodyData);
|
|
70
|
+
const date = new Date();
|
|
71
|
+
query.dateISO = date.toISOString().slice(0, 10);
|
|
72
|
+
query.dateSlash = query.dateISO.replace(/-/g, '/');
|
|
73
|
+
return query;
|
|
74
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
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="report of accessibility testing of a web page">
|
|
10
|
+
<meta name="keywords" content="accessibility a11y web testing">
|
|
11
|
+
<title>Accessibility test digest</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 test digest</h1>
|
|
19
|
+
<h2>Synopsis</h2>
|
|
20
|
+
<div id="synopsis">
|
|
21
|
+
<p><strong>Page</strong>: __org__</p>
|
|
22
|
+
<p><strong>URL</strong>: __url__</p>
|
|
23
|
+
<p><strong>Score</strong>: __totalScore__</p>
|
|
24
|
+
<p><strong>Tested by</strong>: Testaro, procedure <code>tp16</code></p>
|
|
25
|
+
<p><strong>Scored by</strong>: Testilo, procedure <code>sp16a</code></p>
|
|
26
|
+
<p><strong>Digested by</strong>: Testilo, procedure <code>dp16a</code></p>
|
|
27
|
+
</div>
|
|
28
|
+
</header>
|
|
29
|
+
<h2>Introduction</h2>
|
|
30
|
+
<p>The <a href="https://www.npmjs.com/package/testaro">Testaro</a> application used its <code>tp16</code> testing procedure to test the <a href="https://www.w3.org/WAI/fundamentals/accessibility-intro/"><dfn>accessibility</dfn></a> (barrier-free design and coding) of the __org__ web page at <a href="__url__">__url__</a> on __dateSlash__. The procedure performed 1229 tests. Of these, 23 are custom tests or <q>quasi-tests</q> by Testaro, and the others belong to these eight other packages (programs that perform collections of tests):</p>
|
|
31
|
+
<ul>
|
|
32
|
+
<li><a href="https://github.com/Siteimprove/alfa">Alfa</a> by Siteimprove</li>
|
|
33
|
+
<li><a href="https://www.npmjs.com/package/axe-core">Axe-core</a> by Deque</li>
|
|
34
|
+
<li><a href="https://www.webaccessibility.com/tools/">Continuum</a> by Level Access</li>
|
|
35
|
+
<li>
|
|
36
|
+
<a href="https://www.npmjs.com/package/html_codesniffer">HTML CodeSniffer</a> by Squiz Labs
|
|
37
|
+
</li>
|
|
38
|
+
<li><a href="https://github.com/IBMa/equal-access">Equal Access</a> by IBM</li>
|
|
39
|
+
<li><a href="https://github.com/validator/validator">Nu Html Checker</a></li>
|
|
40
|
+
<li><a href="https://tenon.io/documentation/apiv2.php">Tenon</a> by Level Access</li>
|
|
41
|
+
<li><a href="https://wave.webaim.org/api/">WAVE</a> by WebAIM</li>
|
|
42
|
+
</ul>
|
|
43
|
+
<p>Testaro produced a report enumerating the test results.</p>
|
|
44
|
+
<p><a href="https://www.npmjs.com/package/testilo">Testilo</a> processed the report and used the <code>sp16a</code> scoring procedure to compute partial and total scores for the page. The total score is __totalScore__ (where 0 is the best possible score). The scored report is appended below.</p>
|
|
45
|
+
<p>Finally, Testilo used procedure <code>dp16a</code> to produce this digest, briefly explaining how <code>sp15c</code> computed the scores.</p>
|
|
46
|
+
<h2>Score summary</h2>
|
|
47
|
+
<table class="allBorder secondCellRight">
|
|
48
|
+
<caption>Score components</caption>
|
|
49
|
+
<tbody class="headersLeft">
|
|
50
|
+
__scoreRows__
|
|
51
|
+
</tbody>
|
|
52
|
+
</table>
|
|
53
|
+
<h2>Issue summary</h2>
|
|
54
|
+
<h3>Special issues</h3>
|
|
55
|
+
__specialSummary__
|
|
56
|
+
<h3>Classified issues</h3>
|
|
57
|
+
__groupSummary__
|
|
58
|
+
<h2>Discussion</h2>
|
|
59
|
+
<p>Although there are widely accepted <a href="https://www.w3.org/WAI/standards-guidelines/">accessibility standards</a>, there is no unanimity about how to define, test, and quantify accessibility. The failures reported in this digest merit investigation as potential opportunities for improved accessibility. Investigation may lead you to conclude that some of the reported failures do not actually harm accessibility. Conversely, some substantial accessibility faults can escape detection by any of these tests. You may question the attempt to assign an accessibility score to a web page, or you may prefer weightings and formulas different from those used by <code>sp16a</code>. You can modify and extend Testaro and Testilo to fit other theories and priorities.</p>
|
|
60
|
+
<p>Here, in brief, is how <code>sp16a</code> computes a score for a page.</p>
|
|
61
|
+
<ul>
|
|
62
|
+
<li>It finds all the defects and warnings (let’s call them <q>issues</q>) recorded in the report.</li>
|
|
63
|
+
<li>It classifies them according to type. For example, a link that looks like the text around it is one issue category, while a video that has no captions is another issue category.</li>
|
|
64
|
+
<li>It also classifies the issues according to severity. For example, an issue that prevents a transaction is more severe than an issue that only complicates the transaction, and a warning about a possible issue is less severe than a definite finding of an issue. (Some packages rate the severity of each issue; for the other packages, <code>sp15c</code> assigns a severity weight to the issue type and uses that weight.)</li>
|
|
65
|
+
<li>It assigns quality ratings to particular tests that are judged abnormally reliable or unreliable.</li>
|
|
66
|
+
<li>It assigns a score to each issue reported by each test of each package.</li>
|
|
67
|
+
<li>It aggregates the issue scores, weighting them by severity, test quality, and redundancy. Redundancy occurs, and causes downweighting, when two or more packages contain tests that are designed to discover the same or mostly the same issues. So the score for a category is not simply the sum of the scores of the tests in that category.</li>
|
|
68
|
+
<li>It assigns a score for issues in the page logged by the browser.</li>
|
|
69
|
+
<li>It assigns an estimated score each time the page prevents one of the packages or one of the Testaro tests from being run on the page.</li>
|
|
70
|
+
<li>It adds the scores together to obtain a total score.</li>
|
|
71
|
+
</ul>
|
|
72
|
+
<p>The precise rules of <code>sp16a</code> are found in the <a href="https://github.com/jrpool/testilo/blob/main/procs/score/sp16a.js">code itself</a>.</p>
|
|
73
|
+
<h2>Report</h2>
|
|
74
|
+
<pre>__report__</pre>
|
|
75
|
+
<footer>
|
|
76
|
+
<p class="date">Produced <time itemprop="datePublished" datetime="__dateISO__">__dateSlash__</time></p>
|
|
77
|
+
</footer>
|
|
78
|
+
</main>
|
|
79
|
+
</body>
|
|
80
|
+
</html>
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/*
|
|
2
|
+
index: digester for scoring procedure sp16a.
|
|
3
|
+
Creator of parameters for substitution into index.html.
|
|
4
|
+
Usage example for selected files in REPORTDIR_SCORED: node digest dp16a 35k1r
|
|
5
|
+
Usage example for all files in REPORTDIR_SCORED: node digest dp16a
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
// CONSTANTS
|
|
9
|
+
|
|
10
|
+
// Newlines with indentations.
|
|
11
|
+
const joiner = '\n ';
|
|
12
|
+
const innerJoiner = '\n ';
|
|
13
|
+
const specialMessages = {
|
|
14
|
+
log: 'This is based on the amount of browser error logging and miscellaneous logging during the tests.',
|
|
15
|
+
preventions: 'This is based on tests that the page did not allow to be run. That impedes accessibility progress and risks interfering with tools that users with disabilities need.',
|
|
16
|
+
solos: 'This is based on issues reported by unclassified tests. Details are in the report.'
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
// FUNCTIONS
|
|
20
|
+
|
|
21
|
+
// Makes strings HTML-safe.
|
|
22
|
+
const htmlEscape = textOrNumber => textOrNumber
|
|
23
|
+
.toString()
|
|
24
|
+
.replace(/&/g, '&')
|
|
25
|
+
.replace(/</g, '<');
|
|
26
|
+
// Gets a row of the score-summary table.
|
|
27
|
+
const getScoreRow = (component, score) => `<tr><th>${component}</th><td>${score}</td></tr>`;
|
|
28
|
+
// Gets the start of a paragraph about a special score.
|
|
29
|
+
const getSpecialPStart = (summary, scoreID) =>
|
|
30
|
+
`<p><span class="componentID">${scoreID}</span>: Score ${summary[scoreID]}.`;
|
|
31
|
+
// Adds parameters to a query for a digest.
|
|
32
|
+
exports.makeQuery = (report, query) => {
|
|
33
|
+
// Add an HTML-safe copy of the host report to the query to be appended to the digest.
|
|
34
|
+
const {script, host, score} = report;
|
|
35
|
+
const reportJSON = JSON.stringify(report, null, 2);
|
|
36
|
+
const reportJSONSafe = htmlEscape(reportJSON);
|
|
37
|
+
query.report = reportJSONSafe;
|
|
38
|
+
// Add the job data to the query.
|
|
39
|
+
query.dateISO = report.endTime.slice(0, 10);
|
|
40
|
+
query.dateSlash = query.dateISO.replace(/-/g, '/');
|
|
41
|
+
if (host && host.what && host.which) {
|
|
42
|
+
query.org = host.what;
|
|
43
|
+
query.url = host.which;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
const firstURLCommand = script.commands.find(command => command.type === 'url');
|
|
47
|
+
if (firstURLCommand && firstURLCommand.what && firstURLCommand.which) {
|
|
48
|
+
query.org = firstURLCommand.what;
|
|
49
|
+
query.url = firstURLCommand.which;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
console.log('ERROR: host missing or invalid');
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const {groupDetails, summary} = score;
|
|
57
|
+
const {total, groups} = summary;
|
|
58
|
+
if (typeof total === 'number') {
|
|
59
|
+
query.totalScore = total;
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
console.log('ERROR: missing or invalid total score');
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
// Add the total and any special rows of the score-summary table to the query.
|
|
66
|
+
const scoreRows = [];
|
|
67
|
+
const specialComponentIDs = ['log', 'preventions', 'solos'];
|
|
68
|
+
['total'].concat(specialComponentIDs).forEach(item => {
|
|
69
|
+
if (summary[item]) {
|
|
70
|
+
scoreRows.push(getScoreRow(item, summary[item]));
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
// Add the group rows of the score-summary table to the query.
|
|
74
|
+
groups.forEach(group => {
|
|
75
|
+
scoreRows.push(getScoreRow(`${group.groupName}`, group.score));
|
|
76
|
+
});
|
|
77
|
+
query.scoreRows = scoreRows.join(innerJoiner);
|
|
78
|
+
// If the score has any special components:
|
|
79
|
+
const scoredSpecialIDs = specialComponentIDs.filter(item => summary[item]);
|
|
80
|
+
if (scoredSpecialIDs.length) {
|
|
81
|
+
// Add paragraphs about them for the issue summary to the query.
|
|
82
|
+
const specialPs = [];
|
|
83
|
+
scoredSpecialIDs.forEach(id => {
|
|
84
|
+
specialPs.push(`${getSpecialPStart(summary, id)} ${specialMessages[id]}`);
|
|
85
|
+
});
|
|
86
|
+
query.specialSummary = specialPs.join(joiner);
|
|
87
|
+
}
|
|
88
|
+
// Otherwise, i.e. if the score has no special components:
|
|
89
|
+
else {
|
|
90
|
+
// Add a paragraph stating this for the issue summary to the query.
|
|
91
|
+
query.specialSummary = '<p>No special issues contributed to the score.</p>'
|
|
92
|
+
}
|
|
93
|
+
// If the score has any classified issues as components:
|
|
94
|
+
if (groups.length) {
|
|
95
|
+
// Add paragraphs about them for the special summary to the query.
|
|
96
|
+
const groupSummaryItems = [];
|
|
97
|
+
groups.forEach(group => {
|
|
98
|
+
const {groupName, score} = group;
|
|
99
|
+
const groupP = `<p><span class="componentID">${groupName}</span>: Score ${score}. Issues reported by tests in this category:</p>`;
|
|
100
|
+
const groupListItems = [];
|
|
101
|
+
const groupData = groupDetails.groups[groupName];
|
|
102
|
+
const packageIDs = Object.keys(groupData);
|
|
103
|
+
packageIDs.forEach(packageID => {
|
|
104
|
+
const testIDs = Object.keys(groupData[packageID]);
|
|
105
|
+
testIDs.forEach(testID => {
|
|
106
|
+
const testData = groupData[packageID][testID];
|
|
107
|
+
const {score, what} = testData;
|
|
108
|
+
const listItem = `<li>Package <code>${packageID}</code>, test <code>${testID}</code>, score ${score} (${what})</li>`;
|
|
109
|
+
groupListItems.push(listItem);
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
const groupList = [
|
|
113
|
+
'<ul>',
|
|
114
|
+
groupListItems.join('\n '),
|
|
115
|
+
'</ul>'
|
|
116
|
+
].join(joiner);
|
|
117
|
+
groupSummaryItems.push(groupP, groupList);
|
|
118
|
+
});
|
|
119
|
+
query.groupSummary = groupSummaryItems.join(joiner);
|
|
120
|
+
}
|
|
121
|
+
// Otherwise, i.e. if the score has no classified issues as components:
|
|
122
|
+
else {
|
|
123
|
+
// Add a paragraph stating this for the group summary to the query.
|
|
124
|
+
query.groupSummary = '<p>No classified issues contributed to the score.</p>'
|
|
125
|
+
}
|
|
126
|
+
};
|
package/procs/score/sp16a.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
|
|
2
|
+
sp16a
|
|
3
3
|
Testilo score proc 16a
|
|
4
4
|
|
|
5
5
|
Computes scores from Testaro script tp16 and adds them to a report.
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
// CONSTANTS
|
|
35
35
|
|
|
36
36
|
// ID of this proc.
|
|
37
|
-
const scoreProcID = '
|
|
37
|
+
const scoreProcID = 'sp16a';
|
|
38
38
|
// Configuration disclosures.
|
|
39
39
|
const logWeights = {
|
|
40
40
|
logCount: 0.5,
|
|
@@ -64,8 +64,6 @@ const preventionWeights = {
|
|
|
64
64
|
testaro: 50,
|
|
65
65
|
other: 100
|
|
66
66
|
};
|
|
67
|
-
// Preweighted packages, i.e. those whose test weights are trusted.
|
|
68
|
-
const preWeightedPackages = ['axe', 'tenon', 'testaro'];
|
|
69
67
|
// Non-Testaro packages.
|
|
70
68
|
const otherPackages = ['alfa', 'axe', 'continuum', 'htmlcs', 'ibm', 'nuVal', 'tenon', 'wave'];
|
|
71
69
|
// Test groups.
|
|
@@ -1817,8 +1815,8 @@ const groups = {
|
|
|
1817
1815
|
}
|
|
1818
1816
|
}
|
|
1819
1817
|
},
|
|
1820
|
-
|
|
1821
|
-
weight:
|
|
1818
|
+
leadingInsufficient: {
|
|
1819
|
+
weight: 2,
|
|
1822
1820
|
packages: {
|
|
1823
1821
|
alfa: {
|
|
1824
1822
|
r73: {
|
|
@@ -1864,7 +1862,7 @@ const groups = {
|
|
|
1864
1862
|
}
|
|
1865
1863
|
},
|
|
1866
1864
|
testaro: {
|
|
1867
|
-
|
|
1865
|
+
titledEl: {
|
|
1868
1866
|
variable: false,
|
|
1869
1867
|
quality: 1,
|
|
1870
1868
|
what: 'title attribute belongs to an inappropriate element'
|
|
@@ -6133,6 +6131,14 @@ exports.scorer = async report => {
|
|
|
6133
6131
|
// Add 2 per defect.
|
|
6134
6132
|
addDetail('testaro', which, 2 * issueCount);
|
|
6135
6133
|
}
|
|
6134
|
+
else if (which === 'titledEl') {
|
|
6135
|
+
const total = test.result && test.result.total;
|
|
6136
|
+
if (total) {
|
|
6137
|
+
const score = 4 * total;
|
|
6138
|
+
// Add 4 per mistitled element.
|
|
6139
|
+
addDetail('testaro', which, score);
|
|
6140
|
+
}
|
|
6141
|
+
}
|
|
6136
6142
|
else if (which === 'zIndex') {
|
|
6137
6143
|
const issueCount = test.result && test.result.totals && test.result.totals.total || 0;
|
|
6138
6144
|
// Add 1 per non-auto zIndex.
|