From 165396636d314c962f4594f959efeea5fd614842 Mon Sep 17 00:00:00 2001 From: Cee Chen Date: Thu, 10 Aug 2023 13:51:02 -0700 Subject: [PATCH 1/9] [misc cleanup] move props that don't need to be after `...rest` to before rest - these props are already extracted out and don't exist in `...rest`, so there's nothing to override --- src/components/flyout/flyout.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/flyout/flyout.tsx b/src/components/flyout/flyout.tsx index 4a7b132aa51..fdc4cd58a09 100644 --- a/src/components/flyout/flyout.tsx +++ b/src/components/flyout/flyout.tsx @@ -409,15 +409,15 @@ export const EuiFlyout = forwardRef( {...focusTrapProps} > )} role="dialog" - className={classes} tabIndex={0} - data-autofocus aria-describedby={!isPushed ? descriptionId : undefined} - style={newStyle} - ref={setRef} + data-autofocus > {!isPushed && screenReaderDescription} {closeButton} From bf1e24dc04bbe2b7a6a45492119283d3ab42753f Mon Sep 17 00:00:00 2001 From: Cee Chen Date: Thu, 10 Aug 2023 13:54:47 -0700 Subject: [PATCH 2/9] Remove `dialog` role + `tabIndex` from push flyouts Push flyouts are already not receiving screen reader specific text, and in the case of the new beta collapsible nav, the push flyout truly isn't a dialog --- .../__snapshots__/collapsible_nav.test.tsx.snap | 4 ---- .../__snapshots__/collapsible_nav_beta.test.tsx.snap | 4 ---- src/components/flyout/__snapshots__/flyout.test.tsx.snap | 2 -- src/components/flyout/flyout.tsx | 4 ++-- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/components/collapsible_nav/__snapshots__/collapsible_nav.test.tsx.snap b/src/components/collapsible_nav/__snapshots__/collapsible_nav.test.tsx.snap index b2da0e5c7f9..8d336949826 100644 --- a/src/components/collapsible_nav/__snapshots__/collapsible_nav.test.tsx.snap +++ b/src/components/collapsible_nav/__snapshots__/collapsible_nav.test.tsx.snap @@ -276,9 +276,7 @@ exports[`EuiCollapsibleNav props isDocked 1`] = ` class="euiFlyout euiCollapsibleNav emotion-euiFlyout-none-noMaxWidth-push-left-left-euiCollapsibleNav-push" data-autofocus="true" id="id" - role="dialog" style="inline-size: 320px;" - tabindex="0" />