@a11y-oracle/axe-bridge 1.0.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.
Files changed (47) hide show
  1. package/README.md +254 -0
  2. package/dist/index.d.ts +26 -0
  3. package/dist/index.d.ts.map +1 -0
  4. package/dist/index.js +27 -0
  5. package/dist/lib/axe-bridge.d.ts +33 -0
  6. package/dist/lib/axe-bridge.d.ts.map +1 -0
  7. package/dist/lib/axe-bridge.js +106 -0
  8. package/dist/lib/resolve-all.d.ts +45 -0
  9. package/dist/lib/resolve-all.d.ts.map +1 -0
  10. package/dist/lib/resolve-all.js +117 -0
  11. package/dist/lib/resolver-pipeline.d.ts +51 -0
  12. package/dist/lib/resolver-pipeline.d.ts.map +1 -0
  13. package/dist/lib/resolver-pipeline.js +94 -0
  14. package/dist/lib/resolvers/aria-hidden-focus.d.ts +31 -0
  15. package/dist/lib/resolvers/aria-hidden-focus.d.ts.map +1 -0
  16. package/dist/lib/resolvers/aria-hidden-focus.js +148 -0
  17. package/dist/lib/resolvers/content-on-hover.d.ts +27 -0
  18. package/dist/lib/resolvers/content-on-hover.d.ts.map +1 -0
  19. package/dist/lib/resolvers/content-on-hover.js +230 -0
  20. package/dist/lib/resolvers/focus-indicator.d.ts +32 -0
  21. package/dist/lib/resolvers/focus-indicator.d.ts.map +1 -0
  22. package/dist/lib/resolvers/focus-indicator.js +188 -0
  23. package/dist/lib/resolvers/frame-tested.d.ts +31 -0
  24. package/dist/lib/resolvers/frame-tested.d.ts.map +1 -0
  25. package/dist/lib/resolvers/frame-tested.js +177 -0
  26. package/dist/lib/resolvers/identical-links-same-purpose.d.ts +35 -0
  27. package/dist/lib/resolvers/identical-links-same-purpose.d.ts.map +1 -0
  28. package/dist/lib/resolvers/identical-links-same-purpose.js +117 -0
  29. package/dist/lib/resolvers/link-in-text-block.d.ts +29 -0
  30. package/dist/lib/resolvers/link-in-text-block.d.ts.map +1 -0
  31. package/dist/lib/resolvers/link-in-text-block.js +141 -0
  32. package/dist/lib/resolvers/scrollable-region-focusable.d.ts +26 -0
  33. package/dist/lib/resolvers/scrollable-region-focusable.d.ts.map +1 -0
  34. package/dist/lib/resolvers/scrollable-region-focusable.js +139 -0
  35. package/dist/lib/resolvers/skip-link.d.ts +26 -0
  36. package/dist/lib/resolvers/skip-link.d.ts.map +1 -0
  37. package/dist/lib/resolvers/skip-link.js +140 -0
  38. package/dist/lib/resolvers/target-size.d.ts +25 -0
  39. package/dist/lib/resolvers/target-size.d.ts.map +1 -0
  40. package/dist/lib/resolvers/target-size.js +125 -0
  41. package/dist/lib/types.d.ts +227 -0
  42. package/dist/lib/types.d.ts.map +1 -0
  43. package/dist/lib/types.js +8 -0
  44. package/dist/lib/wcag-thresholds.d.ts +34 -0
  45. package/dist/lib/wcag-thresholds.d.ts.map +1 -0
  46. package/dist/lib/wcag-thresholds.js +55 -0
  47. package/package.json +53 -0
