From fbf959e302db811fa1028901292a7e267cc9509b Mon Sep 17 00:00:00 2001 From: Yerimar Date: Wed, 4 Dec 2024 23:27:32 -0400 Subject: [PATCH 1/5] [EuiCollapsibleNavBeta] Added aria-hidden=true to arrow button (#7353) --- .../accordion/accordion_trigger/accordion_trigger.tsx | 1 + .../__snapshots__/collapsible_nav_accordion.test.tsx.snap | 2 ++ .../__snapshots__/collapsible_nav_item.test.tsx.snap | 1 + 3 files changed, 4 insertions(+) diff --git a/packages/eui/src/components/accordion/accordion_trigger/accordion_trigger.tsx b/packages/eui/src/components/accordion/accordion_trigger/accordion_trigger.tsx index 9f0cc29efef..f5cd52a04b5 100644 --- a/packages/eui/src/components/accordion/accordion_trigger/accordion_trigger.tsx +++ b/packages/eui/src/components/accordion/accordion_trigger/accordion_trigger.tsx @@ -62,6 +62,7 @@ export const EuiAccordionTrigger: FunctionComponent< aria-controls={ariaControlsId} aria-expanded={isOpen} aria-labelledby={buttonId} + aria-hidden={buttonIsInteractive ? "true" : "false"} tabIndex={buttonIsInteractive ? -1 : 0} /> ); diff --git a/packages/eui/src/components/collapsible_nav_beta/collapsible_nav_item/__snapshots__/collapsible_nav_accordion.test.tsx.snap b/packages/eui/src/components/collapsible_nav_beta/collapsible_nav_item/__snapshots__/collapsible_nav_accordion.test.tsx.snap index fff981ec06d..85a06749e97 100644 --- a/packages/eui/src/components/collapsible_nav_beta/collapsible_nav_item/__snapshots__/collapsible_nav_accordion.test.tsx.snap +++ b/packages/eui/src/components/collapsible_nav_beta/collapsible_nav_item/__snapshots__/collapsible_nav_accordion.test.tsx.snap @@ -27,6 +27,7 @@ exports[`EuiCollapsibleNavAccordion renders as a sub item 1`] = ` - - -
-
- -`; - -exports[`EuiCollapsibleNav does not render if isOpen is false 1`] = `
`; - -exports[`EuiCollapsibleNav is rendered 1`] = ` -
-
-
-
- -
-
-
-
-`; - -exports[`EuiCollapsibleNav props accepts EuiFlyout props 1`] = ` -
-
-
- -
-
-
-`; - -exports[`EuiCollapsibleNav props button 1`] = ` -
- - -
-
-
-
-`; - -exports[`EuiCollapsibleNav props dockedBreakpoint 1`] = ` -
-
-
-
- -
-
-
-
-`; - -exports[`EuiCollapsibleNav props isDocked 1`] = ` -
-
-
-
-
-
-`; - -exports[`EuiCollapsibleNav props onClose 1`] = ` -
-
-
-
- -
-
-
-
-`; - -exports[`EuiCollapsibleNav props showButtonIfDocked 1`] = ` -
- - -
-
-
-
-`; diff --git a/packages/eui/src/components/collapsible_nav/collapsible_nav_group/__snapshots__/collapsible_nav_group.test.tsx.snap b/packages/eui/src/components/collapsible_nav/collapsible_nav_group/__snapshots__/collapsible_nav_group.test.tsx.snap index 7f6277f2a14..56faaf053ff 100644 --- a/packages/eui/src/components/collapsible_nav/collapsible_nav_group/__snapshots__/collapsible_nav_group.test.tsx.snap +++ b/packages/eui/src/components/collapsible_nav/collapsible_nav_group/__snapshots__/collapsible_nav_group.test.tsx.snap @@ -236,6 +236,7 @@ exports[`EuiCollapsibleNavGroup when isCollapsible is true accepts accordion pro