testilo 15.2.1 → 15.2.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/README.md +4 -4
- package/package.json +1 -1
- package/procs/digest/tdp31/index.js +2 -2
- package/procs/digest/tdp33/index.js +2 -2
package/README.md
CHANGED
|
@@ -207,13 +207,13 @@ A module can invoke `script` in this way:
|
|
|
207
207
|
|
|
208
208
|
```javaScript
|
|
209
209
|
const {script} = require('testilo/script');
|
|
210
|
-
const scriptObj = script(scriptID,
|
|
210
|
+
const scriptObj = script(scriptID, issues, issueID0, issueID1, …);
|
|
211
211
|
```
|
|
212
212
|
|
|
213
|
-
This invocation references `scriptID`, `
|
|
213
|
+
This invocation references `scriptID`, `issues`, and `issueID` variables.
|
|
214
214
|
- The `scriptID` variable is an alphanumeric string.
|
|
215
|
-
- The `
|
|
216
|
-
- The `issueID` variables are strings, such as `'regionNoText'`, that name of properties of the `
|
|
215
|
+
- The `issues` variable is an object that classifies issues, such as the `issues` object in a `tic` file.
|
|
216
|
+
- The `issueID` variables are strings, such as `'regionNoText'`, that name of properties of the `issues` object.
|
|
217
217
|
|
|
218
218
|
The `script()` function of the `script` module generates a script and returns it as an object. The invoking module can further dispose of the script as needed.
|
|
219
219
|
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// IMPORTS
|
|
4
4
|
|
|
5
5
|
// Issue classification
|
|
6
|
-
const {
|
|
6
|
+
const {issues} = require('../../score/tic31');
|
|
7
7
|
// Function to process files.
|
|
8
8
|
const fs = require('fs/promises');
|
|
9
9
|
|
|
@@ -62,7 +62,7 @@ const populateQuery = (report, query) => {
|
|
|
62
62
|
const issueDetailRows = [];
|
|
63
63
|
issueIDs.forEach(issueID => {
|
|
64
64
|
issueDetailRows.push(`<h3 class="bars">Issue <code>${issueID}</code></h3>`);
|
|
65
|
-
issueDetailRows.push(`<p>WCAG: ${
|
|
65
|
+
issueDetailRows.push(`<p>WCAG: ${issues[issueID].wcag || 'N/A'}</p>`);
|
|
66
66
|
const issueData = details.issue[issueID];
|
|
67
67
|
issueDetailRows.push(`<p>Score: ${issueData.score}</p>`);
|
|
68
68
|
const toolIDs = Object.keys(issueData.tools);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// IMPORTS
|
|
4
4
|
|
|
5
5
|
// Issue classification
|
|
6
|
-
const {
|
|
6
|
+
const {issues} = require('../../score/tic33');
|
|
7
7
|
// Function to process files.
|
|
8
8
|
const fs = require('fs/promises');
|
|
9
9
|
|
|
@@ -62,7 +62,7 @@ const populateQuery = (report, query) => {
|
|
|
62
62
|
const issueDetailRows = [];
|
|
63
63
|
issueIDs.forEach(issueID => {
|
|
64
64
|
issueDetailRows.push(`<h3 class="bars">Issue <code>${issueID}</code></h3>`);
|
|
65
|
-
issueDetailRows.push(`<p>WCAG: ${
|
|
65
|
+
issueDetailRows.push(`<p>WCAG: ${issues[issueID].wcag || 'N/A'}</p>`);
|
|
66
66
|
const issueData = details.issue[issueID];
|
|
67
67
|
issueDetailRows.push(`<p>Score: ${issueData.score}</p>`);
|
|
68
68
|
const toolIDs = Object.keys(issueData.tools);
|