@@ -0,0 +1,227 @@
1
+ /**
2
+ * @module types
3
+ *
4
+ * Minimal axe-core compatible types for the bridge. Defined locally
5
+ * to avoid a runtime dependency on axe-core. Structurally compatible
6
+ * with axe-core's result shapes.
7
+ */
8
+ /** A single check result within an axe node. */
9
+ export interface AxeCheck {
10
+ /** Check identifier. */
11
+ id: string;
12
+ /** Check-specific data (e.g., fontSize, fontWeight for color-contrast). */
13
+ data: unknown;
14
+ /** Related DOM nodes. */
15
+ relatedNodes: unknown[];
16
+ /** Impact level. */
17
+ impact?: string;
18
+ /** Description of the check result. */
19
+ message: string;
20
+ }
21
+ /** A single DOM node result from an axe rule. */
22
+ export interface AxeNode {
23
+ /** CSS selector path to the element. */
24
+ target: string[];
25
+ /** HTML snippet of the element. */
26
+ html: string;
27
+ /** Checks where any one passing fixes the issue. */
28
+ any: AxeCheck[];
29
+ /** Checks where all must pass. */
30
+ all: AxeCheck[];
31
+ /** Checks where none should be present. */
32
+ none: AxeCheck[];
33
+ /** Node-level impact. */
34
+ impact?: string | null;
35
+ /** Human-readable failure summary. */
36
+ failureSummary?: string;
37
+ }
38
+ /** A single axe rule result (violation, pass, or incomplete). */
39
+ export interface AxeRule {
40
+ /** Rule identifier (e.g., 'color-contrast'). */
41
+ id: string;
42
+ /** Impact severity. */
43
+ impact?: string | null;
44
+ /** WCAG tags. */
45
+ tags: string[];
46
+ /** Rule description. */
47
+ description: string;
48
+ /** Short help text. */
49
+ help: string;
50
+ /** URL to help documentation. */
51
+ helpUrl: string;
52
+ /** Affected DOM nodes. */
53
+ nodes: AxeNode[];
54
+ }
55
+ /**
56
+ * Full axe-core results object. Structurally compatible with
57
+ * `axe.AxeResults` without requiring the axe-core dependency.
58
+ */
59
+ export interface AxeResults {
60
+ /** Rules that found violations. */
61
+ violations: AxeRule[];
62
+ /** Rules that passed. */
63
+ passes: AxeRule[];
64
+ /** Rules that could not be fully evaluated. */
65
+ incomplete: AxeRule[];
66
+ /** Rules that were not applicable. */
67
+ inapplicable: AxeRule[];
68
+ /** Allow additional properties from axe-core. */
69
+ [key: string]: unknown;
70
+ }
71
+ /**
72
+ * WCAG conformance level.
73
+ *
74
+ * Structurally compatible with the `WcagLevel` type in
75
+ * `@a11y-oracle/audit-formatter`. Defined locally to avoid an
76
+ * unnecessary cross-library dependency.
77
+ *
78
+ * Each AA level includes the contrast requirement (SC 1.4.3).
79
+ * Level A has no contrast SC.
80
+ */
81
+ export type WcagLevel = 'wcag2a' | 'wcag2aa' | 'wcag21a' | 'wcag21aa' | 'wcag22a' | 'wcag22aa';
82
+ /**
83
+ * Contrast ratio thresholds for a WCAG conformance level.
84
+ */
85
+ export interface ContrastThresholds {
86
+ /** Minimum contrast ratio for normal text (e.g. 4.5 for AA). */
87
+ normalText: number;
88
+ /** Minimum contrast ratio for large text (e.g. 3.0 for AA). */
89
+ largeText: number;
90
+ }
91
+ /**
92
+ * Options for the incomplete contrast resolution pipeline.
93
+ *
94
+ * When `wcagLevel` is provided, thresholds are derived automatically.
95
+ * Explicit `threshold` / `largeTextThreshold` values override the
96
+ * level-derived values.
97
+ */
98
+ export interface ContrastResolutionOptions {
99
+ /**
100
+ * WCAG conformance level. When set, contrast thresholds are derived
101
+ * from the level (e.g. AA → 4.5 / 3.0). Explicit threshold values
102
+ * take precedence. Default: `'wcag22aa'`.
103
+ */
104
+ wcagLevel?: WcagLevel;
105
+ /** Minimum contrast ratio for normal text. Overrides wcagLevel. */
106
+ threshold?: number;
107
+ /** Minimum contrast ratio for large text. Overrides wcagLevel. */
108
+ largeTextThreshold?: number;
109
+ }
110
+ /** Options for the `link-in-text-block` resolver. */
111
+ export interface LinkInTextBlockOptions {
112
+ /**
113
+ * Minimum contrast ratio between link color and surrounding text
114
+ * to count as sufficient visual differentiation.
115
+ * Default: `3.0`.
116
+ */
117
+ linkTextContrastThreshold?: number;
118
+ }
119
+ /** Options for the `target-size` resolver. */
120
+ export interface TargetSizeOptions {
121
+ /**
122
+ * Minimum dimension (width and height) in CSS pixels.
123
+ * Default: `24`.
124
+ */
125
+ minSize?: number;
126
+ }
127
+ /** Options for the `scrollable-region-focusable` resolver. */
128
+ export interface ScrollableRegionOptions {
129
+ /**
130
+ * Maximum number of focusable children to inspect inside a
131
+ * scrollable container before giving up.
132
+ * Default: `50`.
133
+ */
134
+ maxChildren?: number;
135
+ }
136
+ /** Options for the `skip-link` resolver. */
137
+ export interface SkipLinkOptions {
138
+ /**
139
+ * Delay in milliseconds after focus for CSS transitions to settle.
140
+ * Default: `100`.
141
+ */
142
+ focusSettleDelay?: number;
143
+ }
144
+ /** Options for the `aria-hidden-focus` resolver. */
145
+ export interface AriaHiddenFocusOptions {
146
+ /**
147
+ * Maximum number of Tab presses during keyboard traversal.
148
+ * Default: `100`.
149
+ */
150
+ maxTabs?: number;
151
+ }
152
+ /** Options for the `focus-indicator` resolver. */
153
+ export interface FocusIndicatorOptions {
154
+ /**
155
+ * Delay in milliseconds after focus for CSS transitions to settle.
156
+ * Default: `100`.
157
+ */
158
+ focusSettleDelay?: number;
159
+ /**
160
+ * Minimum percentage of pixels that must differ between resting
161
+ * and focused screenshots to count as a visible indicator.
162
+ * Default: `0.1`.
163
+ */
164
+ diffThreshold?: number;
165
+ }
166
+ /** Options for the `content-on-hover` resolver. */
167
+ export interface ContentOnHoverOptions {
168
+ /**
169
+ * Delay in milliseconds after hover for content to appear.
170
+ * Default: `300`.
171
+ */
172
+ hoverDelay?: number;
173
+ /**
174
+ * Delay in milliseconds after dismiss action to check if content
175
+ * has disappeared.
176
+ * Default: `200`.
177
+ */
178
+ dismissDelay?: number;
179
+ }
180
+ /** Options for the `frame-tested` resolver. */
181
+ export interface FrameTestedOptions {
182
+ /**
183
+ * The complete axe-core source code as a string. Required for
184
+ * injection into cross-origin iframes.
185
+ */
186
+ axeSource?: string;
187
+ /**
188
+ * Timeout in milliseconds for axe-core execution inside an iframe.
189
+ * Default: `30000`.
190
+ */
191
+ iframeTimeout?: number;
192
+ }
193
+ /**
194
+ * Combined options for the `resolveAllIncomplete` orchestrator.
195
+ *
196
+ * Each property corresponds to a resolver's options interface.
197
+ * The `skipRules` array allows excluding specific resolvers.
198
+ */
199
+ export interface IncompleteResolutionOptions {
200
+ /** WCAG conformance level (applied to contrast resolver). */
201
+ wcagLevel?: WcagLevel;
202
+ /** Options for the `color-contrast` resolver. */
203
+ contrast?: ContrastResolutionOptions;
204
+ /** Options for the `link-in-text-block` resolver. */
205
+ linkInTextBlock?: LinkInTextBlockOptions;
206
+ /** Options for the `target-size` resolver. */
207
+ targetSize?: TargetSizeOptions;
208
+ /** Options for the `scrollable-region-focusable` resolver. */
209
+ scrollableRegion?: ScrollableRegionOptions;
210
+ /** Options for the `skip-link` resolver. */
211
+ skipLink?: SkipLinkOptions;
212
+ /** Options for the `aria-hidden-focus` resolver. */
213
+ ariaHiddenFocus?: AriaHiddenFocusOptions;
214
+ /** Options for the `focus-indicator` resolver. */
215
+ focusIndicator?: FocusIndicatorOptions;
216
+ /** Options for the `content-on-hover` resolver. */
217
+ contentOnHover?: ContentOnHoverOptions;
218
+ /** Options for the `frame-tested` resolver. */
219
+ frameTested?: FrameTestedOptions;
220
+ /**
221
+ * Rule IDs to skip during resolution. Matching resolvers
222
+ * will not be invoked and their incomplete entries will be
223
+ * left untouched.
224
+ */
225
+ skipRules?: string[];
226
+ }
227
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,gDAAgD;AAChD,MAAM,WAAW,QAAQ;IACvB,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,2EAA2E;IAC3E,IAAI,EAAE,OAAO,CAAC;IACd,yBAAyB;IACzB,YAAY,EAAE,OAAO,EAAE,CAAC;IACxB,oBAAoB;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,iDAAiD;AACjD,MAAM,WAAW,OAAO;IACtB,wCAAwC;IACxC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,mCAAmC;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,GAAG,EAAE,QAAQ,EAAE,CAAC;IAChB,kCAAkC;IAClC,GAAG,EAAE,QAAQ,EAAE,CAAC;IAChB,2CAA2C;IAC3C,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,yBAAyB;IACzB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,sCAAsC;IACtC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,iEAAiE;AACjE,MAAM,WAAW,OAAO;IACtB,gDAAgD;IAChD,EAAE,EAAE,MAAM,CAAC;IACX,uBAAuB;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,iBAAiB;IACjB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,wBAAwB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,uBAAuB;IACvB,IAAI,EAAE,MAAM,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@@
1
+ /**
2
+ * @module types
3
+ *
4
+ * Minimal axe-core compatible types for the bridge. Defined locally
5
+ * to avoid a runtime dependency on axe-core. Structurally compatible
6
+ * with axe-core's result shapes.
7
+ */
8
+ export {};
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @module wcag-thresholds
3
+ *
4
+ * Maps WCAG conformance levels to contrast ratio thresholds.
5
+ *
6
+ * WCAG defines two contrast requirements:
7
+ * - **SC 1.4.3 (Level AA):** 4.5:1 for normal text, 3:1 for large text.
8
+ * - **SC 1.4.6 (Level AAA):** 7:1 for normal text, 4.5:1 for large text.
9
+ *
10
+ * Level A has no contrast requirement. This module centralizes the
11
+ * mapping so thresholds derive from the configured level rather than
12
+ * being hardcoded throughout the codebase.
13
+ */
14
+ import type { WcagLevel, ContrastThresholds } from './types.js';
15
+ /**
16
+ * Get WCAG contrast thresholds for a given conformance level.
17
+ *
18
+ * Returns the normal-text and large-text thresholds, or `null` if
19
+ * the level does not include a contrast requirement (Level A).
20
+ *
21
+ * @param level - Target WCAG conformance level. Defaults to `'wcag22aa'`.
22
+ * @returns Contrast thresholds, or null if contrast is not required.
23
+ *
24
+ * @example
25
+ * ```typescript
26
+ * const thresholds = getContrastThresholds('wcag22aa');
27
+ * // { normalText: 4.5, largeText: 3.0 }
28
+ *
29
+ * const noContrast = getContrastThresholds('wcag22a');
30
+ * // null (Level A has no contrast SC)
31
+ * ```
32
+ */
33
+ export declare function getContrastThresholds(level?: WcagLevel): ContrastThresholds | null;
34
+ //# sourceMappingURL=wcag-thresholds.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wcag-thresholds.d.ts","sourceRoot":"","sources":["../../src/lib/wcag-thresholds.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAuBhE;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,GAAE,SAAyB,GAC/B,kBAAkB,GAAG,IAAI,CAK3B"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * @module wcag-thresholds
3
+ *
4
+ * Maps WCAG conformance levels to contrast ratio thresholds.
5
+ *
6
+ * WCAG defines two contrast requirements:
7
+ * - **SC 1.4.3 (Level AA):** 4.5:1 for normal text, 3:1 for large text.
8
+ * - **SC 1.4.6 (Level AAA):** 7:1 for normal text, 4.5:1 for large text.
9
+ *
10
+ * Level A has no contrast requirement. This module centralizes the
11
+ * mapping so thresholds derive from the configured level rather than
12
+ * being hardcoded throughout the codebase.
13
+ */
14
+ /**
15
+ * WCAG contrast thresholds by conformance tier.
16
+ *
17
+ * Each entry maps a WcagLevel to its contrast requirements.
18
+ * Level A standards have no contrast SC, so they return null.
19
+ */
20
+ const THRESHOLD_MAP = {
21
+ // Level A — no contrast SC
22
+ wcag2a: null,
23
+ wcag21a: null,
24
+ wcag22a: null,
25
+ // Level AA — SC 1.4.3
26
+ wcag2aa: { normalText: 4.5, largeText: 3.0 },
27
+ wcag21aa: { normalText: 4.5, largeText: 3.0 },
28
+ wcag22aa: { normalText: 4.5, largeText: 3.0 },
29
+ };
30
+ /** Default level when none is specified. */
31
+ const DEFAULT_LEVEL = 'wcag22aa';
32
+ /**
33
+ * Get WCAG contrast thresholds for a given conformance level.
34
+ *
35
+ * Returns the normal-text and large-text thresholds, or `null` if
36
+ * the level does not include a contrast requirement (Level A).
37
+ *
38
+ * @param level - Target WCAG conformance level. Defaults to `'wcag22aa'`.
39
+ * @returns Contrast thresholds, or null if contrast is not required.
40
+ *
41
+ * @example
42
+ * ```typescript
43
+ * const thresholds = getContrastThresholds('wcag22aa');
44
+ * // { normalText: 4.5, largeText: 3.0 }
45
+ *
46
+ * const noContrast = getContrastThresholds('wcag22a');
47
+ * // null (Level A has no contrast SC)
48
+ * ```
49
+ */
50
+ export function getContrastThresholds(level = DEFAULT_LEVEL) {
51
+ if (level in THRESHOLD_MAP) {
52
+ return THRESHOLD_MAP[level];
53
+ }
54
+ return THRESHOLD_MAP[DEFAULT_LEVEL];
55
+ }
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@a11y-oracle/axe-bridge",
3
+ "version": "1.0.0",
4
+ "description": "Axe-core result post-processor that resolves 10 incomplete rules using visual analysis, keyboard interaction, and CDP inspection",
5
+ "license": "MIT",
6
+ "author": "a11y-oracle",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/a11y-oracle/a11y-oracle.git",
10
+ "directory": "libs/axe-bridge"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/a11y-oracle/a11y-oracle/issues"
14
+ },
15
+ "homepage": "https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/axe-bridge",
16
+ "keywords": [
17
+ "accessibility",
18
+ "a11y",
19
+ "axe-core",
20
+ "wcag",
21
+ "color-contrast",
22
+ "focus-indicator",
23
+ "target-size",
24
+ "cdp",
25
+ "testing"
26
+ ],
27
+ "publishConfig": {
28
+ "access": "public"
29
+ },
30
+ "type": "module",
31
+ "main": "./dist/index.js",
32
+ "module": "./dist/index.js",
33
+ "types": "./dist/index.d.ts",
34
+ "exports": {
35
+ "./package.json": "./package.json",
36
+ ".": {
37
+ "types": "./dist/index.d.ts",
38
+ "import": "./dist/index.js",
39
+ "default": "./dist/index.js"
40
+ }
41
+ },
42
+ "files": [
43
+ "dist",
44
+ "!**/*.tsbuildinfo"
45
+ ],
46
+ "dependencies": {
47
+ "@a11y-oracle/cdp-types": "1.0.0",
48
+ "@a11y-oracle/focus-analyzer": "1.0.0",
49
+ "@a11y-oracle/keyboard-engine": "1.0.0",
50
+ "@a11y-oracle/visual-engine": "1.0.0",
51
+ "tslib": "^2.3.0"
52
+ }
53
+ }