From 64377b3bb83b827dd4b657f84fd9515190a90c5f Mon Sep 17 00:00:00 2001 From: Pavel Kovyrshin Date: Fri, 30 Aug 2024 10:59:11 +0300 Subject: [PATCH] fix: share popover a11y --- src/components/SharePopover/SharePopover.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/SharePopover/SharePopover.tsx b/src/components/SharePopover/SharePopover.tsx index 6c88ceeb..4883486f 100644 --- a/src/components/SharePopover/SharePopover.tsx +++ b/src/components/SharePopover/SharePopover.tsx @@ -156,11 +156,12 @@ export const SharePopover = (props: SharePopoverProps) => { [onClick, text, title, url, useWebShareApi], ); + const shouldOpenByHover = openByHover && !useWebShareApi; return ( { tooltipId={tooltipId} disablePortal onOpenChange={setIsOpen} + focusTrap={!shouldOpenByHover} + autoFocus={!shouldOpenByHover} > {({onClick: onClickInner}) => (