From 262cab82a67a309363763c1eae241c03e63e9aa4 Mon Sep 17 00:00:00 2001 From: Pavel Kovirshin <45898580+PahaN47@users.noreply.github.com> Date: Wed, 11 Sep 2024 16:56:40 +0300 Subject: [PATCH] fix: share popover a11y (#214) --- 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}) => (