@storybook/addon-a11y 10.5.2 → 10.6.0-alpha.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.
@@ -0,0 +1,40 @@
1
+ import { RunOptions, Selector, SelectorList, Spec } from "axe-core";
2
+
3
+ //#region code/addons/a11y/.dts-emit/code/addons/a11y/src/params.d.ts
4
+ type SelectorWithoutNode = Omit<Selector, 'Node'> | Omit<SelectorList, 'NodeList'>;
5
+ type ContextObjectWithoutNode = {
6
+ include: SelectorWithoutNode;
7
+ exclude?: SelectorWithoutNode;
8
+ } | {
9
+ exclude: SelectorWithoutNode;
10
+ include?: SelectorWithoutNode;
11
+ };
12
+ type ContextSpecWithoutNode = SelectorWithoutNode | ContextObjectWithoutNode;
13
+ type A11yTest = 'off' | 'todo' | 'error';
14
+ interface A11yParameters {
15
+ /**
16
+ * Context parameter for axe-core's run function, except without support for passing Nodes and
17
+ * NodeLists directly.
18
+ *
19
+ * @see https://github.com/dequelabs/axe-core/blob/develop/doc/context.md
20
+ */
21
+ context?: ContextSpecWithoutNode;
22
+ /**
23
+ * Options for running axe-core.
24
+ *
25
+ * @see https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#options-parameter
26
+ */
27
+ options?: RunOptions;
28
+ /**
29
+ * Configuration object for axe-core.
30
+ *
31
+ * @see https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#api-name-axeconfigure
32
+ */
33
+ config?: Spec;
34
+ /** Whether to disable accessibility tests. */
35
+ disable?: boolean;
36
+ /** Defines how accessibility violations should be handled: 'off', 'todo', or 'error'. */
37
+ test?: A11yTest;
38
+ }
39
+ //#endregion
40
+ export { SelectorWithoutNode as i, ContextObjectWithoutNode as n, ContextSpecWithoutNode as r, A11yParameters as t };
package/dist/index.d.ts CHANGED
@@ -1,87 +1,54 @@
1
- import * as storybook_internal_csf from 'storybook/internal/csf';
2
- import { Selector, SelectorList, RunOptions, Spec, AxeResults, Result, NodeResult } from 'axe-core';
3
-
4
- type SelectorWithoutNode = Omit<Selector, 'Node'> | Omit<SelectorList, 'NodeList'>;
5
- type ContextObjectWithoutNode = {
6
- include: SelectorWithoutNode;
7
- exclude?: SelectorWithoutNode;
8
- } | {
9
- exclude: SelectorWithoutNode;
10
- include?: SelectorWithoutNode;
11
- };
12
- type ContextSpecWithoutNode = SelectorWithoutNode | ContextObjectWithoutNode;
13
- type A11yTest = 'off' | 'todo' | 'error';
14
- interface A11yParameters$1 {
15
- /**
16
- * Context parameter for axe-core's run function, except without support for passing Nodes and
17
- * NodeLists directly.
18
- *
19
- * @see https://github.com/dequelabs/axe-core/blob/develop/doc/context.md
20
- */
21
- context?: ContextSpecWithoutNode;
22
- /**
23
- * Options for running axe-core.
24
- *
25
- * @see https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#options-parameter
26
- */
27
- options?: RunOptions;
28
- /**
29
- * Configuration object for axe-core.
30
- *
31
- * @see https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#api-name-axeconfigure
32
- */
33
- config?: Spec;
34
- /** Whether to disable accessibility tests. */
35
- disable?: boolean;
36
- /** Defines how accessibility violations should be handled: 'off', 'todo', or 'error'. */
37
- test?: A11yTest;
38
- }
1
+ import { i as SelectorWithoutNode, n as ContextObjectWithoutNode, r as ContextSpecWithoutNode, t as A11yParameters } from "./chunk-lw2YNZji.js";
2
+ import { AxeResults, NodeResult, Result } from "axe-core";
39
3
 
4
+ //#region code/addons/a11y/.dts-emit/code/addons/a11y/src/types.d.ts
40
5
  type A11yReport = EnhancedResults | {
41
- error: Error;
6
+ error: Error;
42
7
  };
