From ac25f34211316f7f2c26762c65a234b37f55bf3e Mon Sep 17 00:00:00 2001 From: LongTang Date: Wed, 13 May 2026 14:46:47 -0400 Subject: [PATCH] fix(profile): prevent ProfileTooltip from opening on keyboard focus --- .../src/components/profile/ProfileTooltip.spec.tsx | 10 ++++++++++ .../shared/src/components/profile/ProfileTooltip.tsx | 1 + 2 files changed, 11 insertions(+) diff --git a/packages/shared/src/components/profile/ProfileTooltip.spec.tsx b/packages/shared/src/components/profile/ProfileTooltip.spec.tsx index ac488ec137c..2f37d73df8a 100644 --- a/packages/shared/src/components/profile/ProfileTooltip.spec.tsx +++ b/packages/shared/src/components/profile/ProfileTooltip.spec.tsx @@ -101,4 +101,14 @@ describe('ProfileTooltip', () => { const [props] = mockSimpleTooltipSpy.mock.calls[0] as [TooltipProps]; expect(props.content).toBeTruthy(); }); + + it('only triggers on mouseenter ( not keyboard focus ) for WCAG 3.2.1', () => { + render( + + + , + ); + const [props] = mockSimpleTooltipSpy.mock.calls[0] as [TooltipProps]; + expect(props.trigger).toBe('mouseenter'); + }); }); diff --git a/packages/shared/src/components/profile/ProfileTooltip.tsx b/packages/shared/src/components/profile/ProfileTooltip.tsx index 3ce316ff712..e309859b718 100644 --- a/packages/shared/src/components/profile/ProfileTooltip.tsx +++ b/packages/shared/src/components/profile/ProfileTooltip.tsx @@ -163,6 +163,7 @@ export function ProfileTooltip({ ) : undefined, plugins: onTooltipMouseEnter || onTooltipMouseLeave ? [hoverPlugin] : undefined, + trigger: 'mouseenter', ...tooltip, onShow: (instance) => { logEvent({