testaro 60.16.0 → 60.16.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 +1 -1
- package/testaro/adbID.js +2 -4
- package/testaro/allCaps.js +1 -2
- package/testaro/allSlanted.js +1 -2
- package/testaro/altScheme.js +1 -1
- package/testaro/bulk.js +1 -6
- package/testaro/buttonMenu.js +1 -6
- package/testaro/captionLoc.js +1 -1
- package/testaro/datalistRef.js +1 -1
- package/testaro/distortion.js +1 -2
- package/testaro/elements.js +5 -6
- package/testaro/embAc.js +1 -4
- package/testaro/focAll.js +1 -7
- package/testaro/focAndOp.js +1 -8
- package/testaro/focInd.js +3 -10
- package/testaro/hovInd.js +1 -1
- package/testaro/hover.js +1 -5
- package/testaro/imageLink.js +2 -1
- package/testaro/labClash.js +1 -3
- package/testaro/legendLoc.js +2 -1
- package/testaro/lineHeight.js +1 -4
- package/testaro/linkAmb.js +1 -2
- package/testaro/linkUl.js +1 -6
- package/testaro/motion.js +3 -10
- package/testaro/motionSolo.js +3 -14
- package/testaro/optRoleSel.js +2 -1
- package/testaro/phOnly.js +2 -4
- package/testaro/radioSet.js +1 -3
- package/testaro/secHeading.js +1 -5
- package/testaro/styleDiff.js +1 -4
- package/testaro/tabNav.js +1 -2
- package/testaro/targetSmall.js +1 -5
- package/testaro/textNodes.js +6 -5
- package/testaro/textSem.js +1 -1
- package/testaro/zIndex.js +18 -30
package/package.json
CHANGED
package/testaro/adbID.js
CHANGED
|
@@ -11,10 +11,8 @@
|
|
|
11
11
|
|
|
12
12
|
/*
|
|
13
13
|
adbID
|
|
14
|
-
Clean-room rule
|
|
15
|
-
or, because of duplicate IDs, ambiguous. An earlier version of this test was
|
|
16
|
-
originally developed under a clean-room procedure to ensure its independence from
|
|
17
|
-
the implementation of a test for a similar rule in the Tenon tool.
|
|
14
|
+
Clean-room rule
|
|
15
|
+
This test reports elements referencing aria-describedby targets that are missing or, because of duplicate IDs, ambiguous. An earlier version of this test was originally developed under a clean-room procedure to ensure its independence from the implementation of a test for a similar rule in the Tenon tool.
|
|
18
16
|
*/
|
|
19
17
|
|
|
20
18
|
// IMPORTS
|
package/testaro/allCaps.js
CHANGED
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
/*
|
|
12
12
|
allCaps
|
|
13
13
|
Related to Tenon rule 153.
|
|
14
|
-
This test reports elements with native or transformed upper-case text at least 8 characters long.
|
|
15
|
-
Blocks of upper-case text are difficult to read.
|
|
14
|
+
This test reports elements with native or transformed upper-case text at least 8 characters long. Blocks of upper-case text are difficult to read.
|
|
16
15
|
*/
|
|
17
16
|
|
|
18
17
|
// ########## IMPORTS
|
package/testaro/allSlanted.js
CHANGED
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
/*
|
|
12
12
|
allSlanted
|
|
13
13
|
Related to Tenon rule 154.
|
|
14
|
-
This test reports elements with italic or oblique text at least 40 characters long. Blocks of
|
|
15
|
-
slanted text are difficult to read.
|
|
14
|
+
This test reports elements with italic or oblique text at least 40 characters long. Blocks of slanted text are difficult to read.
|
|
16
15
|
*/
|
|
17
16
|
|
|
18
17
|
// ########## IMPORTS
|
package/testaro/altScheme.js
CHANGED
package/testaro/bulk.js
CHANGED
|
@@ -10,12 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
/*
|
|
12
12
|
bulk
|
|
13
|
-
This test reports the count of visible elements.
|
|
14
|
-
|
|
15
|
-
The test assumes that simplicity and compactness, with one page having one purpose,
|
|
16
|
-
is an accessibility virtue. Users with visual, motor, and cognitive disabilities
|
|
17
|
-
often have trouble finding what they want or understanding the purpose of a page
|
|
18
|
-
if the page is cluttered with content.
|
|
13
|
+
This test reports the count of visible elements. The test assumes that simplicity and compactness, with one page having one purpose, is an accessibility virtue. Users with visual, motor, and cognitive disabilities often have trouble finding what they want or understanding the purpose of a page if the page is cluttered with content.
|
|
19
14
|
*/
|
|
20
15
|
exports.reporter = async page => {
|
|
21
16
|
// Get a count of elements deemed visible by Playwright.
|
package/testaro/buttonMenu.js
CHANGED
|
@@ -10,12 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
/*
|
|
12
12
|
buttonMenu
|
|
13
|
-
This test reports nonstandard navigation among menu items of button-controlled menus.
|
|
14
|
-
Standards are based on https://www.w3.org/TR/wai-aria-practices-1.1/#menu. The trialKeys argument
|
|
15
|
-
is an array of strings, each of which may be 'Home', 'End', '+', or '-'. The '+' string represents
|
|
16
|
-
the ArrowDown or ArrowRight key, and the '-' string represents the ArrowUp or ArrowLeft key,
|
|
17
|
-
depending on the orientation of the current menu. When the trialKeys argument is missing or is an
|
|
18
|
-
empty array, 12 keys are selected at random.
|
|
13
|
+
This test reports nonstandard navigation among menu items of button-controlled menus. Standards are based on https://www.w3.org/TR/wai-aria-practices-1.1/#menu. The trialKeys argument is an array of strings, each of which may be 'Home', 'End', '+', or '-'. The '+' string represents the ArrowDown or ArrowRight key, and the '-' string represents the ArrowUp or ArrowLeft key, depending on the orientation of the current menu. When the trialKeys argument is missing or is an empty array, 12 keys are selected at random.
|
|
19
14
|
*/
|
|
20
15
|
|
|
21
16
|
// ########## IMPORTS
|
package/testaro/captionLoc.js
CHANGED
package/testaro/datalistRef.js
CHANGED
package/testaro/distortion.js
CHANGED
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
/*
|
|
12
12
|
distortion
|
|
13
13
|
Related to Tenon rule 271.
|
|
14
|
-
This test reports elements whose transform style properties distort the content. Distortion makes
|
|
15
|
-
text difficult to read.
|
|
14
|
+
This test reports elements whose transform style properties distort the content. Distortion makes text difficult to read.
|
|
16
15
|
*/
|
|
17
16
|
|
|
18
17
|
// ########## IMPORTS
|
package/testaro/elements.js
CHANGED
|
@@ -9,12 +9,11 @@
|
|
|
9
9
|
|
|
10
10
|
/*
|
|
11
11
|
elements
|
|
12
|
-
This test reports data about specified elements within the document body.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
3. Data on each specified element also include data on its sibling nodes.
|
|
12
|
+
This test reports data about specified elements within the document body. Meanings of detailLevel values:
|
|
13
|
+
0. Only total element count; no detail.
|
|
14
|
+
1. Also data on each specified element.
|
|
15
|
+
2. Data on each specified element also include the text content of the parent element.
|
|
16
|
+
3. Data on each specified element also include data on its sibling nodes.
|
|
18
17
|
*/
|
|
19
18
|
exports.reporter = async (
|
|
20
19
|
page, withItems, detailLevel = 0, tagName = null, onlyVisible = false, attribute
|
package/testaro/embAc.js
CHANGED
|
@@ -9,10 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
/*
|
|
11
11
|
embAc
|
|
12
|
-
This test reports interactive elements (links, buttons, inputs, and select lists)
|
|
13
|
-
contained by links or buttons. Such embedding not only violates the HTML standard,
|
|
14
|
-
but also complicates user interaction and creates risks of error. It becomes
|
|
15
|
-
non-obvious what a user will activate with a click.
|
|
12
|
+
This test reports interactive elements (links, buttons, inputs, and select lists) contained by links or buttons. Such embedding not only violates the HTML standard, but also complicates user interaction and creates risks of error. It becomes non-obvious what a user will activate with a click.
|
|
16
13
|
*/
|
|
17
14
|
|
|
18
15
|
// IMPORTS
|
package/testaro/focAll.js
CHANGED
|
@@ -10,13 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
/*
|
|
12
12
|
focAll
|
|
13
|
-
This test reports discrepancies between focusable and Tab-focused element counts. The test first
|
|
14
|
-
counts all the visible focusable (i.e. with tabIndex 0) elements (except counting each group of
|
|
15
|
-
radio buttons as only one focusable element). Then it repeatedly presses the Tab (or Option-Tab
|
|
16
|
-
in webkit) key until it has reached all the elements it can and counts those elements. If the
|
|
17
|
-
two counts differ, navigation can be made more difficult. The cause may be surprising changes in
|
|
18
|
-
content during navigation with the Tab key, or inability to reach every focusable element (or
|
|
19
|
-
widget, such as one radio button or tab in each group) merely by pressing the Tab key.
|
|
13
|
+
This test reports discrepancies between focusable and Tab-focused element counts. The test first counts all the visible focusable (i.e. with tabIndex 0) elements (except counting each group of radio buttons as only one focusable element). Then it repeatedly presses the Tab (or Option-Tab in webkit) key until it has reached all the elements it can and counts those elements. If the two counts differ, navigation can be made more difficult. The cause may be surprising changes in content during navigation with the Tab key, or inability to reach every focusable element (or widget, such as one radio button or tab in each group) merely by pressing the Tab key.
|
|
20
14
|
*/
|
|
21
15
|
exports.reporter = async page => {
|
|
22
16
|
// Get locators of visible elements.
|
package/testaro/focAndOp.js
CHANGED
|
@@ -12,14 +12,7 @@
|
|
|
12
12
|
focAndOp
|
|
13
13
|
Related to Tenon rule 190.
|
|
14
14
|
|
|
15
|
-
This test reports discrepancies between Tab-focusability and operability. The standard practice
|
|
16
|
-
is to make focusable elements operable and operable elements focusable. If focusable elements are
|
|
17
|
-
not operable, users are likely to be surprised that nothing happens when they try to operate such
|
|
18
|
-
elements. Conversely, if operable elements are not focusable, users who navigate with a
|
|
19
|
-
keyboard are prevented from operating those elements. The test considers an element
|
|
20
|
-
Tab-focusable if its tabIndex property has the value 0. The test considers an element operable if
|
|
21
|
-
it has a non-inherited pointer cursor and is not a 'LABEL' element, has an operable tag name, has
|
|
22
|
-
an interactive explicit role, or has an 'onclick' attribute.
|
|
15
|
+
This test reports discrepancies between Tab-focusability and operability. The standard practice is to make focusable elements operable and operable elements focusable. If focusable elements are not operable, users are likely to be surprised that nothing happens when they try to operate such elements. Conversely, if operable elements are not focusable, users who navigate with a keyboard are prevented from operating those elements. The test considers an element Tab-focusable if its tabIndex property has the value 0. The test considers an element operable if it has a non-inherited pointer cursor and is not a 'LABEL' element, has an operable tag name, has an interactive explicit role, or has an 'onclick' attribute.
|
|
23
16
|
*/
|
|
24
17
|
|
|
25
18
|
// IMPORTS
|
package/testaro/focInd.js
CHANGED
|
@@ -11,18 +11,11 @@
|
|
|
11
11
|
/*
|
|
12
12
|
focInd
|
|
13
13
|
|
|
14
|
-
This test reports focusable elements without standard focus indicators. The standard focus
|
|
15
|
-
indicator is deemed to be a solid outline with a line thickness of at least 2 pixels and a
|
|
16
|
-
non-transparent color, and only if the element, when not focused, has no outline.
|
|
14
|
+
This test reports focusable elements without standard focus indicators. The standard focus indicator is deemed to be a solid outline with a line thickness of at least 2 pixels and a non-transparent color, and only if the element, when not focused, has no outline.
|
|
17
15
|
|
|
18
|
-
The focus indicator is checked immediately after the element is focused. Thus, a delayed focus
|
|
19
|
-
indicator is ignored. Indication delayed is treated as indication denied. The bases for this
|
|
20
|
-
treatment are that delayed indication interferes with rapid human or mechanized document
|
|
21
|
-
consumption and also, if it must be respected, slows accessibility testing.
|
|
16
|
+
The focus indicator is checked immediately after the element is focused. Thus, a delayed focus indicator is ignored. Indication delayed is treated as indication denied. The bases for this treatment are that delayed indication interferes with rapid human or mechanized document consumption and also, if it must be respected, slows accessibility testing.
|
|
22
17
|
|
|
23
|
-
Solid outlines are the standard and thus most familiar focus indicator. Other focus indicators
|
|
24
|
-
are likely to be misunderstood. For example, underlines may be mistaken for selection or link
|
|
25
|
-
indicators.
|
|
18
|
+
Solid outlines are the standard and thus most familiar focus indicator. Other focus indicators are likely to be misunderstood. For example, underlines may be mistaken for selection or link indicators.
|
|
26
19
|
|
|
27
20
|
WARNING: This test fails to recognize outlines when run with firefox.
|
|
28
21
|
*/
|
package/testaro/hovInd.js
CHANGED
package/testaro/hover.js
CHANGED
|
@@ -10,11 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
/*
|
|
12
12
|
hover
|
|
13
|
-
This test reports unexpected impacts of hovering. The elements that are subjected to hovering
|
|
14
|
-
(called “triggers”) include all the elements that have attributes associated with control over
|
|
15
|
-
the visibility of other elements. If hovering over an element results in an increase or decrease
|
|
16
|
-
in the total count of visible elements in the tree rooted in the grandparent of the trigger,
|
|
17
|
-
the rule is considered violated.
|
|
13
|
+
This test reports unexpected impacts of hovering. The elements that are subjected to hovering (called “triggers”) include all the elements that have attributes associated with control over the visibility of other elements. If hovering over an element results in an increase or decrease in the total count of visible elements in the tree rooted in the grandparent of the trigger, the rule is considered violated.
|
|
18
14
|
*/
|
|
19
15
|
|
|
20
16
|
// IMPORTS
|
package/testaro/imageLink.js
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
/*
|
|
12
12
|
imageLink
|
|
13
|
-
Clean-room rule
|
|
13
|
+
Clean-room rule.
|
|
14
|
+
This test reports anchor elements whose href attributes point to image files.
|
|
14
15
|
*/
|
|
15
16
|
|
|
16
17
|
const {simplify} = require('../procs/testaro');
|
package/testaro/labClash.js
CHANGED
|
@@ -10,9 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
/*
|
|
12
12
|
labClash
|
|
13
|
-
This test reports redundant labeling of buttons, non-hidden inputs, select lists, and text areas.
|
|
14
|
-
Redundant labels are labels that are superseded by other labels. Explicit and implicit (wrapped)
|
|
15
|
-
labels are additive, not conflicting.
|
|
13
|
+
This test reports redundant labeling of buttons, non-hidden inputs, select lists, and text areas. Redundant labels are labels that are superseded by other labels. Explicit and implicit (wrapped) labels are additive, not conflicting.
|
|
16
14
|
*/
|
|
17
15
|
|
|
18
16
|
// IMPORTS
|
package/testaro/legendLoc.js
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
/*
|
|
12
12
|
legendLoc
|
|
13
|
-
Clean-room rule
|
|
13
|
+
Clean-room rule.
|
|
14
|
+
This test reports legend elements that are not the first children of fieldset elements.
|
|
14
15
|
*/
|
|
15
16
|
|
|
16
17
|
const {simplify} = require('../procs/testaro');
|
package/testaro/lineHeight.js
CHANGED
|
@@ -11,10 +11,7 @@
|
|
|
11
11
|
/*
|
|
12
12
|
lineHeight
|
|
13
13
|
Related to Tenon rule 144.
|
|
14
|
-
This test reports elements whose line heights are less than 1.5 times their font sizes. Even
|
|
15
|
-
such elements with no text create accessibility risk, because any text node added to one of
|
|
16
|
-
them would have a substandard line height. Nonetheless, elements with no non-spacing text in
|
|
17
|
-
their subtrees are excluded.
|
|
14
|
+
This test reports elements whose line heights are less than 1.5 times their font sizes. Even such elements with no text create accessibility risk, because any text node added to one of them would have a substandard line height. Nonetheless, elements with no non-spacing text in their subtrees are excluded.
|
|
18
15
|
*/
|
|
19
16
|
|
|
20
17
|
// IMPORTS
|
package/testaro/linkAmb.js
CHANGED
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
/*
|
|
12
12
|
linkAmb
|
|
13
13
|
Related to Tenon rule 98.
|
|
14
|
-
This test reports text contents that are shared by links with distinct destinations.
|
|
15
|
-
Text contents are compared case-insensitively.
|
|
14
|
+
This test reports text contents that are shared by links with distinct destinations. Text contents are compared case-insensitively.
|
|
16
15
|
*/
|
|
17
16
|
|
|
18
17
|
// FUNCTIONS
|
package/testaro/linkUl.js
CHANGED
|
@@ -10,12 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
/*
|
|
12
12
|
linkUl
|
|
13
|
-
This test reports failures to underline inline links. Underlining and color are the traditional
|
|
14
|
-
style properties that identify links. Lists of links containing only links can be recognized
|
|
15
|
-
without underlines, but other links are difficult or impossible to distinguish visually from
|
|
16
|
-
surrounding text if not underlined. Underlining adjacent links only on hover provides an
|
|
17
|
-
indicator valuable only to mouse users, and even they must traverse the text with a mouse
|
|
18
|
-
merely to discover which passages are links.
|
|
13
|
+
This test reports failures to underline inline links. Underlining and color are the traditional style properties that identify links. Lists of links containing only links can be recognized without underlines, but other links are difficult or impossible to distinguish visually from surrounding text if not underlined. Underlining adjacent links only on hover provides an indicator valuable only to mouse users, and even they must traverse the text with a mouse merely to discover which passages are links.
|
|
19
14
|
*/
|
|
20
15
|
|
|
21
16
|
// ########## IMPORTS
|
package/testaro/motion.js
CHANGED
|
@@ -5,18 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
7
|
motion
|
|
8
|
-
This test reports motion in a page by comparing the first and last of the screenshots previously
|
|
9
|
-
made by the shoot0 and shoot1 tests.
|
|
8
|
+
This test reports motion in a page by comparing the first and last of the screenshots previously made by the shoot0 and shoot1 tests.
|
|
10
9
|
|
|
11
|
-
For minimal accessibility, standards require motion to be brief, or else stoppable by the user.
|
|
12
|
-
But stopping motion can be difficult or impossible, and, by the time a user manages to stop
|
|
13
|
-
motion, the motion may have caused annoyance or harm. For superior accessibility, a page contains
|
|
14
|
-
no motion until and unless the user authorizes it. The test reports a rule violation if any
|
|
15
|
-
pixels differ between the screenshots. The larger the change fraction, the greater the
|
|
16
|
-
ordinal severity.
|
|
10
|
+
For minimal accessibility, standards require motion to be brief, or else stoppable by the user. But stopping motion can be difficult or impossible, and, by the time a user manages to stop motion, the motion may have caused annoyance or harm. For superior accessibility, a page contains no motion until and unless the user authorizes it. The test reports a rule violation if any pixels differ between the screenshots. The larger the change fraction, the greater the ordinal severity.
|
|
17
11
|
|
|
18
|
-
WARNING: The shoot test uses the procs/screenShot module. See the warning in that module about
|
|
19
|
-
browser types.
|
|
12
|
+
WARNING: The shoot test uses the procs/screenShot module. See the warning in that module about browser types.
|
|
20
13
|
*/
|
|
21
14
|
|
|
22
15
|
// IMPORTS
|
package/testaro/motionSolo.js
CHANGED
|
@@ -10,22 +10,11 @@
|
|
|
10
10
|
|
|
11
11
|
/*
|
|
12
12
|
motion
|
|
13
|
-
This test reports motion in a page. For minimal accessibility, standards require motion to be
|
|
14
|
-
brief, or else stoppable by the user. But stopping motion can be difficult or impossible, and,
|
|
15
|
-
by the time a user manages to stop motion, the motion may have caused annoyance or harm. For
|
|
16
|
-
superior accessibility, a page contains no motion until and unless the user authorizes it. The
|
|
17
|
-
test compares two screen shots of the viewport 2 seconds and 6 seconds after page load. It
|
|
18
|
-
reports a rule violation if any pixels change. The larger the change fraction, the greater the
|
|
19
|
-
ordinal severity.
|
|
13
|
+
This test reports motion in a page. For minimal accessibility, standards require motion to be brief, or else stoppable by the user. But stopping motion can be difficult or impossible, and, by the time a user manages to stop motion, the motion may have caused annoyance or harm. For superior accessibility, a page contains no motion until and unless the user authorizes it. The test compares two screen shots of the viewport 2 seconds and 6 seconds after page load. It reports a rule violation if any pixels change. The larger the change fraction, the greater the ordinal severity.
|
|
20
14
|
|
|
21
|
-
This test is an alternative to the motion test. Whereas the motion test relies on screenshots made
|
|
22
|
-
earlier in the same job by the shoot test, this test makes its own screenshots. MotionSolo waits
|
|
23
|
-
several seconds between its screenshots to allow time for motion to occur. That mait makes
|
|
24
|
-
motionSolo, and any job containing it, take longer than the combination of shoot tests and the
|
|
25
|
-
motion test.
|
|
15
|
+
This test is an alternative to the motion test. Whereas the motion test relies on screenshots made earlier in the same job by the shoot test, this test makes its own screenshots. MotionSolo waits several seconds between its screenshots to allow time for motion to occur. That wait makes motionSolo, and any job containing it, take longer than the combination of shoot tests and the motion test.
|
|
26
16
|
|
|
27
|
-
WARNING: This test uses the procs/visChange module. See the warning in that module about browser
|
|
28
|
-
types.
|
|
17
|
+
WARNING: This test uses the procs/visChange module. See the warning in that module about browser types.
|
|
29
18
|
*/
|
|
30
19
|
|
|
31
20
|
// IMPORTS
|
package/testaro/optRoleSel.js
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
/*
|
|
12
12
|
optRoleSel
|
|
13
|
-
Clean-room rule
|
|
13
|
+
Clean-room rule.
|
|
14
|
+
This test reports elements with role="option" that are missing aria-selected attributes.
|
|
14
15
|
*/
|
|
15
16
|
|
|
16
17
|
const {simplify} = require('../procs/testaro');
|
package/testaro/phOnly.js
CHANGED
|
@@ -11,10 +11,8 @@
|
|
|
11
11
|
|
|
12
12
|
/*
|
|
13
13
|
phOnly
|
|
14
|
-
Clean-room rule
|
|
15
|
-
The standard for accessible name computation is employed; it accepts title attributes as
|
|
16
|
-
sources for accessible names. Thus, this test does not report reliance on title attributes for
|
|
17
|
-
accessible names, although such reliance is generally considered a poor practice.
|
|
14
|
+
Clean-room rule.
|
|
15
|
+
This test reports input elements that have placeholders but no accessible names. The standard for accessible name computation is employed; it accepts title attributes as sources for accessible names. Thus, this test does not report reliance on title attributes for accessible names, although such reliance is generally considered a poor practice.
|
|
18
16
|
*/
|
|
19
17
|
|
|
20
18
|
// IMPORTS
|
package/testaro/radioSet.js
CHANGED
|
@@ -10,9 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
/*
|
|
12
12
|
radioSet
|
|
13
|
-
This test reports nonstandard groupings of radio buttons. It defines a standard grouping to
|
|
14
|
-
require that two or more radio buttons with the same name, and no other radio buttons, be grouped
|
|
15
|
-
in a fieldset element with a valid legend element.
|
|
13
|
+
This test reports nonstandard groupings of radio buttons. It defines a standard grouping to require that two or more radio buttons with the same name, and no other radio buttons, be grouped in a fieldset element with a valid legend element.
|
|
16
14
|
*/
|
|
17
15
|
|
|
18
16
|
// IMPORTS
|
package/testaro/secHeading.js
CHANGED
|
@@ -11,11 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
/*
|
|
13
13
|
secHeading
|
|
14
|
-
This test reports sectioning containers that have child headings of which the first has a depth
|
|
15
|
-
(i.e. level) lower than at least one of the others. An example is a section element whose first
|
|
16
|
-
heading child is an h3 element and whose subsequent heading children include an h2 element. The
|
|
17
|
-
first child heading is presumed the principal heading of the container, so this pattern merits
|
|
18
|
-
scrutiny.
|
|
14
|
+
This test reports sectioning containers that have child headings of which the first has a depth (i.e. level) lower than at least one of the others. An example is a section element whose first heading child is an h3 element and whose subsequent heading children include an h2 element. The first child heading is presumed the principal heading of the container, so this pattern merits scrutiny.
|
|
19
15
|
*/
|
|
20
16
|
|
|
21
17
|
// IMPORTS
|
package/testaro/styleDiff.js
CHANGED
|
@@ -9,10 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
/*
|
|
11
11
|
styleDiff
|
|
12
|
-
This test reports style differences among links, buttons, and headings. It assumes
|
|
13
|
-
that an accessible page employs few or only one style for adjacent links, and likewise
|
|
14
|
-
for list links, buttons, and headings at each level. The test considers only
|
|
15
|
-
particular style properties, listed in the 'mainStyles' and 'headingStyles' arrays.
|
|
12
|
+
This test reports style differences among links, buttons, and headings. It assumes that an accessible page employs few or only one style for adjacent links, and likewise for list links, buttons, and headings at each level. The test considers only particular style properties, listed in the 'mainStyles' and 'headingStyles' arrays.
|
|
16
13
|
*/
|
|
17
14
|
|
|
18
15
|
// FUNCTIONS
|
package/testaro/tabNav.js
CHANGED
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
/*
|
|
12
12
|
tabNav
|
|
13
|
-
This test reports nonstandard keyboard navigation among tab elements in visible tab lists.
|
|
14
|
-
Standards are based on https://www.w3.org/TR/wai-aria-practices-1.1/#tabpanel.
|
|
13
|
+
This test reports nonstandard keyboard navigation among tab elements in visible tab lists. Standards are based on https://www.w3.org/TR/wai-aria-practices-1.1/#tabpanel.
|
|
15
14
|
*/
|
|
16
15
|
|
|
17
16
|
// CONSTANTS
|
package/testaro/targetSmall.js
CHANGED
|
@@ -11,11 +11,7 @@
|
|
|
11
11
|
/*
|
|
12
12
|
targetSmall
|
|
13
13
|
Related to Tenon rule 152.
|
|
14
|
-
This test reports visible pointer targets, i.e. labels, buttons, inputs, and links, that are
|
|
15
|
-
small enough or near enough to other targets to make pointer interaction difficult. This test
|
|
16
|
-
relates to WCAG 2.2 Success Criteria 2.5.5 and 2.5.8, but does not attempt to implement either
|
|
17
|
-
of them precisely. For example, the test reports a small pointer target that is far from all
|
|
18
|
-
other targets, although it conforms to the Success Criteria.
|
|
14
|
+
This test reports visible pointer targets, i.e. labels, buttons, inputs, and links, that are small enough or near enough to other targets to make pointer interaction difficult. This test relates to WCAG 2.2 Success Criteria 2.5.5 and 2.5.8, but does not attempt to implement either of them precisely. For example, the test reports a small pointer target that is far from all other targets, although it conforms to the Success Criteria.
|
|
19
15
|
*/
|
|
20
16
|
|
|
21
17
|
// FUNCTIONS
|
package/testaro/textNodes.js
CHANGED
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
|
|
10
10
|
/*
|
|
11
11
|
textNodes
|
|
12
|
-
This test reports data about specified text nodes.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
1-3. Count of ancestry levels to provide data on (1 = text node, 2 = also parent,
|
|
16
|
-
3 = also grandparent)
|
|
12
|
+
This test reports data about specified text nodes. Meanings of detailLevel values:
|
|
13
|
+
0. Only total node count; no detail.
|
|
14
|
+
1-3. Count of ancestry levels to provide data on (1 = text node, 2 = also parent, 3 = also grandparent)
|
|
17
15
|
*/
|
|
16
|
+
|
|
17
|
+
// FUNCTIONS
|
|
18
|
+
|
|
18
19
|
exports.reporter = async (page, withItems, detailLevel, text = '') => {
|
|
19
20
|
let data = {};
|
|
20
21
|
// Get the data on the text nodes.
|
package/testaro/textSem.js
CHANGED
package/testaro/zIndex.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
© 2021–2023 CVS Health and/or one of its affiliates. All rights reserved.
|
|
3
|
+
© 2025 Jonathan Robert Pool
|
|
3
4
|
|
|
4
5
|
Licensed under the MIT License. See LICENSE file at the project root or
|
|
5
6
|
https://opensource.org/license/mit/ for details.
|
|
@@ -9,42 +10,29 @@
|
|
|
9
10
|
|
|
10
11
|
/*
|
|
11
12
|
zIndex
|
|
12
|
-
This test reports elements with
|
|
13
|
-
when they do not require users to perceive a third dimension (depth). Layers, popups, and dialogs
|
|
14
|
-
that cover other content make it difficult for some or all users to interpret the content and
|
|
15
|
-
know what parts of the content can be acted on. Layering also complicates accessibility control.
|
|
16
|
-
Tests for visibility of focus, for example, may fail if incapable of detecting that a focused
|
|
17
|
-
element is covered by another element.
|
|
13
|
+
This test reports elements with abnormal Z indexes. It assumes that pages are most accessible when they do not require users to perceive a third dimension (depth). Layers, popups, and dialogs that cover other content make it difficult for some or all users to interpret the content and know what parts of the content can be acted on. Layering also complicates accessibility testing. Tests for visibility of focus, for example, may fail if incapable of detecting that a focused element is covered by another element. Z indexes other than auto and 0 are considered abnormal.
|
|
18
14
|
*/
|
|
19
15
|
|
|
20
|
-
//
|
|
16
|
+
// IMPORTS
|
|
21
17
|
|
|
22
|
-
|
|
23
|
-
const {init, getRuleResult} = require('../procs/testaro');
|
|
18
|
+
const {doTest} = require('../procs/testaro');
|
|
24
19
|
|
|
25
|
-
//
|
|
20
|
+
// FUNCTIONS
|
|
26
21
|
|
|
27
22
|
// Runs the test and returns the result.
|
|
28
23
|
exports.reporter = async (page, withItems) => {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
//
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return zIndex !== 'auto' ? zIndex : null;
|
|
38
|
-
});
|
|
39
|
-
// If it does:
|
|
40
|
-
if (badZ) {
|
|
41
|
-
// Add the locator to the array of violators.
|
|
42
|
-
all.locs.push([loc, badZ]);
|
|
24
|
+
const getBadWhat = element => {
|
|
25
|
+
// Get whether the element violates the rule.
|
|
26
|
+
const styleDec = window.getComputedStyle(element);
|
|
27
|
+
const {zIndex} = styleDec;
|
|
28
|
+
// If the Z index of the element is neither 'auto' nor 0:
|
|
29
|
+
if (! ['auto', '0'].includes(zIndex)) {
|
|
30
|
+
// Return a violation description.
|
|
31
|
+
return `z-index style property of the element is ${zIndex}`;
|
|
43
32
|
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return await getRuleResult(withItems, all, 'zIndex', whats, 0);
|
|
33
|
+
};
|
|
34
|
+
const whats = 'Elements have non-default Z indexes';
|
|
35
|
+
return await doTest(
|
|
36
|
+
page, withItems, 'zIndex', 'body *', whats, 0, null, getBadWhat.toString()
|
|
37
|
+
);
|
|
50
38
|
};
|