From 06b1d57015c59fbba95c8986fe054c2b3336f73f Mon Sep 17 00:00:00 2001 From: Douglas Fabris Date: Wed, 13 Mar 2024 17:56:45 -0300 Subject: [PATCH] fix(fuselage): `ToastBar` remove close button from content alert (#1320) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: JĂșlia Jaeger Foresti <60678893+juliajforesti@users.noreply.github.com> --- .changeset/clever-socks-double.md | 5 +++++ packages/fuselage/src/components/ToastBar/ToastBar.tsx | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 .changeset/clever-socks-double.md diff --git a/.changeset/clever-socks-double.md b/.changeset/clever-socks-double.md new file mode 100644 index 0000000000..1718c4f81d --- /dev/null +++ b/.changeset/clever-socks-double.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/fuselage": patch +--- + +fix(fuselage): `ToastBar` remove close button from content alert diff --git a/packages/fuselage/src/components/ToastBar/ToastBar.tsx b/packages/fuselage/src/components/ToastBar/ToastBar.tsx index 5753eb12ff..ae8dfbd368 100644 --- a/packages/fuselage/src/components/ToastBar/ToastBar.tsx +++ b/packages/fuselage/src/components/ToastBar/ToastBar.tsx @@ -24,7 +24,6 @@ export function ToastBar({ time = 5, id, onClose, - buttonLabel = 'Close', ...props }: ToastBarProps) { const iconName = @@ -74,6 +73,7 @@ export function ToastBar({ elevation='2nb' borderRadius='x4' role='alert' + aria-labelledby={toastId} {...props} >
@@ -91,7 +91,8 @@ export function ToastBar({ tiny onClick={() => onClose(toastId)} icon='cross' - aria-label={buttonLabel} + tabIndex={-1} + aria-hidden />
)}