From 7f9869f5474cf58c9dc0eec8863043d0fa6a7dcc Mon Sep 17 00:00:00 2001 From: Cyril Date: Wed, 25 Mar 2026 10:13:44 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BF=EF=B8=8F(frontend)=20use=20aria-haspo?= =?UTF-8?q?pup=20menu=20on=20DropButton=20triggers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replace aria-haspopup true with menu on DropButton --- CHANGELOG.md | 4 ++++ src/frontend/apps/impress/src/components/DropButton.tsx | 2 +- .../components/dropdown-menu/__tests__/DropdownMenu.spec.tsx | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 128e6a3be..1b579a907 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to ## [Unreleased] +### Changed + +- ♿(frontend) use aria-haspopup menu on DropButton triggers #2126 + ## [v4.8.4] - 2026-03-25 ### Added diff --git a/src/frontend/apps/impress/src/components/DropButton.tsx b/src/frontend/apps/impress/src/components/DropButton.tsx index 141eb9d8f..3fb6345cc 100644 --- a/src/frontend/apps/impress/src/components/DropButton.tsx +++ b/src/frontend/apps/impress/src/components/DropButton.tsx @@ -93,7 +93,7 @@ export const DropButton = ({ onOpenChangeHandler(true); }} aria-label={label} - aria-haspopup="true" + aria-haspopup="menu" aria-expanded={isLocalOpen} data-testid={testId} $css={css` diff --git a/src/frontend/apps/impress/src/components/dropdown-menu/__tests__/DropdownMenu.spec.tsx b/src/frontend/apps/impress/src/components/dropdown-menu/__tests__/DropdownMenu.spec.tsx index 216f4b4ef..b18567c12 100644 --- a/src/frontend/apps/impress/src/components/dropdown-menu/__tests__/DropdownMenu.spec.tsx +++ b/src/frontend/apps/impress/src/components/dropdown-menu/__tests__/DropdownMenu.spec.tsx @@ -94,7 +94,7 @@ describe('', () => { ); const trigger = screen.getByRole('button', { name: 'Select language' }); - expect(trigger).toHaveAttribute('aria-haspopup', 'true'); + expect(trigger).toHaveAttribute('aria-haspopup', 'menu'); expect(trigger).toHaveAttribute('aria-expanded', 'false'); await userEvent.click(trigger);