testaro 26.2.0 → 26.3.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.
@@ -1,21 +0,0 @@
1
- /*
2
- linkExt
3
- Related to Tenon rule 218, but stricter.
4
- This test reports links with target attributes with _blank values, because forcibly external links
5
- risk miscommunication of the externality and remove control from the user.
6
- */
7
-
8
- // Module to perform common operations.
9
- const {init, report} = require('../procs/testaro');
10
-
11
- // ########## FUNCTIONS
12
-
13
- // Runs the test and returns the result.
14
- exports.reporter = async (page, withItems) => {
15
- // Initialize the locators and result.
16
- const all = await init(page, 'a[target=_blank]');
17
- all.locs = all.allLocs;
18
- // Populate and return the result.
19
- const whats = ['Link has a target=_blank attribute', 'Links have target=_blank attributes'];
20
- return await report(withItems, all, 'linkExt', whats, 0);
21
- };
package/testaro/linkTo.js DELETED
@@ -1,20 +0,0 @@
1
- /*
2
- linkTo
3
- Derived from the bbc-a11y anchorsMustHaveHrefs test.
4
- This test reports failures to equip links with destinations.
5
- */
6
-
7
- // Module to perform common operations.
8
- const {init, report} = require('../procs/testaro');
9
-
10
- // ########## FUNCTIONS
11
-
12
- // Runs the test and returns the result.
13
- exports.reporter = async (page, withItems) => {
14
- // Initialize the locators and result.
15
- const all = await init(page, 'a:not([href]):visible');
16
- all.locs = all.allLocs;
17
- // Populate and return the result.
18
- const whats = ['Link has no href attribute', 'Links are missing href attributes'];
19
- return await report(withItems, all, 'linkTo', whats, 2, 'A');
20
- };
@@ -1,24 +0,0 @@
1
- /*
2
- titledEl
3
- Derived from the bbc-a11y titleAttributesOnlyOnInputs test.
4
- This test reports title attributes on inappropriate elements.
5
- */
6
-
7
- // ########## IMPORTS
8
-
9
- // Module to perform common operations.
10
- const {init, report} = require('../procs/testaro');
11
-
12
- // ########## FUNCTIONS
13
-
14
- // Runs the test and returns the result.
15
- exports.reporter = async (page, withItems) => {
16
- // Initialize the locators and result.
17
- const all = await init(page, '[title]:not(input, button, textarea, select, iframe):visible');
18
- all.locs = all.allLocs;
19
- // Populate and return the result.
20
- const whats = [
21
- 'Ineligible element has a title attribute', 'Ineligible elements have title attributes'
22
- ];
23
- return await report(withItems, all, 'titledEl', whats, 2);
24
- };