testaro 2.3.8 → 2.3.11

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 CHANGED
@@ -1,10 +1,10 @@
1
1
  # testaro
2
2
 
3
- Accessibility test automation
3
+ Federated accessibility test automation
4
4
 
5
5
  ## Summary
6
6
 
7
- Testaro is a collection of web accessibility tests.
7
+ Testaro is a collection of collections of web accessibility tests.
8
8
 
9
9
  The purpose of Testaro is to provide programmatic access to over 600 accessibility tests defined in several test packages and in Testaro itself.
10
10
 
@@ -464,6 +464,7 @@ The rationales motivating the Testaro-defined tests and scoring procs can be fou
464
464
  ### Future work
465
465
 
466
466
  Further development is contemplated, is taking place, or is welcomed, on:
467
+ - addition of Tenon to the set of packages
467
468
  - links with href="#"
468
469
  - links and buttons styled non-distinguishably
469
470
  - first focused element not first focusable element in DOM
@@ -472,8 +473,6 @@ Further development is contemplated, is taking place, or is welcomed, on:
472
473
  - modal dialogs
473
474
  - autocomplete attributes
474
475
 
475
- Additional test packages may be integratable into Testaro. The [`bbc-a11y`](https://github.com/bbc/bbc-a11y) package has been considered, but it has not been updated since 2018 and has vulnerable dependencies.
476
-
477
476
  ## Testing challenges
478
477
 
479
478
  ### Activation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "testaro",
3
- "version": "2.3.8",
3
+ "version": "2.3.11",
4
4
  "description": "Automation of accessibility testing",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -255,7 +255,7 @@ exports.scorer = acts => {
255
255
  facts = test.result;
256
256
  if (facts && facts.content && facts.url && (facts.content.totals || facts.url.totals)) {
257
257
  rules.ibm = 'multiply violations by 4*, recommendations by 2* (*discounted); sum';
258
- const scores = {
258
+ const ibmScores = {
259
259
  content: null,
260
260
  url: null
261
261
  };
@@ -263,7 +263,7 @@ exports.scorer = acts => {
263
263
  const totals = facts[type].totals;
264
264
  if (totals) {
265
265
  const items = facts[type].items || [];
266
- scores[type] = Math.round(items.reduce((total, item) => {
266
+ ibmScores[type] = Math.round(items.reduce((total, item) => {
267
267
  const {ruleId, level} = item;
268
268
  const rawScore = [4, 2][['violation', 'recommendation'].indexOf(level)] || 0;
269
269
  const divisor = duplications.ibm[`${level.slice(0, 1)}:${ruleId}`] + 1 || 1;
@@ -271,8 +271,8 @@ exports.scorer = acts => {
271
271
  }, 0));
272
272
  }
273
273
  });
274
- if (scores.content !== null || scores.url !== null) {
275
- scores.ibm = Math.max(scores.content || 0, scores.url || 0);
274
+ if (ibmScores.content !== null || ibmScores.url !== null) {
275
+ scores.ibm = Math.max(ibmScores.content || 0, ibmScores.url || 0);
276
276
  scores.total += scores.ibm;
277
277
  }
278
278
  }
package/tests/ibm.js CHANGED
@@ -18,7 +18,7 @@
18
18
  };
19
19
  */
20
20
  // Import required modules.
21
- const fs = require('fs/promises');
21
+ const fs = require('fs').promises;
22
22
  const {getCompliance} = require('accessibility-checker');
23
23
  // Runs the IBM test.
24
24
  const run = async content => {
package/tests/radioSet.js CHANGED
@@ -4,7 +4,7 @@
4
4
  that two or more radio buttons with the same name, and no other radio buttons, be grouped in a
5
5
  'fieldset' element with a valid 'legend' element.
6
6
  */
7
- const fs = require('fs/promises');
7
+ const fs = require('fs').promises;
8
8
  // Tabulates and lists radio buttons in and not in accessible field sets.
9
9
  exports.reporter = async (page, withItems) => {
10
10
  // Initialize the argument array to be passed to the page function.