From a86bdfb9375dc8e470050c745bf24eb2c0645831 Mon Sep 17 00:00:00 2001 From: Yossi Saadi Date: Wed, 7 Feb 2024 18:02:42 +0200 Subject: [PATCH] feat(Button): add aria-hidden prop --- src/components/Button/Button.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/Button/Button.tsx b/src/components/Button/Button.tsx index b74866d4a7..451832bf06 100644 --- a/src/components/Button/Button.tsx +++ b/src/components/Button/Button.tsx @@ -71,6 +71,7 @@ export interface ButtonProps extends VibeComponentProps { /** aria controls - receives id for the controlled region */ ariaControls?: string; "aria-describedby"?: AriaAttributes["aria-describedby"]; + "aria-hidden"?: AriaAttributes["aria-hidden"]; /** On Button Focus callback */ onFocus?: (event: React.FocusEvent) => void; /** On Button Blur callback */ @@ -136,6 +137,7 @@ const Button: VibeComponent & { ariaExpanded, ariaControls, "aria-describedby": ariaDescribedBy, + "aria-hidden": ariaHidden, blurOnMouseUp, dataTestId: backwardCompatabilityDataTestId, "data-testid": dataTestId, @@ -261,7 +263,8 @@ const Button: VibeComponent & { "aria-haspopup": ariaHasPopup, "aria-expanded": ariaExpanded, "aria-controls": ariaControls, - "aria-describedby": ariaDescribedBy + "aria-describedby": ariaDescribedBy, + "aria-hidden": ariaHidden }; return props; }, [ @@ -285,7 +288,8 @@ const Button: VibeComponent & { ariaHasPopup, ariaExpanded, ariaControls, - ariaDescribedBy + ariaDescribedBy, + ariaHidden ]); const leftIconSize = useMemo(() => {