From d586d9be511a7d48b25cad62bd5053f91ebe3450 Mon Sep 17 00:00:00 2001 From: Sarka Chwastkova Date: Tue, 26 Nov 2024 17:53:04 +0100 Subject: [PATCH] feat(TooltipPrimitive): remove redundant role attribute --- .../components/TooltipContent.tsx | 85 ++++++++++--------- 1 file changed, 44 insertions(+), 41 deletions(-) diff --git a/packages/orbit-components/src/primitives/TooltipPrimitive/components/TooltipContent.tsx b/packages/orbit-components/src/primitives/TooltipPrimitive/components/TooltipContent.tsx index 93b0855950..8b644e1da9 100644 --- a/packages/orbit-components/src/primitives/TooltipPrimitive/components/TooltipContent.tsx +++ b/packages/orbit-components/src/primitives/TooltipPrimitive/components/TooltipContent.tsx @@ -105,54 +105,57 @@ const TooltipContent = ({ [onClose, onCloseMobile, elements.floating], ); + const handleCombinedClick = ev => { + handleInnerClick(ev); + + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument + onClick(ev); + }; + return ( - // Disabling because the onClick exists just to stop propagation of events + // Disabling because the onClick exists to close tooltip when clicking in interactibe elements, which should not happen with keyboard // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-noninteractive-element-interactions -