accented 0.0.2 → 1.0.1
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/NOTICE +14 -0
- package/README.md +44 -187
- package/dist/accented.d.ts +8 -8
- package/dist/accented.d.ts.map +1 -1
- package/dist/accented.js +37 -30
- package/dist/accented.js.map +1 -1
- package/dist/common/strings.d.ts +2 -0
- package/dist/common/strings.d.ts.map +1 -0
- package/dist/common/strings.js +2 -0
- package/dist/common/strings.js.map +1 -0
- package/dist/common/tokens.d.ts +7 -0
- package/dist/common/tokens.d.ts.map +1 -0
- package/dist/common/tokens.js +8 -0
- package/dist/common/tokens.js.map +1 -0
- package/dist/constants.d.ts +2 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +2 -1
- package/dist/constants.js.map +1 -1
- package/dist/dom-updater.d.ts +1 -1
- package/dist/dom-updater.d.ts.map +1 -1
- package/dist/dom-updater.js +73 -31
- package/dist/dom-updater.js.map +1 -1
- package/dist/elements/accented-dialog.d.ts +18 -10
- package/dist/elements/accented-dialog.d.ts.map +1 -1
- package/dist/elements/accented-dialog.js +116 -95
- package/dist/elements/accented-dialog.js.map +1 -1
- package/dist/elements/accented-trigger.d.ts +14 -9
- package/dist/elements/accented-trigger.d.ts.map +1 -1
- package/dist/elements/accented-trigger.js +83 -24
- package/dist/elements/accented-trigger.js.map +1 -1
- package/dist/fullscreen-listener.d.ts +2 -0
- package/dist/fullscreen-listener.d.ts.map +1 -0
- package/dist/fullscreen-listener.js +17 -0
- package/dist/fullscreen-listener.js.map +1 -0
- package/dist/intersection-observer.d.ts +1 -1
- package/dist/intersection-observer.d.ts.map +1 -1
- package/dist/intersection-observer.js +12 -6
- package/dist/intersection-observer.js.map +1 -1
- package/dist/log-and-rethrow.d.ts +1 -1
- package/dist/log-and-rethrow.d.ts.map +1 -1
- package/dist/log-and-rethrow.js +2 -3
- package/dist/log-and-rethrow.js.map +1 -1
- package/dist/logger.d.ts +4 -1
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +6 -3
- package/dist/logger.js.map +1 -1
- package/dist/register-elements.d.ts +1 -1
- package/dist/register-elements.d.ts.map +1 -1
- package/dist/register-elements.js +6 -7
- package/dist/register-elements.js.map +1 -1
- package/dist/resize-listener.d.ts +1 -1
- package/dist/resize-listener.d.ts.map +1 -1
- package/dist/resize-listener.js +3 -4
- package/dist/resize-listener.js.map +1 -1
- package/dist/scanner.d.ts +2 -2
- package/dist/scanner.d.ts.map +1 -1
- package/dist/scanner.js +76 -43
- package/dist/scanner.js.map +1 -1
- package/dist/scroll-listeners.d.ts +1 -1
- package/dist/scroll-listeners.d.ts.map +1 -1
- package/dist/scroll-listeners.js +3 -4
- package/dist/scroll-listeners.js.map +1 -1
- package/dist/state.d.ts +3 -2
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js +5 -3
- package/dist/state.js.map +1 -1
- package/dist/task-queue.d.ts +4 -4
- package/dist/task-queue.d.ts.map +1 -1
- package/dist/task-queue.js +3 -2
- package/dist/task-queue.js.map +1 -1
- package/dist/types.d.ts +140 -49
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/are-elements-with-issues-equal.d.ts +3 -0
- package/dist/utils/are-elements-with-issues-equal.d.ts.map +1 -0
- package/dist/utils/are-elements-with-issues-equal.js +5 -0
- package/dist/utils/are-elements-with-issues-equal.js.map +1 -0
- package/dist/utils/are-issue-sets-equal.d.ts +2 -2
- package/dist/utils/are-issue-sets-equal.d.ts.map +1 -1
- package/dist/utils/are-issue-sets-equal.js +3 -3
- package/dist/utils/are-issue-sets-equal.js.map +1 -1
- package/dist/utils/containing-blocks.d.ts +3 -0
- package/dist/utils/containing-blocks.d.ts.map +1 -0
- package/dist/utils/containing-blocks.js +46 -0
- package/dist/utils/containing-blocks.js.map +1 -0
- package/dist/utils/contains.d.ts +2 -0
- package/dist/utils/contains.d.ts.map +1 -0
- package/dist/utils/contains.js +19 -0
- package/dist/utils/contains.js.map +1 -0
- package/dist/utils/deduplicate-nodes.d.ts +2 -0
- package/dist/utils/deduplicate-nodes.d.ts.map +1 -0
- package/dist/utils/deduplicate-nodes.js +4 -0
- package/dist/utils/deduplicate-nodes.js.map +1 -0
- package/dist/utils/deep-merge.d.ts +1 -1
- package/dist/utils/deep-merge.d.ts.map +1 -1
- package/dist/utils/deep-merge.js +8 -5
- package/dist/utils/deep-merge.js.map +1 -1
- package/dist/utils/dom-helpers.d.ts +9 -0
- package/dist/utils/dom-helpers.d.ts.map +1 -0
- package/dist/utils/dom-helpers.js +34 -0
- package/dist/utils/dom-helpers.js.map +1 -0
- package/dist/utils/ensure-non-empty.d.ts +2 -0
- package/dist/utils/ensure-non-empty.d.ts.map +1 -0
- package/dist/utils/ensure-non-empty.js +7 -0
- package/dist/utils/ensure-non-empty.js.map +1 -0
- package/dist/utils/get-element-html.d.ts +1 -1
- package/dist/utils/get-element-html.d.ts.map +1 -1
- package/dist/utils/get-element-html.js +4 -2
- package/dist/utils/get-element-html.js.map +1 -1
- package/dist/utils/get-element-position.d.ts +10 -2
- package/dist/utils/get-element-position.d.ts.map +1 -1
- package/dist/utils/get-element-position.js +64 -16
- package/dist/utils/get-element-position.js.map +1 -1
- package/dist/utils/get-parent.d.ts +2 -0
- package/dist/utils/get-parent.d.ts.map +1 -0
- package/dist/utils/get-parent.js +12 -0
- package/dist/utils/get-parent.js.map +1 -0
- package/dist/utils/get-scan-context.d.ts +3 -0
- package/dist/utils/get-scan-context.d.ts.map +1 -0
- package/dist/utils/get-scan-context.js +28 -0
- package/dist/utils/get-scan-context.js.map +1 -0
- package/dist/utils/get-scrollable-ancestors.d.ts +1 -1
- package/dist/utils/get-scrollable-ancestors.d.ts.map +1 -1
- package/dist/utils/get-scrollable-ancestors.js +10 -6
- package/dist/utils/get-scrollable-ancestors.js.map +1 -1
- package/dist/utils/is-node-in-scan-context.d.ts +3 -0
- package/dist/utils/is-node-in-scan-context.d.ts.map +1 -0
- package/dist/utils/is-node-in-scan-context.js +26 -0
- package/dist/utils/is-node-in-scan-context.js.map +1 -0
- package/dist/utils/is-non-empty.d.ts +2 -0
- package/dist/utils/is-non-empty.d.ts.map +1 -0
- package/dist/utils/is-non-empty.js +4 -0
- package/dist/utils/is-non-empty.js.map +1 -0
- package/dist/utils/normalize-context.d.ts +3 -0
- package/dist/utils/normalize-context.d.ts.map +1 -0
- package/dist/utils/normalize-context.js +59 -0
- package/dist/utils/normalize-context.js.map +1 -0
- package/dist/utils/recalculate-positions.d.ts +1 -1
- package/dist/utils/recalculate-positions.d.ts.map +1 -1
- package/dist/utils/recalculate-positions.js +5 -5
- package/dist/utils/recalculate-positions.js.map +1 -1
- package/dist/utils/recalculate-scrollable-ancestors.d.ts +1 -1
- package/dist/utils/recalculate-scrollable-ancestors.d.ts.map +1 -1
- package/dist/utils/recalculate-scrollable-ancestors.js +4 -4
- package/dist/utils/recalculate-scrollable-ancestors.js.map +1 -1
- package/dist/utils/shadow-dom-aware-mutation-observer.d.ts +10 -0
- package/dist/utils/shadow-dom-aware-mutation-observer.d.ts.map +1 -0
- package/dist/utils/shadow-dom-aware-mutation-observer.js +61 -0
- package/dist/utils/shadow-dom-aware-mutation-observer.js.map +1 -0
- package/dist/utils/supports-anchor-positioning.d.ts +1 -1
- package/dist/utils/supports-anchor-positioning.d.ts.map +1 -1
- package/dist/utils/supports-anchor-positioning.js +15 -2
- package/dist/utils/supports-anchor-positioning.js.map +1 -1
- package/dist/utils/transform-violations.d.ts +2 -2
- package/dist/utils/transform-violations.d.ts.map +1 -1
- package/dist/utils/transform-violations.js +25 -10
- package/dist/utils/transform-violations.js.map +1 -1
- package/dist/utils/update-elements-with-issues.d.ts +11 -5
- package/dist/utils/update-elements-with-issues.d.ts.map +1 -1
- package/dist/utils/update-elements-with-issues.js +56 -24
- package/dist/utils/update-elements-with-issues.js.map +1 -1
- package/dist/validate-options.d.ts +2 -2
- package/dist/validate-options.d.ts.map +1 -1
- package/dist/validate-options.js +91 -4
- package/dist/validate-options.js.map +1 -1
- package/package.json +16 -8
- package/src/accented.test.ts +2 -2
- package/src/accented.ts +45 -34
- package/src/common/strings.ts +2 -0
- package/src/common/tokens.ts +10 -0
- package/src/constants.ts +2 -1
- package/src/dom-updater.ts +87 -34
- package/src/elements/accented-dialog.ts +163 -123
- package/src/elements/accented-trigger.ts +128 -50
- package/src/fullscreen-listener.ts +21 -0
- package/src/intersection-observer.ts +27 -16
- package/src/log-and-rethrow.ts +2 -3
- package/src/logger.ts +14 -4
- package/src/register-elements.ts +7 -7
- package/src/resize-listener.ts +15 -11
- package/src/scanner.ts +113 -57
- package/src/scroll-listeners.ts +27 -19
- package/src/state.ts +27 -16
- package/src/task-queue.test.ts +5 -4
- package/src/task-queue.ts +8 -6
- package/src/types.ts +179 -76
- package/src/utils/are-elements-with-issues-equal.ts +11 -0
- package/src/utils/are-issue-sets-equal.test.ts +6 -7
- package/src/utils/are-issue-sets-equal.ts +8 -6
- package/src/utils/containing-blocks.ts +60 -0
- package/src/utils/contains.test.ts +54 -0
- package/src/utils/contains.ts +19 -0
- package/src/utils/deduplicate-nodes.ts +3 -0
- package/src/utils/deep-merge.test.ts +8 -1
- package/src/utils/deep-merge.ts +14 -8
- package/src/utils/dom-helpers.ts +42 -0
- package/src/utils/ensure-non-empty.ts +6 -0
- package/src/utils/get-element-html.ts +4 -2
- package/src/utils/get-element-position.ts +84 -16
- package/src/utils/get-parent.ts +14 -0
- package/src/utils/get-scan-context.test.ts +85 -0
- package/src/utils/get-scan-context.ts +36 -0
- package/src/utils/get-scrollable-ancestors.ts +15 -7
- package/src/utils/is-node-in-scan-context.test.ts +70 -0
- package/src/utils/is-node-in-scan-context.ts +29 -0
- package/src/utils/is-non-empty.ts +3 -0
- package/src/utils/normalize-context.test.ts +105 -0
- package/src/utils/normalize-context.ts +65 -0
- package/src/utils/recalculate-positions.ts +5 -5
- package/src/utils/recalculate-scrollable-ancestors.ts +4 -4
- package/src/utils/shadow-dom-aware-mutation-observer.ts +75 -0
- package/src/utils/supports-anchor-positioning.ts +19 -3
- package/src/utils/transform-violations.test.ts +29 -25
- package/src/utils/transform-violations.ts +32 -12
- package/src/utils/update-elements-with-issues.test.ts +145 -53
- package/src/utils/update-elements-with-issues.ts +123 -54
- package/src/validate-options.ts +154 -14
package/dist/scanner.js
CHANGED
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import axe from 'axe-core';
|
|
2
|
-
import
|
|
2
|
+
import { getAccentedElementNames, issuesUrl } from './constants.js';
|
|
3
|
+
import { logAndRethrow } from './log-and-rethrow.js';
|
|
3
4
|
import { elementsWithIssues, enabled, extendedElementsWithIssues } from './state.js';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
|
|
5
|
+
import { TaskQueue } from './task-queue.js';
|
|
6
|
+
import { getScanContext } from './utils/get-scan-context.js';
|
|
7
|
+
import { recalculatePositions } from './utils/recalculate-positions.js';
|
|
8
|
+
import { recalculateScrollableAncestors } from './utils/recalculate-scrollable-ancestors.js';
|
|
9
|
+
import { createShadowDOMAwareMutationObserver } from './utils/shadow-dom-aware-mutation-observer.js';
|
|
10
|
+
import { supportsAnchorPositioning } from './utils/supports-anchor-positioning.js';
|
|
11
|
+
import { updateElementsWithIssues } from './utils/update-elements-with-issues.js';
|
|
12
|
+
export function createScanner(name, context, axeOptions, throttle, callback) {
|
|
11
13
|
const axeRunningWindowProp = `__${name}_axe_running__`;
|
|
12
14
|
const win = window;
|
|
13
|
-
const taskQueue = new TaskQueue(async () => {
|
|
15
|
+
const taskQueue = new TaskQueue(async (nodes) => {
|
|
14
16
|
// We may see errors coming from axe-core when Accented is toggled off and on in qiuck succession,
|
|
15
17
|
// which I've seen happen with hot reloading of a React application.
|
|
16
18
|
// This window property serves as a circuit breaker for that particular case.
|
|
@@ -18,40 +20,75 @@ export default function createScanner(name, axeContext, axeOptions, throttle, ca
|
|
|
18
20
|
return;
|
|
19
21
|
}
|
|
20
22
|
try {
|
|
21
|
-
performance.mark('
|
|
23
|
+
performance.mark('scan-start');
|
|
22
24
|
win[axeRunningWindowProp] = true;
|
|
25
|
+
const scanContext = getScanContext(nodes, context);
|
|
23
26
|
let result;
|
|
24
27
|
try {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
result = await axe.run(scanContext, {
|
|
29
|
+
/**
|
|
30
|
+
* By default, axe-core doesn't include element refs
|
|
31
|
+
* in the violations array,
|
|
32
|
+
* and we need those element refs.
|
|
33
|
+
*/
|
|
28
34
|
elementRef: true,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
/**
|
|
36
|
+
* Although axe-core can perform iframe scanning, I haven't succeeded in it,
|
|
37
|
+
* and the docs suggest that the axe-core script should be explicitly included
|
|
38
|
+
* in each of the iframed documents anyway.
|
|
39
|
+
* It seems preferable to disallow iframe scanning and not report issues in elements within iframes
|
|
40
|
+
* in the case that such issues are for some reason reported by axe-core.
|
|
41
|
+
* A consumer of Accented can instead scan the iframed document by calling Accented initialization from that document.
|
|
42
|
+
*/
|
|
35
43
|
iframes: false,
|
|
44
|
+
/**
|
|
45
|
+
* The `preload` docs are not clear to me,
|
|
46
|
+
* but when it's set to `true` by default,
|
|
47
|
+
* axe-core tries to fetch cross-origin CSS,
|
|
48
|
+
* which fails in the absence of CORS headers.
|
|
49
|
+
* I'm not sure why axe-core needs to preload
|
|
50
|
+
* those resources in the first place,
|
|
51
|
+
* so disabling it seems to be the safe option.
|
|
52
|
+
*/
|
|
53
|
+
preload: false,
|
|
54
|
+
/**
|
|
55
|
+
* We're only interested in violations,
|
|
56
|
+
* not in passes or incomplete results.
|
|
57
|
+
*/
|
|
36
58
|
resultTypes: ['violations'],
|
|
37
|
-
...axeOptions
|
|
59
|
+
...axeOptions,
|
|
38
60
|
});
|
|
39
61
|
}
|
|
40
62
|
catch (error) {
|
|
41
|
-
console.error(
|
|
42
|
-
'Check the `axeOptions` property that you’re passing to Accented. ' +
|
|
43
|
-
`If you still think it’s a bug in Accented, file an issue at ${issuesUrl}.\n`, error);
|
|
44
|
-
result = { violations: [] };
|
|
63
|
+
console.error(`Accented: axe-core (the accessibility testing engine) threw an error. Check the \`axeOptions\` property (https://accented.dev/api#axeoptions) that you’re passing to Accented. If you still think it’s a bug in Accented, file an issue at ${issuesUrl}.\n`, error);
|
|
45
64
|
}
|
|
46
65
|
win[axeRunningWindowProp] = false;
|
|
47
|
-
const
|
|
48
|
-
|
|
66
|
+
const scanMeasure = performance.measure('scan', 'scan-start');
|
|
67
|
+
const scanDuration = Math.round(scanMeasure.duration);
|
|
68
|
+
if (!enabled.value || !result) {
|
|
49
69
|
return;
|
|
50
70
|
}
|
|
51
|
-
|
|
71
|
+
performance.mark('dom-update-start');
|
|
72
|
+
updateElementsWithIssues({
|
|
73
|
+
extendedElementsWithIssues,
|
|
74
|
+
scanContext,
|
|
75
|
+
violations: result.violations,
|
|
76
|
+
win: window,
|
|
77
|
+
name,
|
|
78
|
+
});
|
|
79
|
+
const domUpdateMeasure = performance.measure('dom-update', 'dom-update-start');
|
|
80
|
+
const domUpdateDuration = Math.round(domUpdateMeasure.duration);
|
|
52
81
|
callback({
|
|
82
|
+
// Assuming that the {include, exclude} shape of the context object will be used less often
|
|
83
|
+
// than other variants, we'll output just the `include` array in case nothing is excluded
|
|
84
|
+
// in the scan.
|
|
85
|
+
scanContext: scanContext.exclude.length > 0 ? scanContext : scanContext.include,
|
|
53
86
|
elementsWithIssues: elementsWithIssues.value,
|
|
54
|
-
|
|
87
|
+
performance: {
|
|
88
|
+
totalBlockingTime: scanDuration + domUpdateDuration,
|
|
89
|
+
scan: scanDuration,
|
|
90
|
+
domUpdate: domUpdateDuration,
|
|
91
|
+
},
|
|
55
92
|
});
|
|
56
93
|
}
|
|
57
94
|
catch (error) {
|
|
@@ -59,19 +96,16 @@ export default function createScanner(name, axeContext, axeOptions, throttle, ca
|
|
|
59
96
|
logAndRethrow(error);
|
|
60
97
|
}
|
|
61
98
|
}, throttle);
|
|
62
|
-
// TODO (https://github.com/pomerantsev/accented/issues/102):
|
|
63
|
-
// limit to what's in axeContext,
|
|
64
|
-
// if that's an element or array of elements (not a selector).
|
|
65
99
|
taskQueue.add(document);
|
|
66
|
-
const accentedElementNames =
|
|
67
|
-
const mutationObserver =
|
|
100
|
+
const accentedElementNames = getAccentedElementNames(name);
|
|
101
|
+
const mutationObserver = createShadowDOMAwareMutationObserver(name, (mutationList) => {
|
|
68
102
|
try {
|
|
69
103
|
// We're not interested in mutations that are caused exclusively by the custom elements
|
|
70
104
|
// introduced by Accented.
|
|
71
|
-
const listWithoutAccentedElements = mutationList.filter(mutationRecord => {
|
|
105
|
+
const listWithoutAccentedElements = mutationList.filter((mutationRecord) => {
|
|
72
106
|
const onlyAccentedElementsAddedOrRemoved = mutationRecord.type === 'childList' &&
|
|
73
|
-
[...mutationRecord.addedNodes].every(node => accentedElementNames.includes(node.nodeName.toLowerCase())) &&
|
|
74
|
-
[...mutationRecord.removedNodes].every(node => accentedElementNames.includes(node.nodeName.toLowerCase()));
|
|
107
|
+
[...mutationRecord.addedNodes].every((node) => accentedElementNames.includes(node.nodeName.toLowerCase())) &&
|
|
108
|
+
[...mutationRecord.removedNodes].every((node) => accentedElementNames.includes(node.nodeName.toLowerCase()));
|
|
75
109
|
const accentedElementChanged = mutationRecord.type === 'attributes' &&
|
|
76
110
|
accentedElementNames.includes(mutationRecord.target.nodeName.toLowerCase());
|
|
77
111
|
return !(onlyAccentedElementsAddedOrRemoved || accentedElementChanged);
|
|
@@ -90,28 +124,27 @@ export default function createScanner(name, axeContext, axeOptions, throttle, ca
|
|
|
90
124
|
// we may miss other mutations on those same elements caused by Accented,
|
|
91
125
|
// leading to extra runs of the mutation observer.
|
|
92
126
|
const elementsWithAccentedAttributeChanges = listWithoutAccentedElements.reduce((nodes, mutationRecord) => {
|
|
93
|
-
if (mutationRecord.type === 'attributes' &&
|
|
127
|
+
if (mutationRecord.type === 'attributes' &&
|
|
128
|
+
mutationRecord.attributeName === `data-${name}`) {
|
|
94
129
|
nodes.add(mutationRecord.target);
|
|
95
130
|
}
|
|
96
131
|
return nodes;
|
|
97
132
|
}, new Set());
|
|
98
|
-
const filteredMutationList = listWithoutAccentedElements.filter(mutationRecord => {
|
|
133
|
+
const filteredMutationList = listWithoutAccentedElements.filter((mutationRecord) => {
|
|
99
134
|
return !elementsWithAccentedAttributeChanges.has(mutationRecord.target);
|
|
100
135
|
});
|
|
101
|
-
|
|
136
|
+
const nodes = filteredMutationList.map((mutationRecord) => mutationRecord.target);
|
|
137
|
+
taskQueue.addMultiple(nodes);
|
|
102
138
|
}
|
|
103
139
|
catch (error) {
|
|
104
140
|
logAndRethrow(error);
|
|
105
141
|
}
|
|
106
142
|
});
|
|
107
|
-
// TODO (https://github.com/pomerantsev/accented/issues/102):
|
|
108
|
-
// possibly limit the observer to what's in axeContext,
|
|
109
|
-
// if that's an element or array of elements (not a selector).
|
|
110
143
|
mutationObserver.observe(document, {
|
|
111
144
|
subtree: true,
|
|
112
145
|
childList: true,
|
|
113
146
|
attributes: true,
|
|
114
|
-
characterData: true
|
|
147
|
+
characterData: true,
|
|
115
148
|
});
|
|
116
149
|
return () => {
|
|
117
150
|
mutationObserver.disconnect();
|
package/dist/scanner.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanner.js","sourceRoot":"","sources":["../src/scanner.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"scanner.js","sourceRoot":"","sources":["../src/scanner.ts"],"names":[],"mappings":"AAAA,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,EAAE,uBAAuB,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EA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AC;AACJ,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare function setupScrollListeners(): () => void;
|
|
2
2
|
//# sourceMappingURL=scroll-listeners.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-listeners.d.ts","sourceRoot":"","sources":["../src/scroll-listeners.ts"],"names":[],"mappings":"AAKA,
|
|
1
|
+
{"version":3,"file":"scroll-listeners.d.ts","sourceRoot":"","sources":["../src/scroll-listeners.ts"],"names":[],"mappings":"AAKA,wBAAgB,oBAAoB,eAuCnC"}
|
package/dist/scroll-listeners.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { effect } from '@preact/signals-core';
|
|
2
|
-
import
|
|
2
|
+
import { logAndRethrow } from './log-and-rethrow.js';
|
|
3
3
|
import { scrollableAncestors } from './state.js';
|
|
4
|
-
import
|
|
5
|
-
export
|
|
4
|
+
import { recalculatePositions } from './utils/recalculate-positions.js';
|
|
5
|
+
export function setupScrollListeners() {
|
|
6
6
|
const documentAbortController = new AbortController();
|
|
7
7
|
document.addEventListener('scroll', () => {
|
|
8
8
|
try {
|
|
@@ -34,5 +34,4 @@ export default function setupScrollListeners() {
|
|
|
34
34
|
disposeOfEffect();
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
;
|
|
38
37
|
//# sourceMappingURL=scroll-listeners.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-listeners.js","sourceRoot":"","sources":["../src/scroll-listeners.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,
|
|
1
|
+
{"version":3,"file":"scroll-listeners.js","sourceRoot":"","sources":["../src/scroll-listeners.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACr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{ ElementWithIssues, ExtendedElementWithIssues } from './types.ts';
|
|
2
2
|
export declare const enabled: import("@preact/signals-core").Signal<boolean>;
|
|
3
3
|
export declare const extendedElementsWithIssues: import("@preact/signals-core").Signal<ExtendedElementWithIssues[]>;
|
|
4
4
|
export declare const elementsWithIssues: import("@preact/signals-core").ReadonlySignal<ElementWithIssues[]>;
|
|
5
|
-
export declare const
|
|
5
|
+
export declare const rootNodes: import("@preact/signals-core").ReadonlySignal<Set<Node>>;
|
|
6
|
+
export declare const scrollableAncestors: import("@preact/signals-core").ReadonlySignal<Set<Element>>;
|
|
6
7
|
//# sourceMappingURL=state.d.ts.map
|
package/dist/state.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAE/E,eAAO,MAAM,OAAO,gDAAgB,CAAC;AAErC,eAAO,MAAM,0BAA0B,oEAA+C,CAAC;AAEvF,eAAO,MAAM,kBAAkB,oEAM9B,CAAC;AAEF,eAAO,MAAM,SAAS,0DASrB,CAAC;AAEF,eAAO,MAAM,mBAAmB,6DAO/B,CAAC"}
|
package/dist/state.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { computed, signal } from '@preact/signals-core';
|
|
2
2
|
export const enabled = signal(false);
|
|
3
3
|
export const extendedElementsWithIssues = signal([]);
|
|
4
|
-
export const elementsWithIssues = computed(() => extendedElementsWithIssues.value.map(extendedElementWithIssues => ({
|
|
4
|
+
export const elementsWithIssues = computed(() => extendedElementsWithIssues.value.map((extendedElementWithIssues) => ({
|
|
5
5
|
element: extendedElementWithIssues.element,
|
|
6
|
-
|
|
6
|
+
rootNode: extendedElementWithIssues.rootNode,
|
|
7
|
+
issues: extendedElementWithIssues.issues.value,
|
|
7
8
|
})));
|
|
9
|
+
export const rootNodes = computed(() => new Set((enabled.value ? [document] : []).concat(...extendedElementsWithIssues.value.map((extendedElementWithIssues) => extendedElementWithIssues.rootNode))));
|
|
8
10
|
export const scrollableAncestors = computed(() => extendedElementsWithIssues.value.reduce((scrollableAncestors, extendedElementWithIssues) => {
|
|
9
11
|
for (const scrollableAncestor of extendedElementWithIssues.scrollableAncestors.value) {
|
|
10
12
|
scrollableAncestors.add(scrollableAncestor);
|
package/dist/state.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../src/state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAIxD,MAAM,CAAC,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;AAErC,MAAM,CAAC,MAAM,0BAA0B,GAAG,MAAM,CAAmC,EAAE,CAAC,CAAC;AAEvF,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAA2B,GAAG,EAAE,CACxE,0BAA0B,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,yBAAyB,EAAE,EAAE,CAAC,CAAC;IACnE,OAAO,EAAE,yBAAyB,CAAC,OAAO;IAC1C,QAAQ,EAAE,yBAAyB,CAAC,QAAQ;IAC5C,MAAM,EAAE,yBAAyB,CAAC,MAAM,CAAC,KAAK;CAC/C,CAAC,CAAC,CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,QAAQ,CAC/B,GAAG,EAAE,CACH,IAAI,GAAG,CACL,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,QAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAC9C,GAAG,0BAA0B,CAAC,KAAK,CAAC,GAAG,CACrC,CAAC,yBAAyB,EAAE,EAAE,CAAC,yBAAyB,CAAC,QAAQ,CAClE,CACF,CACF,CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,mBAAmB,GAAG,QAAQ,CAAe,GAAG,EAAE,CAC7D,0BAA0B,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,mBAAmB,EAAE,yBAAyB,EAAE,EAAE;IACzF,KAAK,MAAM,kBAAkB,IAAI,yBAAyB,CAAC,mBAAmB,CAAC,KAAK,EAAE,CAAC;QACrF,mBAAmB,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,mBAAmB,CAAC;AAC7B,CAAC,EAAE,IAAI,GAAG,EAAW,CAAC,CACvB,CAAC"}
|
package/dist/task-queue.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Throttle } from './types';
|
|
2
|
-
type TaskCallback = () => void;
|
|
3
|
-
export
|
|
1
|
+
import type { Throttle } from './types.ts';
|
|
2
|
+
type TaskCallback<T> = (items: Array<T>) => void;
|
|
3
|
+
export declare class TaskQueue<T> {
|
|
4
4
|
#private;
|
|
5
|
-
constructor(asyncCallback: TaskCallback
|
|
5
|
+
constructor(asyncCallback: TaskCallback<T>, throttle: Required<Throttle>);
|
|
6
6
|
addMultiple(items: Array<T>): void;
|
|
7
7
|
add(item: T): void;
|
|
8
8
|
}
|
package/dist/task-queue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-queue.d.ts","sourceRoot":"","sources":["../src/task-queue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"task-queue.d.ts","sourceRoot":"","sources":["../src/task-queue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,KAAK,YAAY,CAAC,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;AAEjD,qBAAa,SAAS,CAAC,CAAC;;gBAOV,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAqCxE,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IAS3B,GAAG,CAAC,IAAI,EAAE,CAAC;CAGZ"}
|
package/dist/task-queue.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export class TaskQueue {
|
|
2
2
|
#throttle;
|
|
3
3
|
#asyncCallback = null;
|
|
4
4
|
#items = new Set();
|
|
@@ -22,9 +22,10 @@ export default class TaskQueue {
|
|
|
22
22
|
this.#inRunLoop = false;
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
|
+
const items = Array.from(this.#items);
|
|
25
26
|
this.#items.clear();
|
|
26
27
|
if (this.#asyncCallback) {
|
|
27
|
-
await this.#asyncCallback();
|
|
28
|
+
await this.#asyncCallback(items);
|
|
28
29
|
}
|
|
29
30
|
await new Promise((resolve) => setTimeout(resolve, this.#throttle.wait));
|
|
30
31
|
await this.#run();
|
package/dist/task-queue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task-queue.js","sourceRoot":"","sources":["../src/task-queue.ts"],"names":[],"mappings":"AAIA,MAAM,
|
|
1
|
+
{"version":3,"file":"task-queue.js","sourceRoot":"","sources":["../src/task-queue.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,SAAS;IACpB,SAAS,CAAW;IACpB,cAAc,GAA2B,IAAI,CAAC;IAE9C,MAAM,GAAG,IAAI,GAAG,EAAK,CAAC;IACtB,UAAU,GAAG,KAAK,CAAC;IAEnB,YAAY,aAA8B,EAAE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CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC;YACzB,IAAI,CAAC,OAAO,EAAE,CAAC;QACjB,CAAC;IACH,CAAC;IAED,GAAG,CAAC,IAAO;QACT,IAAI,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3B,CAAC;CACF"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,62 +1,84 @@
|
|
|
1
|
-
import type axe from 'axe-core';
|
|
2
1
|
import type { Signal } from '@preact/signals-core';
|
|
3
|
-
import type
|
|
2
|
+
import type axe from 'axe-core';
|
|
3
|
+
import type { AccentedTrigger } from './elements/accented-trigger.ts';
|
|
4
4
|
export type Throttle = {
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* How long Accented must wait (in milliseconds) to run a scan after a mutation or after the previous scan (whichever finished last).
|
|
7
|
+
*
|
|
8
|
+
* If the page you’re scanning has a lot of nodes,
|
|
9
|
+
* scanning may take a noticeable time (~ a few hundred milliseconds),
|
|
10
|
+
* during which time the main thread will be blocked most of the time.
|
|
7
11
|
*
|
|
8
|
-
*
|
|
12
|
+
* You may want to experiment with this value if your page contents change frequently
|
|
13
|
+
* or if it has JavaScript-based animations running on the main thread.
|
|
14
|
+
*
|
|
15
|
+
* @default 1000
|
|
9
16
|
* */
|
|
10
17
|
wait?: number;
|
|
11
18
|
/**
|
|
12
|
-
*
|
|
19
|
+
* If `leading` is set to `true`, the scan runs immediately after a mutation.
|
|
20
|
+
* In this case, `wait` only applies to subsequent scans,
|
|
21
|
+
* giving the page at least `wait` milliseconds between the end of the previous scan
|
|
22
|
+
* and the beginning of the next one.
|
|
13
23
|
*
|
|
14
|
-
* If `
|
|
24
|
+
* If `leading` is set to `false`, the wait applies to mutations as well,
|
|
25
|
+
* delaying the output.
|
|
26
|
+
* This may be useful if you’re expecting quick bursts of mutations on your page.
|
|
15
27
|
*
|
|
16
|
-
*
|
|
28
|
+
* @default true
|
|
17
29
|
* */
|
|
18
30
|
leading?: boolean;
|
|
19
31
|
};
|
|
20
32
|
export type Output = {
|
|
21
33
|
/**
|
|
22
|
-
* Whether
|
|
34
|
+
* Whether the list of elements with issues should be printed to the browser console whenever issues are added, removed, or changed.
|
|
23
35
|
*
|
|
24
|
-
*
|
|
36
|
+
* @default true
|
|
25
37
|
* */
|
|
26
38
|
console?: boolean;
|
|
27
39
|
};
|
|
28
|
-
|
|
40
|
+
/**
|
|
41
|
+
* Model context type based on axe.ElementContext,
|
|
42
|
+
* excluding frame selectors (since we don't support scanning iframes).
|
|
43
|
+
*/
|
|
44
|
+
export type Selector = Exclude<axe.Selector, axe.LabelledFramesSelector>;
|
|
45
|
+
export type SelectorList = Array<Selector> | NodeList;
|
|
46
|
+
export type ContextProp = Selector | SelectorList;
|
|
47
|
+
export type ContextObject = {
|
|
48
|
+
include: ContextProp;
|
|
49
|
+
exclude?: ContextProp;
|
|
50
|
+
} | {
|
|
51
|
+
exclude: ContextProp;
|
|
52
|
+
include?: ContextProp;
|
|
53
|
+
};
|
|
54
|
+
export type Context = ContextProp | ContextObject;
|
|
29
55
|
export declare const allowedAxeOptions: readonly ["rules", "runOnly"];
|
|
30
|
-
export type AxeOptions = Pick<axe.RunOptions, typeof allowedAxeOptions[number]>;
|
|
56
|
+
export type AxeOptions = Pick<axe.RunOptions, (typeof allowedAxeOptions)[number]>;
|
|
31
57
|
type CallbackParams = {
|
|
32
58
|
/**
|
|
33
|
-
* The most
|
|
59
|
+
* The most up-to-date array of all elements with accessibility issues.
|
|
34
60
|
* */
|
|
35
61
|
elementsWithIssues: Array<ElementWithIssues>;
|
|
36
62
|
/**
|
|
37
|
-
*
|
|
63
|
+
* Runtime performance of the last scan. An object with the following props:
|
|
64
|
+
* - `totalBlockingTime`: how long the main thread was blocked by Accented during the last scan, in milliseconds.
|
|
65
|
+
* It’s further divided into the `scan` and `domUpdate` phases.
|
|
66
|
+
* - `scan`: how long scanning (the execution of `axe.run()`) took, in milliseconds.
|
|
67
|
+
* - `domUpdate`: how long the DOM update (adding / removing outlines and dialog trigger buttons) took, in milliseconds.
|
|
38
68
|
* */
|
|
39
|
-
|
|
69
|
+
performance: {
|
|
70
|
+
totalBlockingTime: number;
|
|
71
|
+
scan: number;
|
|
72
|
+
domUpdate: number;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Nodes that got scanned. Either an array of nodes,
|
|
76
|
+
* or an object with `include` and `exclude` properties (if any nodes were excluded).
|
|
77
|
+
*/
|
|
78
|
+
scanContext: ScanContext | Array<Node>;
|
|
40
79
|
};
|
|
41
80
|
export type Callback = (params: CallbackParams) => void;
|
|
42
81
|
export type AccentedOptions = {
|
|
43
|
-
/**
|
|
44
|
-
* The `context` parameter for `axe.run()`.
|
|
45
|
-
*
|
|
46
|
-
* Determines what element(s) to scan for accessibility issues.
|
|
47
|
-
*
|
|
48
|
-
* Accepts a variety of shapes:
|
|
49
|
-
* * an element reference;
|
|
50
|
-
* * a selector;
|
|
51
|
-
* * a `NodeList`;
|
|
52
|
-
* * an include / exclude object;
|
|
53
|
-
* * and more.
|
|
54
|
-
*
|
|
55
|
-
* See documentation: https://www.deque.com/axe/core-documentation/api-documentation/#context-parameter
|
|
56
|
-
*
|
|
57
|
-
* Default: `document`.
|
|
58
|
-
*/
|
|
59
|
-
axeContext?: AxeContext;
|
|
60
82
|
/**
|
|
61
83
|
* The `options` parameter for `axe.run()`.
|
|
62
84
|
*
|
|
@@ -69,13 +91,70 @@ export type AccentedOptions = {
|
|
|
69
91
|
*
|
|
70
92
|
* See documentation: https://www.deque.com/axe/core-documentation/api-documentation/#options-parameter
|
|
71
93
|
*
|
|
72
|
-
*
|
|
94
|
+
* @default {}
|
|
73
95
|
*/
|
|
74
96
|
axeOptions?: AxeOptions;
|
|
97
|
+
/**
|
|
98
|
+
* A function that will be called after each scan.
|
|
99
|
+
*
|
|
100
|
+
* Potential uses:
|
|
101
|
+
|
|
102
|
+
* - do something with the scan results,
|
|
103
|
+
* for example send them to a backend for storage and analysis;
|
|
104
|
+
* - analyze Accented’s performance.
|
|
105
|
+
*
|
|
106
|
+
* @default () => {}
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
*
|
|
110
|
+
* accented({
|
|
111
|
+
* callback: ({ elementsWithIssues, performance, scanContext }) => {
|
|
112
|
+
* console.log('Elements with issues:', elementsWithIssues);
|
|
113
|
+
* console.log('Total blocking time:', performance.totalBlockingTime);
|
|
114
|
+
* console.log('Scan context:', scanContext);
|
|
115
|
+
* }
|
|
116
|
+
* });
|
|
117
|
+
*
|
|
118
|
+
* */
|
|
119
|
+
callback?: Callback;
|
|
120
|
+
/**
|
|
121
|
+
* The `context` parameter for `axe.run()`.
|
|
122
|
+
*
|
|
123
|
+
* Determines what part(s) of the page to scan for accessibility issues.
|
|
124
|
+
*
|
|
125
|
+
* Accepts a variety of shapes:
|
|
126
|
+
*
|
|
127
|
+
* - a [`Node`](https://developer.mozilla.org/en-US/docs/Web/API/Node) (in practice it will likely be an instance of [`Element`](https://developer.mozilla.org/en-US/docs/Web/API/Element), [`Document`](https://developer.mozilla.org/en-US/docs/Web/API/Document), or [`DocumentFragment`](https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment));
|
|
128
|
+
* - a valid [CSS selector](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors);
|
|
129
|
+
* - an object for selecting elements within shadow DOM,
|
|
130
|
+
* whose shape is `{ fromShadowDom: [selector1, selector2, ...] }`,
|
|
131
|
+
* where `selector1`, `selector2`, etc. select shadow hosts, and the last selector selects the actual context.
|
|
132
|
+
* `selector2` in this example is _within_ the shadow root created on the element(s) that match `selector1`,
|
|
133
|
+
* so in practice you shouldn’t have more than two elements in such an array
|
|
134
|
+
* unless you have a very complex structure with multiple shadow DOM layers;
|
|
135
|
+
* - a [`NodeList`](https://developer.mozilla.org/en-US/docs/Web/API/NodeList) (likely a result of a [`querySelectorAll()`](https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelectorAll) call);
|
|
136
|
+
* - an array containing any combination of selectors, nodes, or shadow DOM objects (described above);
|
|
137
|
+
* - an object containing `include` and / or `exclude` properties.
|
|
138
|
+
* It’s useful if you’d like to exclude certain elements or parts of the page.
|
|
139
|
+
* The values for `include` and `exclude` can take any of the above shapes.
|
|
140
|
+
* It’s unlikely that you’d want to have complex `include` / `exclude` rules,
|
|
141
|
+
* but if you do, the exact behavior is documented by the relevant tests:
|
|
142
|
+
* [`is-node-in-scan-context.test.ts`](https://github.com/pomerantsev/accented/blob/main/packages/accented/src/utils/is-node-in-scan-context.test.ts).
|
|
143
|
+
*
|
|
144
|
+
* See also the documentation for the [`context` parameter of `axe.run()`](https://www.deque.com/axe/core-documentation/api-documentation/#context-parameter),
|
|
145
|
+
* which the `context` option from Accented mostly mirrors
|
|
146
|
+
* (note that Accented doesn’t support the `fromFrames` object shape).
|
|
147
|
+
*
|
|
148
|
+
* @default document
|
|
149
|
+
*/
|
|
150
|
+
context?: Context;
|
|
75
151
|
/**
|
|
76
152
|
* The character sequence that’s used in various elements, attributes and stylesheets that Accented adds to the page.
|
|
153
|
+
*
|
|
154
|
+
* You shouldn’t have to provide this prop unless some of the names on your page have "accented" in it and conflict with what Accented provides by default.
|
|
155
|
+
*
|
|
77
156
|
* * The data attribute that’s added to elements with issues (default: `data-accented`).
|
|
78
|
-
* * The custom elements for the button and the dialog that get created for each element with issues
|
|
157
|
+
* * The names of custom elements for the button and the dialog that get created for each element with issues
|
|
79
158
|
* (default: `accented-trigger`, `accented-dialog`).
|
|
80
159
|
* * The CSS cascade layer containing page-wide Accented-specific styles (default: `accented`).
|
|
81
160
|
* * The prefix for some of the CSS custom properties used by Accented (default: `--accented-`).
|
|
@@ -85,23 +164,25 @@ export type AccentedOptions = {
|
|
|
85
164
|
* Only lowercase alphanumeric characters and dashes (-) are allowed in the name,
|
|
86
165
|
* and it must start with a lowercase letter.
|
|
87
166
|
*
|
|
88
|
-
*
|
|
167
|
+
* @default 'accented'
|
|
168
|
+
*
|
|
169
|
+
* @example
|
|
170
|
+
*
|
|
171
|
+
* accented({name: 'my-name'});
|
|
172
|
+
*
|
|
173
|
+
* With the above option provided, the attribute set on elements with issues will be `data-my-name`,
|
|
174
|
+
* a custom element will be called `my-name-trigger`, and so on.
|
|
175
|
+
*
|
|
89
176
|
*/
|
|
90
177
|
name?: string;
|
|
91
178
|
/**
|
|
92
|
-
*
|
|
179
|
+
* An object controlling how the results of scans are presented.
|
|
93
180
|
* */
|
|
94
181
|
output?: Output;
|
|
95
182
|
/**
|
|
96
|
-
*
|
|
183
|
+
* An object controlling at what moments Accented will run its scans.
|
|
97
184
|
* */
|
|
98
185
|
throttle?: Throttle;
|
|
99
|
-
/**
|
|
100
|
-
* A callback that will be called after each scan.
|
|
101
|
-
*
|
|
102
|
-
* Default: `() => {}`.
|
|
103
|
-
* */
|
|
104
|
-
callback?: Callback;
|
|
105
186
|
};
|
|
106
187
|
/**
|
|
107
188
|
* A function that fully disables Accented,
|
|
@@ -109,9 +190,10 @@ export type AccentedOptions = {
|
|
|
109
190
|
*/
|
|
110
191
|
export type DisableAccented = () => void;
|
|
111
192
|
export type Position = {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
193
|
+
left: number;
|
|
194
|
+
top: number;
|
|
195
|
+
width: number;
|
|
196
|
+
height: number;
|
|
115
197
|
};
|
|
116
198
|
export type Issue = {
|
|
117
199
|
id: string;
|
|
@@ -120,17 +202,26 @@ export type Issue = {
|
|
|
120
202
|
url: string;
|
|
121
203
|
impact: axe.ImpactValue;
|
|
122
204
|
};
|
|
123
|
-
export type
|
|
124
|
-
element: HTMLElement;
|
|
205
|
+
export type BaseElementWithIssues = {
|
|
206
|
+
element: HTMLElement | SVGElement;
|
|
207
|
+
rootNode: Node;
|
|
208
|
+
};
|
|
209
|
+
export type ElementWithIssues = BaseElementWithIssues & {
|
|
125
210
|
issues: Array<Issue>;
|
|
126
211
|
};
|
|
127
|
-
export type ExtendedElementWithIssues =
|
|
212
|
+
export type ExtendedElementWithIssues = BaseElementWithIssues & {
|
|
128
213
|
issues: Signal<ElementWithIssues['issues']>;
|
|
129
214
|
visible: Signal<boolean>;
|
|
130
215
|
trigger: AccentedTrigger;
|
|
131
216
|
position: Signal<Position>;
|
|
132
|
-
|
|
217
|
+
skipRender: boolean;
|
|
218
|
+
anchorNameValue: string;
|
|
219
|
+
scrollableAncestors: Signal<Set<Element>>;
|
|
133
220
|
id: number;
|
|
134
221
|
};
|
|
222
|
+
export type ScanContext = {
|
|
223
|
+
include: Array<Node>;
|
|
224
|
+
exclude: Array<Node>;
|
|
225
|
+
};
|
|
135
226
|
export {};
|
|
136
227
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,KAAK,GAAG,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEtE,MAAM,MAAM,QAAQ,GAAG;IACrB;;;;;;;;;;;SAWK;IACL,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;;;;;;;SAWK;IACL,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,MAAM,GAAG;IACnB;;;;SAIK;IACL,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;GAGG;AAEH,MAAM,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,sBAAsB,CAAC,CAAC;AAIzE,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC;AAGtD,MAAM,MAAM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