From 3509b58ef4dc9ab664e6d8f0842301e5611bf4bc Mon Sep 17 00:00:00 2001 From: niukanen1 <57656076+niukanen1@users.noreply.github.com> Date: Wed, 16 Sep 2026 00:26:03 +0400 Subject: [PATCH 1/2] fix(tooltip): make InfoTooltip keyboard reachable with an accessible name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The InfoTooltip trigger was a plain
, so the help text it carries was unreachable by keyboard and unannounced to screen readers — MUI tooltips open on focus, and there was nothing to focus. Render the trigger as a real ); }; From 6586c3b450820a3717bb79ea05c24bf37b78a3b2 Mon Sep 17 00:00:00 2001 From: niukanen1 <57656076+niukanen1@users.noreply.github.com> Date: Wed, 16 Sep 2026 14:45:16 +0400 Subject: [PATCH 2/2] test(tooltip): assert the tooltip opens on keyboard focus The test checked that the trigger is focusable but never focused it, so a regression in CustomTooltip focus handling would pass. Focus the trigger and await the rendered tooltip. Signed-off-by: niukanen1 <57656076+niukanen1@users.noreply.github.com> --- src/__testing__/InfoTooltip.test.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/__testing__/InfoTooltip.test.tsx b/src/__testing__/InfoTooltip.test.tsx index da7876a62..92727c7e8 100644 --- a/src/__testing__/InfoTooltip.test.tsx +++ b/src/__testing__/InfoTooltip.test.tsx @@ -14,13 +14,15 @@ const renderWithTheme = (ui: React.ReactElement) => render({ui}); describe('InfoTooltip', () => { - it('renders a focusable trigger so the tooltip opens on keyboard focus', () => { + it('renders a focusable trigger so the tooltip opens on keyboard focus', async () => { renderWithTheme(); const trigger = screen.getByRole('button', { name: 'More information' }); expect(trigger.getAttribute('type')).toBe('button'); expect(trigger.tabIndex).toBeGreaterThanOrEqual(0); + trigger.focus(); + expect(await screen.findByRole('tooltip')).not.toBeNull(); }); it('exposes an accessible name so screen readers announce the trigger', () => {