@storybook/addon-a11y 10.2.0-beta.3 → 10.2.0-beta.5

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/dist/manager.js CHANGED
@@ -2130,7 +2130,7 @@ var Hidden = styled6.div({
2130
2130
  boxShadow: `${theme2.appBorderColor} 0 0 0 1px inset`
2131
2131
  })
2132
2132
  ), VisionSimulator = () => {
2133
- let [globals, updateGlobals] = useGlobals2(), value = globals[VISION_GLOBAL_KEY], options = Object.entries(filters).map(([key, { label, percentage }]) => ({
2133
+ let [globals, updateGlobals, storyGlobals] = useGlobals2(), value = globals[VISION_GLOBAL_KEY], isLocked = storyGlobals[VISION_GLOBAL_KEY] !== void 0, options = Object.entries(filters).map(([key, { label, percentage }]) => ({
2134
2134
  title: label,
2135
2135
  description: percentage ? `${percentage}% of users` : void 0,
2136
2136
  icon: React7.createElement(ColorIcon, { $filter: key }),
@@ -2142,7 +2142,10 @@ var Hidden = styled6.div({
2142
2142
  resetLabel: "Reset color filter",
2143
2143
  onReset: () => updateGlobals({ [VISION_GLOBAL_KEY]: void 0 }),
2144
2144
  icon: React7.createElement(AccessibilityIcon, null),
2145
- ariaLabel: "Vision simulator",
2145
+ disabled: isLocked,
2146
+ ariaLabel: isLocked ? "Vision filter set by story globals" : "Vision filter",
2147
+ ariaDescription: "Select a vision filter among predefined options, or reset to remove the filter.",
2148
+ tooltip: isLocked ? "Vision filter set by story globals" : "Change vision filter",
2146
2149
  defaultOptions: value,
2147
2150
  options,
2148
2151
  onSelect: (selected) => updateGlobals({ [VISION_GLOBAL_KEY]: selected })
@@ -1,10 +1,10 @@
1
- import CJS_COMPAT_NODE_URL_yp7i4zsh0rg from 'node:url';
2
- import CJS_COMPAT_NODE_PATH_yp7i4zsh0rg from 'node:path';
3
- import CJS_COMPAT_NODE_MODULE_yp7i4zsh0rg from "node:module";
1
+ import CJS_COMPAT_NODE_URL_m2msn4xsx1 from 'node:url';
2
+ import CJS_COMPAT_NODE_PATH_m2msn4xsx1 from 'node:path';
3
+ import CJS_COMPAT_NODE_MODULE_m2msn4xsx1 from "node:module";
4
4
 
5
- var __filename = CJS_COMPAT_NODE_URL_yp7i4zsh0rg.fileURLToPath(import.meta.url);
6
- var __dirname = CJS_COMPAT_NODE_PATH_yp7i4zsh0rg.dirname(__filename);
7
- var require = CJS_COMPAT_NODE_MODULE_yp7i4zsh0rg.createRequire(import.meta.url);
5
+ var __filename = CJS_COMPAT_NODE_URL_m2msn4xsx1.fileURLToPath(import.meta.url);
6
+ var __dirname = CJS_COMPAT_NODE_PATH_m2msn4xsx1.dirname(__filename);
7
+ var require = CJS_COMPAT_NODE_MODULE_m2msn4xsx1.createRequire(import.meta.url);
8
8
 
9
9
  // ------------------------------------------------------------
10
10
  // end of CJS compatibility banner, injected by Storybook's esbuild configuration
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/addon-a11y",
3
- "version": "10.2.0-beta.3",
3
+ "version": "10.2.0-beta.5",
4
4
  "description": "Storybook Addon A11y: Test UI component compliance with WCAG web accessibility standards",
5
5
  "keywords": [
6
6
  "a11y",
@@ -70,7 +70,7 @@
70
70
  "vitest-axe": "^0.1.0"
71
71
  },
72
72
  "peerDependencies": {
73
- "storybook": "^10.2.0-beta.3"
73
+ "storybook": "^10.2.0-beta.5"
74
74
  },
75
75
  "publishConfig": {
76
76
  "access": "public"