43
- interface A11yParameters {
44
- /**
45
- * Accessibility configuration
46
- *
47
- * @see https://storybook.js.org/docs/writing-tests/accessibility-testing
48
- */
49
- a11y?: A11yParameters$1;
8
+ interface A11yParameters$1 {
9
+ /**
10
+ * Accessibility configuration
11
+ *
12
+ * @see https://storybook.js.org/docs/writing-tests/accessibility-testing
13
+ */
14
+ a11y?: A11yParameters;
50
15
  }
51
16
  interface A11yGlobals {
17
+ /**
18
+ * Accessibility configuration
19
+ *
20
+ * @see https://storybook.js.org/docs/writing-tests/accessibility-testing
21
+ */
22
+ a11y?: {
52
23
  /**
53
- * Accessibility configuration
24
+ * Prevent the addon from executing automated accessibility checks upon visiting a story. You
25
+ * can still trigger the checks from the addon panel.
54
26
  *
55
- * @see https://storybook.js.org/docs/writing-tests/accessibility-testing
27
+ * @see https://storybook.js.org/docs/writing-tests/accessibility-testing#disable-automated-checks
56
28
  */
57
- a11y?: {
58
- /**
59
- * Prevent the addon from executing automated accessibility checks upon visiting a story. You
60
- * can still trigger the checks from the addon panel.
61
- *
62
- * @see https://storybook.js.org/docs/writing-tests/accessibility-testing#disable-automated-checks
63
- */
64
- manual?: boolean;
65
- };
29
+ manual?: boolean;
30
+ };
66
31
  }
67
32
  type EnhancedNodeResult = NodeResult & {
68
- linkPath: string;
33
+ linkPath: string;
69
34
  };
70
35
  type EnhancedResult = Omit<Result, 'nodes'> & {
71
- nodes: EnhancedNodeResult[];
36
+ nodes: EnhancedNodeResult[];
72
37
  };
73
38
  type EnhancedResults = Omit<AxeResults, 'incomplete' | 'passes' | 'violations'> & {
74
- incomplete: EnhancedResult[];
75
- passes: EnhancedResult[];
76
- violations: EnhancedResult[];
39
+ incomplete: EnhancedResult[];
40
+ passes: EnhancedResult[];
41
+ violations: EnhancedResult[];
77
42
  };
78
43
  interface A11yTypes {
79
- parameters: A11yParameters;
80
- globals: A11yGlobals;
44
+ parameters: A11yParameters$1;
45
+ globals: A11yGlobals;
81
46
  }
82
-
47
+ //#endregion
48
+ //#region code/addons/a11y/.dts-emit/code/addons/a11y/src/constants.d.ts
83
49
  declare const PARAM_KEY = "a11y";
84
-
85
- declare const _default: () => storybook_internal_csf.PreviewAddon<A11yTypes>;
86
-
87
- export { type A11yGlobals, type A11yParameters$1 as A11yParameters, type A11yReport, type A11yTypes, type ContextObjectWithoutNode, type ContextSpecWithoutNode, PARAM_KEY, type SelectorWithoutNode, _default as default };
50
+ //#endregion
51
+ //#region code/addons/a11y/.dts-emit/code/addons/a11y/src/index.d.ts
52
+ declare function _default(): import("storybook/internal/csf").PreviewAddon<A11yTypes>;
53
+ //#endregion
54
+ export { type A11yGlobals, A11yParameters, type A11yReport, type A11yTypes, ContextObjectWithoutNode, ContextSpecWithoutNode, PARAM_KEY, SelectorWithoutNode, _default as default };
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_4fvxrpouz8n from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_4fvxrpouz8n from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_4fvxrpouz8n from "node:module";
1
+ import CJS_COMPAT_NODE_URL_pgjm6iv5oj from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_pgjm6iv5oj from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_pgjm6iv5oj from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_4fvxrpouz8n.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_4fvxrpouz8n.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_4fvxrpouz8n.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_pgjm6iv5oj.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_pgjm6iv5oj.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_pgjm6iv5oj.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
package/dist/preset.js CHANGED
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_4fvxrpouz8n from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_4fvxrpouz8n from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_4fvxrpouz8n from "node:module";
1
+ import CJS_COMPAT_NODE_URL_pgjm6iv5oj from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_pgjm6iv5oj from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_pgjm6iv5oj from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_4fvxrpouz8n.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_4fvxrpouz8n.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_4fvxrpouz8n.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_pgjm6iv5oj.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_pgjm6iv5oj.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_pgjm6iv5oj.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
package/dist/preview.d.ts CHANGED
@@ -1,53 +1,17 @@
1
- import * as storybook_internal_csf from 'storybook/internal/csf';
2
- import { AfterEach } from 'storybook/internal/types';
3
- import { Selector, SelectorList, RunOptions, Spec } from 'axe-core';
1
+ import { t as A11yParameters } from "./chunk-lw2YNZji.js";
2
+ import { AfterEach } from "storybook/internal/types";
4
3
 
5
- type SelectorWithoutNode = Omit<Selector, 'Node'> | Omit<SelectorList, 'NodeList'>;
6
- type ContextObjectWithoutNode = {
7
- include: SelectorWithoutNode;
8
- exclude?: SelectorWithoutNode;
9
- } | {
10
- exclude: SelectorWithoutNode;
11
- include?: SelectorWithoutNode;
12
- };
13
- type ContextSpecWithoutNode = SelectorWithoutNode | ContextObjectWithoutNode;
14
- type A11yTest = 'off' | 'todo' | 'error';
15
- interface A11yParameters {
16
- /**
17
- * Context parameter for axe-core's run function, except without support for passing Nodes and
18
- * NodeLists directly.
19
- *
20
- * @see https://github.com/dequelabs/axe-core/blob/develop/doc/context.md
21
- */
22
- context?: ContextSpecWithoutNode;
23
- /**
24
- * Options for running axe-core.
25
- *
26
- * @see https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#options-parameter
27
- */
28
- options?: RunOptions;
29
- /**
30
- * Configuration object for axe-core.
31
- *
32
- * @see https://github.com/dequelabs/axe-core/blob/develop/doc/API.md#api-name-axeconfigure
33
- */
34
- config?: Spec;
35
- /** Whether to disable accessibility tests. */
36
- disable?: boolean;
37
- /** Defines how accessibility violations should be handled: 'off', 'todo', or 'error'. */
38
- test?: A11yTest;
39
- }
40
-
41
- declare const decorators: storybook_internal_csf.DecoratorFunction[];
4
+ //#region code/addons/a11y/.dts-emit/code/addons/a11y/src/preview.d.ts
5
+ declare const decorators: import("storybook/internal/types").DecoratorFunction[];
42
6
  declare const afterEach: AfterEach<any>;
43
7
  declare const initialGlobals: {
44
- a11y: {
45
- manual: boolean;
46
- };
47
- vision: undefined;
8
+ a11y: {
9
+ manual: boolean;
10
+ };
11
+ vision: undefined;
48
12
  };
49
13
  declare const parameters: {
50
- a11y: A11yParameters;
14
+ a11y: A11yParameters;
51
15
  };
52
-
53
- export { afterEach, decorators, initialGlobals, parameters };
16
+ //#endregion
17
+ export { afterEach, decorators, initialGlobals, parameters };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-a11y",
3
- "version": "10.5.2",
3
+ "version": "10.6.0-alpha.1",
4
4
  "description": "Storybook Addon A11y: Test UI component compliance with WCAG web accessibility standards",
5
5
  "keywords": [
6
6
  "a11y",
@@ -69,11 +69,11 @@
69
69
  "react": "^18.2.0",
70
70
  "react-dom": "^18.2.0",
71
71
  "react-resize-detector": "^7.1.2",
72
- "typescript": "^5.9.3",
72
+ "typescript": "^6.0.3",
73
73
  "vitest-axe": "^0.1.0"
74
74
  },
75
75
  "peerDependencies": {
76
- "storybook": "^10.5.2"
76
+ "storybook": "^10.6.0-alpha.1"
77
77
  },
78
78
  "publishConfig": {
79
79
  "access": "public"