testilo 13.6.1 → 13.6.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 +2 -2
- package/procs/digest/tdp27/index.js +4 -4
- package/procs/score/tic27.js +45 -26
- package/procs/score/tsp27.js +4 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "testilo",
|
|
3
|
-
"version": "13.6.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "13.6.2",
|
|
4
|
+
"description": "Prepares and processes Testaro reports",
|
|
5
5
|
"main": "aim.js",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -70,13 +70,13 @@ const populateQuery = (report, query) => {
|
|
|
70
70
|
issueDetailRows.push(`<h4>Complaints by <code>${toolID}</code></h5>`);
|
|
71
71
|
const ruleIDs = Object.keys(issueData.tools[toolID]);
|
|
72
72
|
ruleIDs.forEach(ruleID => {
|
|
73
|
+
const ruleData = issueData.tools[toolID][ruleID];
|
|
73
74
|
issueDetailRows.push(`<h5>Rule <code>${ruleID}</code></h5>`);
|
|
74
|
-
issueDetailRows.push(
|
|
75
|
-
|
|
76
|
-
);
|
|
75
|
+
issueDetailRows.push(`<p>Description: ${ruleData.what}</p>`);
|
|
76
|
+
issueDetailRows.push(`<p>Count of instances: ${ruleData.complaints.countTotal}</p>`);
|
|
77
77
|
issueDetailRows.push('<h6>Complaint specifics</h6>');
|
|
78
78
|
issueDetailRows.push('<ul>');
|
|
79
|
-
|
|
79
|
+
ruleData.complaints.texts.forEach(text => {
|
|
80
80
|
issueDetailRows.push(` <li>${htmlEscape(text || '')}</li>`);
|
|
81
81
|
});
|
|
82
82
|
issueDetailRows.push('</ul>');
|
package/procs/score/tic27.js
CHANGED
|
@@ -237,17 +237,17 @@ exports.issueClasses = {
|
|
|
237
237
|
507: {
|
|
238
238
|
variable: false,
|
|
239
239
|
quality: 1,
|
|
240
|
-
what: '
|
|
240
|
+
what: 'Element with a radio role has no mechanism that allows an accessible name to be calculated'
|
|
241
241
|
},
|
|
242
242
|
509: {
|
|
243
243
|
variable: false,
|
|
244
244
|
quality: 1,
|
|
245
|
-
what: '
|
|
245
|
+
what: 'Element with a textbox role has no mechanism that allows an accessible name to be calculated'
|
|
246
246
|
},
|
|
247
247
|
510: {
|
|
248
248
|
variable: false,
|
|
249
249
|
quality: 1,
|
|
250
|
-
what: '
|
|
250
|
+
what: 'Element with a combobox role has no mechanism that allows an accessible name to be calculated'
|
|
251
251
|
}
|
|
252
252
|
},
|
|
253
253
|
htmlcs: {
|
|
@@ -415,7 +415,7 @@ exports.issueClasses = {
|
|
|
415
415
|
87: {
|
|
416
416
|
variable: false,
|
|
417
417
|
quality: 1,
|
|
418
|
-
what: '
|
|
418
|
+
what: 'Element with an image, graphics-symbol, or graphics-document role has no mechanism to calculate an accessible name'
|
|
419
419
|
},
|
|
420
420
|
89: {
|
|
421
421
|
variable: false,
|
|
@@ -658,7 +658,7 @@ exports.issueClasses = {
|
|
|
658
658
|
235: {
|
|
659
659
|
variable: false,
|
|
660
660
|
quality: 1,
|
|
661
|
-
what: '
|
|
661
|
+
what: 'Element with an img, graphics-symbol, or graphics-document role has a suspicious calculated accessible name'
|
|
662
662
|
}
|
|
663
663
|
},
|
|
664
664
|
qualWeb: {
|
|
@@ -759,6 +759,11 @@ exports.issueClasses = {
|
|
|
759
759
|
variable: false,
|
|
760
760
|
quality: 1,
|
|
761
761
|
what: 'Page detected as HTML, but has no lang attribute'
|
|
762
|
+
},
|
|
763
|
+
html_lang_exists: {
|
|
764
|
+
variable: false,
|
|
765
|
+
quality: 1,
|
|
766
|
+
what: 'Page detected as HTML, but has no lang attribute'
|
|
762
767
|
}
|
|
763
768
|
},
|
|
764
769
|
nuVal: {
|
|
@@ -1305,7 +1310,7 @@ exports.issueClasses = {
|
|
|
1305
1310
|
95: {
|
|
1306
1311
|
variable: false,
|
|
1307
1312
|
quality: 1,
|
|
1308
|
-
what: '
|
|
1313
|
+
what: 'Element has an aria-labelledby value that includes an invalid or duplicate id'
|
|
1309
1314
|
}
|
|
1310
1315
|
},
|
|
1311
1316
|
htmlcs: {
|
|
@@ -1912,14 +1917,14 @@ exports.issueClasses = {
|
|
|
1912
1917
|
r94: {
|
|
1913
1918
|
variable: false,
|
|
1914
1919
|
quality: 1,
|
|
1915
|
-
what: '
|
|
1920
|
+
what: 'Element with a menuitem role has no accessible name'
|
|
1916
1921
|
}
|
|
1917
1922
|
},
|
|
1918
1923
|
qualWeb: {
|
|
1919
1924
|
'QW-ACT-R66': {
|
|
1920
1925
|
variable: false,
|
|
1921
1926
|
quality: 1,
|
|
1922
|
-
what: '
|
|
1927
|
+
what: 'menuitem element has no non-empty accessible name'
|
|
1923
1928
|
}
|
|
1924
1929
|
}
|
|
1925
1930
|
}
|
|
@@ -2080,7 +2085,7 @@ exports.issueClasses = {
|
|
|
2080
2085
|
r47: {
|
|
2081
2086
|
variable: false,
|
|
2082
2087
|
quality: 1,
|
|
2083
|
-
what: '
|
|
2088
|
+
what: 'meta element restricts zooming'
|
|
2084
2089
|
}
|
|
2085
2090
|
},
|
|
2086
2091
|
axe: {
|
|
@@ -2393,7 +2398,7 @@ exports.issueClasses = {
|
|
|
2393
2398
|
'^Bad value .+ for attribute .+ on element meta.*$': {
|
|
2394
2399
|
variable: true,
|
|
2395
2400
|
quality: 1,
|
|
2396
|
-
what: '
|
|
2401
|
+
what: 'Attribute of a meta element has an invalid value'
|
|
2397
2402
|
}
|
|
2398
2403
|
}
|
|
2399
2404
|
}
|
|
@@ -2569,7 +2574,7 @@ exports.issueClasses = {
|
|
|
2569
2574
|
412: {
|
|
2570
2575
|
variable: false,
|
|
2571
2576
|
quality: 1,
|
|
2572
|
-
what: '
|
|
2577
|
+
what: 'Element has a role attribute set to an invalid ARIA role value'
|
|
2573
2578
|
}
|
|
2574
2579
|
},
|
|
2575
2580
|
ibm: {
|
|
@@ -2727,17 +2732,17 @@ exports.issueClasses = {
|
|
|
2727
2732
|
'^Attribute .+ not allowed on element .+ at this point.*$': {
|
|
2728
2733
|
variable: true,
|
|
2729
2734
|
quality: 1,
|
|
2730
|
-
what: '
|
|
2735
|
+
what: 'Attribute not allowed on this element'
|
|
2731
2736
|
},
|
|
2732
2737
|
'^Bad value .* for attribute .+ on element .+$': {
|
|
2733
2738
|
variable: true,
|
|
2734
2739
|
quality: 1,
|
|
2735
|
-
what: '
|
|
2740
|
+
what: 'Attribute on this element has an invalid value'
|
|
2736
2741
|
},
|
|
2737
2742
|
'^Bad value .+ for the attribute .+$': {
|
|
2738
2743
|
variable: true,
|
|
2739
2744
|
quality: 1,
|
|
2740
|
-
what: '
|
|
2745
|
+
what: 'Attribute has an invalid value'
|
|
2741
2746
|
},
|
|
2742
2747
|
'^Attribute .+ not allowed here.*$': {
|
|
2743
2748
|
variable: true,
|
|
@@ -2772,17 +2777,17 @@ exports.issueClasses = {
|
|
|
2772
2777
|
'The sizes attribute may be specified only if the srcset attribute is also present.': {
|
|
2773
2778
|
variable: false,
|
|
2774
2779
|
quality: 1,
|
|
2775
|
-
what: '
|
|
2780
|
+
what: 'Element has a sizes attribute but no srcset attribute'
|
|
2776
2781
|
},
|
|
2777
2782
|
'^Bad value for attribute (?:width|height) on element img: The empty string is not a valid non-negative integer.*$': {
|
|
2778
2783
|
variable: true,
|
|
2779
2784
|
quality: 1,
|
|
2780
|
-
what: '
|
|
2785
|
+
what: 'Attribute has an empty value'
|
|
2781
2786
|
},
|
|
2782
2787
|
'^.+ in an unquoted attribute value. Probable causes: Attributes running together or a URL query string in an unquoted attribute value.*$': {
|
|
2783
2788
|
variable: true,
|
|
2784
2789
|
quality: 1,
|
|
2785
|
-
what: '
|
|
2790
|
+
what: 'Attribute has a value containing invalid punctuation'
|
|
2786
2791
|
}
|
|
2787
2792
|
}
|
|
2788
2793
|
}
|
|
@@ -3006,12 +3011,12 @@ exports.issueClasses = {
|
|
|
3006
3011
|
279: {
|
|
3007
3012
|
variable: false,
|
|
3008
3013
|
quality: 1,
|
|
3009
|
-
what: '
|
|
3014
|
+
what: 'Element has an aria-posinset attribute without having a compatible role'
|
|
3010
3015
|
},
|
|
3011
3016
|
280: {
|
|
3012
3017
|
variable: false,
|
|
3013
3018
|
quality: 1,
|
|
3014
|
-
what: '
|
|
3019
|
+
what: 'Element has aria-posinset and aria-setsize attributes without having a compatible role'
|
|
3015
3020
|
},
|
|
3016
3021
|
281: {
|
|
3017
3022
|
variable: false,
|
|
@@ -3051,7 +3056,7 @@ exports.issueClasses = {
|
|
|
3051
3056
|
610: {
|
|
3052
3057
|
variable: false,
|
|
3053
3058
|
quality: 1,
|
|
3054
|
-
what: '
|
|
3059
|
+
what: 'Element has an aria-setsize attribute without having a compatible role'
|
|
3055
3060
|
},
|
|
3056
3061
|
1066: {
|
|
3057
3062
|
variable: false,
|
|
@@ -3090,17 +3095,17 @@ exports.issueClasses = {
|
|
|
3090
3095
|
'Attribute aria-activedescendant value should either refer to a descendant element, or should be accompanied by attribute aria-owns.': {
|
|
3091
3096
|
variable: false,
|
|
3092
3097
|
quality: 1,
|
|
3093
|
-
what: '
|
|
3098
|
+
what: 'Element has no aria-owns attribute but its aria-activedescendant attribute references a non-descendant'
|
|
3094
3099
|
},
|
|
3095
3100
|
'^Bad value for attribute .+ on element .+: Must be non-empty.*$': {
|
|
3096
3101
|
variable: true,
|
|
3097
3102
|
quality: 1,
|
|
3098
|
-
what: '
|
|
3103
|
+
what: 'Attribute value is empty'
|
|
3099
3104
|
},
|
|
3100
3105
|
'^Bad value for attribute aria-hidden on element .+$': {
|
|
3101
3106
|
variable: true,
|
|
3102
3107
|
quality: 1,
|
|
3103
|
-
what: '
|
|
3108
|
+
what: 'aria-hidden attribute has an empty value'
|
|
3104
3109
|
},
|
|
3105
3110
|
'The form attribute must refer to a form element.': {
|
|
3106
3111
|
variable: false,
|
|
@@ -3847,7 +3852,7 @@ exports.issueClasses = {
|
|
|
3847
3852
|
71: {
|
|
3848
3853
|
variable: false,
|
|
3849
3854
|
quality: 1,
|
|
3850
|
-
what: '
|
|
3855
|
+
what: 'Element with a heading role has no aria-level attribute'
|
|
3851
3856
|
}
|
|
3852
3857
|
}
|
|
3853
3858
|
}
|
|
@@ -4182,7 +4187,14 @@ exports.issueClasses = {
|
|
|
4182
4187
|
'Element dl is missing a required child element.': {
|
|
4183
4188
|
variable: false,
|
|
4184
4189
|
quality: 1,
|
|
4185
|
-
what: 'dl element has no child element
|
|
4190
|
+
what: 'dl element has no child element'
|
|
4191
|
+
}
|
|
4192
|
+
},
|
|
4193
|
+
qualWeb: {
|
|
4194
|
+
'QW-BP24': {
|
|
4195
|
+
variable: false,
|
|
4196
|
+
quality: 1,
|
|
4197
|
+
what: 'ul or ol element has a child other than li, script, or template'
|
|
4186
4198
|
}
|
|
4187
4199
|
}
|
|
4188
4200
|
}
|
|
@@ -5210,6 +5222,13 @@ exports.issueClasses = {
|
|
|
5210
5222
|
quality: 1,
|
|
5211
5223
|
what: 'main landmark is contained in another landmark'
|
|
5212
5224
|
}
|
|
5225
|
+
},
|
|
5226
|
+
qualWeb: {
|
|
5227
|
+
'QW-BP27': {
|
|
5228
|
+
variable: false,
|
|
5229
|
+
quality: 1,
|
|
5230
|
+
what: 'main landmark is not at the top level'
|
|
5231
|
+
}
|
|
5213
5232
|
}
|
|
5214
5233
|
}
|
|
5215
5234
|
},
|
|
@@ -7070,7 +7089,7 @@ exports.issueClasses = {
|
|
|
7070
7089
|
'When the srcset attribute has any image candidate string with a width descriptor, the sizes attribute must also be present.': {
|
|
7071
7090
|
variable: false,
|
|
7072
7091
|
quality: 1,
|
|
7073
|
-
what: '
|
|
7092
|
+
what: 'Element with a srcset attribute with a width has no sizes attribute'
|
|
7074
7093
|
},
|
|
7075
7094
|
'^The text content of element .+ was not in the required format: Expected .+ but found .+ instead.*$': {
|
|
7076
7095
|
variable: true,
|
package/procs/score/tsp27.js
CHANGED
|
@@ -120,8 +120,10 @@ exports.scorer = report => {
|
|
|
120
120
|
details.issue[issueID].tools[which] = {};
|
|
121
121
|
}
|
|
122
122
|
if (! details.issue[issueID].tools[which][ruleID]) {
|
|
123
|
+
const ruleData = issueClasses[issueID].tools[which][ruleID];
|
|
123
124
|
details.issue[issueID].tools[which][ruleID] = {
|
|
124
|
-
quality:
|
|
125
|
+
quality: ruleData.quality,
|
|
126
|
+
what: ruleData.what,
|
|
125
127
|
complaints: {
|
|
126
128
|
countTotal: 0,
|
|
127
129
|
texts: []
|
|
@@ -172,7 +174,7 @@ exports.scorer = report => {
|
|
|
172
174
|
}
|
|
173
175
|
});
|
|
174
176
|
// Get the score for the issue.
|
|
175
|
-
issueData.score = issueData.weight * issueData.maxCount;
|
|
177
|
+
issueData.score = Math.round(issueData.weight * issueData.maxCount);
|
|
176
178
|
});
|
|
177
179
|
// Add the severity detail totals to the score.
|
|
178
180
|
details.severity.total = Object.keys(details.severity.byTool).reduce((severityTotals, toolID) => {
|