@wix/editor-react-components 1.2700.0 → 1.2702.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.
@@ -61,10 +61,6 @@
61
61
  color: black;
62
62
  cursor: pointer;
63
63
  }
64
- .link__0rDnC:focus-visible {
65
- outline: 2px solid currentColor;
66
- outline-offset: 2px;
67
- }
68
64
 
69
65
  .label__EtLji {
70
66
  text-shadow: var(--text-shadow);
@@ -3,8 +3,9 @@ import { AriaProps } from '../../../../types/vendored/editor-elements-types-a11y
3
3
  type UseButtonA11yParams = {
4
4
  propsA11y?: A11y;
5
5
  ariaAttributes?: AriaProps;
6
+ lang?: string;
6
7
  };
7
- export declare function useButtonA11y({ propsA11y, ariaAttributes, }: UseButtonA11yParams): {
8
+ export declare function useButtonA11y({ propsA11y, ariaAttributes, lang, }: UseButtonA11yParams): {
8
9
  tabIndex: 0 | -1 | undefined;
9
10
  screenReader: {
10
11
  prefix?: string | null;
@@ -228,7 +228,8 @@ const manifest = {
228
228
  DATA.A11Y_ATTRIBUTES.ariaExpanded,
229
229
  DATA.A11Y_ATTRIBUTES.ariaDisabled,
230
230
  DATA.A11Y_ATTRIBUTES.ariaHaspopup,
231
- DATA.A11Y_ATTRIBUTES.ariaLabel
231
+ DATA.A11Y_ATTRIBUTES.ariaLabel,
232
+ DATA.A11Y_ATTRIBUTES.lang
232
233
  ]
233
234
  }
234
235
  }
@@ -187,10 +187,6 @@
187
187
  color: black;
188
188
  cursor: pointer;
189
189
  }
190
- .link__0rDnC:focus-visible {
191
- outline: 2px solid currentColor;
192
- outline-offset: 2px;
193
- }
194
190
 
195
191
  .label__EtLji {
196
192
  text-shadow: var(--text-shadow);
@@ -101,10 +101,6 @@
101
101
  color: black;
102
102
  cursor: pointer;
103
103
  }
104
- .link__0rDnC:focus-visible {
105
- outline: 2px solid currentColor;
106
- outline-offset: 2px;
107
- }
108
104
 
109
105
  .label__EtLji {
110
106
  text-shadow: var(--text-shadow);
@@ -961,10 +961,6 @@
961
961
  color: black;
962
962
  cursor: pointer;
963
963
  }
964
- .link__0rDnC:focus-visible {
965
- outline: 2px solid currentColor;
966
- outline-offset: 2px;
967
- }
968
964
 
969
965
  .label__EtLji {
970
966
  text-shadow: var(--text-shadow);
@@ -568,10 +568,6 @@
568
568
  color: black;
569
569
  cursor: pointer;
570
570
  }
571
- .link__0rDnC:focus-visible {
572
- outline: 2px solid currentColor;
573
- outline-offset: 2px;
574
- }
575
571
 
576
572
  .label__EtLji {
577
573
  text-shadow: var(--text-shadow);
@@ -183,22 +183,35 @@ function useButtonEventHandlers({
183
183
  }
184
184
  function useButtonA11y({
185
185
  propsA11y,
186
- ariaAttributes
186
+ ariaAttributes,
187
+ lang
187
188
  }) {
188
- const normalizedA11y = useMemo(
189
- () => removeAriaPrefix(propsA11y ?? {}),
190
- [propsA11y]
191
- );
189
+ const normalizedA11y = useMemo(() => {
190
+ const {
191
+ lang: manifestLang,
192
+ tabIndex: manifestTabindex,
193
+ ...manifestAriaAttributes
194
+ } = propsA11y ?? {};
195
+ return {
196
+ lang: manifestLang,
197
+ tabIndex: manifestTabindex,
198
+ ariaAttributes: removeAriaPrefix(manifestAriaAttributes)
199
+ };
200
+ }, [propsA11y]);
192
201
  const a11yAttr = useMemo(
193
- () => getAccessibilityAttributesSpread({
194
- ariaAttributes: {
195
- ...ariaAttributes,
196
- ...normalizedA11y,
197
- label: (ariaAttributes == null ? void 0 : ariaAttributes.label) ?? normalizedA11y.label
198
- },
199
- tabindex: normalizedA11y == null ? void 0 : normalizedA11y.tabindex
200
- }),
201
- [normalizedA11y, ariaAttributes]
202
+ () => {
203
+ var _a;
204
+ return getAccessibilityAttributesSpread({
205
+ ariaAttributes: {
206
+ ...ariaAttributes,
207
+ ...normalizedA11y.ariaAttributes,
208
+ label: (ariaAttributes == null ? void 0 : ariaAttributes.label) ?? normalizedA11y.ariaAttributes.label
209
+ },
210
+ tabIndex: normalizedA11y.tabIndex,
211
+ lang: ((lang == null ? void 0 : lang.trim()) ?? ((_a = normalizedA11y.lang) == null ? void 0 : _a.trim())) || void 0
212
+ });
213
+ },
214
+ [normalizedA11y, ariaAttributes, lang]
202
215
  );
203
216
  return a11yAttr;
204
217
  }
@@ -377,14 +390,13 @@ const Button = (props) => {
377
390
  onFocus,
378
391
  onBlur
379
392
  });
380
- const a11yAttr = useButtonA11y({ propsA11y, ariaAttributes });
393
+ const a11yAttr = useButtonA11y({ propsA11y, ariaAttributes, lang });
381
394
  const renderedLabel = labelContent ?? label2;
382
395
  const wrapperAttributes = {
383
396
  id,
384
397
  ...getDataAttributes(props),
385
398
  ...getQaDataAttributes(isQaMode, fullNameCompType),
386
399
  "data-semantic-classname": semanticClassNames.root,
387
- lang,
388
400
  ...direction && { dir: direction }
389
401
  };
390
402
  const renderButtonContent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/editor-react-components",
3
- "version": "1.2700.0",
3
+ "version": "1.2702.0",
4
4
  "description": "React components for the Wix Editor",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -200,5 +200,5 @@
200
200
  "registry": "https://registry.npmjs.org/",
201
201
  "access": "public"
202
202
  },
203
- "falconPackageHash": "066ce6d2d1a5585401d5f6d68f9bb8fc02ac769738c0c94d981e829b"
203
+ "falconPackageHash": "fadc31f97beeeb5fe29aa725f343f53e9a61b8077278b74539011c80"
204
204
  }