testilo 51.2.0 → 52.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/.claude/settings.local.json +13 -0
- package/package.json +1 -1
- package/procs/score/tic.js +32 -0
- package/procs/score/tsp50.js +24 -5
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(gh pr *)",
|
|
5
|
+
"Read(//opt/homebrew/bin/**)",
|
|
6
|
+
"Bash(/opt/homebrew/bin/gh --version)",
|
|
7
|
+
"WebFetch(domain:github.com)",
|
|
8
|
+
"WebFetch(domain:patch-diff.githubusercontent.com)",
|
|
9
|
+
"Bash(curl -sL https://patch-diff.githubusercontent.com/raw/jrpool/testilo/pull/1.patch -o /tmp/pr1.patch)",
|
|
10
|
+
"Read(//tmp/**)"
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
}
|
package/package.json
CHANGED
package/procs/score/tic.js
CHANGED
|
@@ -3655,6 +3655,28 @@ exports.issues = {
|
|
|
3655
3655
|
}
|
|
3656
3656
|
}
|
|
3657
3657
|
},
|
|
3658
|
+
baseElementMissing: {
|
|
3659
|
+
summary: 'base element missing where required',
|
|
3660
|
+
why: 'Browser cannot find a needed external resource',
|
|
3661
|
+
wcag: '1.3.1',
|
|
3662
|
+
weight: 4,
|
|
3663
|
+
tools: {
|
|
3664
|
+
nuVal: {
|
|
3665
|
+
'The base element must come before any link or script elements in the document.': {
|
|
3666
|
+
variable: false,
|
|
3667
|
+
quality: 1,
|
|
3668
|
+
what: 'Element is a link or script element requiring a preceding base element but has none'
|
|
3669
|
+
}
|
|
3670
|
+
},
|
|
3671
|
+
nuVnu: {
|
|
3672
|
+
'The base element must come before any link or script elements in the document.': {
|
|
3673
|
+
variable: false,
|
|
3674
|
+
quality: 1,
|
|
3675
|
+
what: 'Element is a link or script element requiring a preceding base element but has none'
|
|
3676
|
+
}
|
|
3677
|
+
}
|
|
3678
|
+
}
|
|
3679
|
+
},
|
|
3658
3680
|
linkElementMisplaced: {
|
|
3659
3681
|
summary: 'link element invalid',
|
|
3660
3682
|
why: 'Document fails to get a needed external resource',
|
|
@@ -4265,6 +4287,11 @@ exports.issues = {
|
|
|
4265
4287
|
variable: false,
|
|
4266
4288
|
quality: 1,
|
|
4267
4289
|
what: 'element is li in a listbox or list but has no group or option role'
|
|
4290
|
+
},
|
|
4291
|
+
'An element with role=group must not be a descendant of an element with role=list.': {
|
|
4292
|
+
variable: false,
|
|
4293
|
+
quality: 1,
|
|
4294
|
+
what: 'element has a group role but has an ancestor with a list role'
|
|
4268
4295
|
}
|
|
4269
4296
|
},
|
|
4270
4297
|
nuVnu: {
|
|
@@ -4287,6 +4314,11 @@ exports.issues = {
|
|
|
4287
4314
|
variable: false,
|
|
4288
4315
|
quality: 1,
|
|
4289
4316
|
what: 'element is li in a listbox or list but has no group or option role'
|
|
4317
|
+
},
|
|
4318
|
+
'An element with role=group must not be a descendant of an element with role=list.': {
|
|
4319
|
+
variable: false,
|
|
4320
|
+
quality: 1,
|
|
4321
|
+
what: 'element has a group role but has an ancestor with a list role'
|
|
4290
4322
|
}
|
|
4291
4323
|
}
|
|
4292
4324
|
}
|
package/procs/score/tsp50.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
© 2024 CVS Health and/or one of its affiliates. All rights reserved.
|
|
3
|
+
© 2026 Jeff Witt. All rights reserved.
|
|
3
4
|
|
|
4
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -263,11 +264,12 @@ exports.scorer = report => {
|
|
|
263
264
|
.texts
|
|
264
265
|
.push(what);
|
|
265
266
|
}
|
|
266
|
-
issuePaths[issueName] ??=
|
|
267
|
+
issuePaths[issueName] ??= {};
|
|
267
268
|
// If the element has a path ID:
|
|
268
269
|
if (pathID) {
|
|
269
|
-
// Ensure that it is in the issue-specific
|
|
270
|
-
issuePaths[issueName]
|
|
270
|
+
// Ensure that it is in the issue-specific map of paths to tools.
|
|
271
|
+
issuePaths[issueName][pathID] ??= new Set();
|
|
272
|
+
issuePaths[issueName][pathID].add(which);
|
|
271
273
|
}
|
|
272
274
|
}
|
|
273
275
|
}
|
|
@@ -323,6 +325,10 @@ exports.scorer = report => {
|
|
|
323
325
|
issueData.instanceCounts[toolName] = 0;
|
|
324
326
|
}
|
|
325
327
|
});
|
|
328
|
+
// Add the count of unique path-identified elements for the issue.
|
|
329
|
+
if (issuePaths[issueName]) {
|
|
330
|
+
issueData.uniqueElementCount = Object.keys(issuePaths[issueName]).length;
|
|
331
|
+
}
|
|
326
332
|
});
|
|
327
333
|
// Add the severity detail totals to the score.
|
|
328
334
|
details.severity.total = Object
|
|
@@ -333,9 +339,22 @@ exports.scorer = report => {
|
|
|
333
339
|
});
|
|
334
340
|
return severityTotals;
|
|
335
341
|
}, details.severity.total);
|
|
336
|
-
// Add the element details to the score.
|
|
342
|
+
// Add the element details to the score, grouped by detecting tools.
|
|
337
343
|
Object.keys(issuePaths).forEach(issueID => {
|
|
338
|
-
details.element[issueID] =
|
|
344
|
+
details.element[issueID] = {};
|
|
345
|
+
const issueElementDetails = details.element[issueID];
|
|
346
|
+
// For each element reported as exhibiting the issue:
|
|
347
|
+
Object.keys(issuePaths[issueID]).forEach(pathID => {
|
|
348
|
+
// Convert the set of tools reporting it to a string.
|
|
349
|
+
const toolList = Array.from(issuePaths[issueID][pathID]).sort().join(' + ');
|
|
350
|
+
issueElementDetails[toolList] ??= [];
|
|
351
|
+
// Classify the path by the set of tools reporting its element for the issue.
|
|
352
|
+
issueElementDetails[toolList].push(pathID);
|
|
353
|
+
});
|
|
354
|
+
// Sort the paths within each tool list.
|
|
355
|
+
Object.keys(issueElementDetails).forEach(toolList => {
|
|
356
|
+
issueElementDetails[toolList].sort();
|
|
357
|
+
});
|
|
339
358
|
});
|
|
340
359
|
// Add the summary issue-count total to the score.
|
|
341
360
|
summary.issueCount = Object.keys(details.issue).length * issueCountWeight;
|