@wix/editor-react-components 1.2378.0 → 1.2379.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.
|
@@ -3,9 +3,8 @@ import { AriaProps } from '../../../../types/vendored/editor-elements-types-a11y
|
|
|
3
3
|
type UseButtonA11yParams = {
|
|
4
4
|
propsA11y?: A11y;
|
|
5
5
|
ariaAttributes?: AriaProps;
|
|
6
|
-
label: string;
|
|
7
6
|
};
|
|
8
|
-
export declare function useButtonA11y({ propsA11y, ariaAttributes,
|
|
7
|
+
export declare function useButtonA11y({ propsA11y, ariaAttributes, }: UseButtonA11yParams): {
|
|
9
8
|
tabIndex: 0 | -1 | undefined;
|
|
10
9
|
screenReader: {
|
|
11
10
|
prefix?: string | null;
|
|
@@ -177,8 +177,7 @@ function useButtonEventHandlers({
|
|
|
177
177
|
}
|
|
178
178
|
function useButtonA11y({
|
|
179
179
|
propsA11y,
|
|
180
|
-
ariaAttributes
|
|
181
|
-
label: label2
|
|
180
|
+
ariaAttributes
|
|
182
181
|
}) {
|
|
183
182
|
const normalizedA11y = useMemo(
|
|
184
183
|
() => removeAriaPrefix(propsA11y ?? {}),
|
|
@@ -189,11 +188,11 @@ function useButtonA11y({
|
|
|
189
188
|
ariaAttributes: {
|
|
190
189
|
...ariaAttributes,
|
|
191
190
|
...normalizedA11y,
|
|
192
|
-
label: (ariaAttributes == null ? void 0 : ariaAttributes.label) ??
|
|
191
|
+
label: (ariaAttributes == null ? void 0 : ariaAttributes.label) ?? normalizedA11y.label
|
|
193
192
|
},
|
|
194
193
|
tabindex: normalizedA11y == null ? void 0 : normalizedA11y.tabindex
|
|
195
194
|
}),
|
|
196
|
-
[normalizedA11y,
|
|
195
|
+
[normalizedA11y, ariaAttributes]
|
|
197
196
|
);
|
|
198
197
|
return a11yAttr;
|
|
199
198
|
}
|
|
@@ -271,7 +270,7 @@ const Button = (props) => {
|
|
|
271
270
|
onFocus,
|
|
272
271
|
onBlur
|
|
273
272
|
});
|
|
274
|
-
const a11yAttr = useButtonA11y({ propsA11y, ariaAttributes
|
|
273
|
+
const a11yAttr = useButtonA11y({ propsA11y, ariaAttributes });
|
|
275
274
|
const renderedLabel = labelContent ?? label2;
|
|
276
275
|
const wrapperAttributes = {
|
|
277
276
|
id,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/editor-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2379.0",
|
|
4
4
|
"description": "React components for the Wix Editor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -195,5 +195,5 @@
|
|
|
195
195
|
"registry": "https://registry.npmjs.org/",
|
|
196
196
|
"access": "public"
|
|
197
197
|
},
|
|
198
|
-
"falconPackageHash": "
|
|
198
|
+
"falconPackageHash": "e1c9f7054e50ffe0584863c2124abbb8a425baa404dbc6e1724d7601"
|
|
199
199
|
}
|