Skip to content

Commit 68a9038

Browse files
committed
✨(frontend) fix toggle panel button a11y with dynamic label and aria-expanded
improves screen reader support by updating label and state indication dynamically Signed-off-by: Cyril <[email protected]>
1 parent d403878 commit 68a9038

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/frontend/apps/impress/src/features/header/components/ButtonTogglePanel.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ export const ButtonTogglePanel = () => {
1212
<Button
1313
size="medium"
1414
onClick={() => togglePanel()}
15-
aria-label={t('Open the header menu')}
15+
aria-label={t(
16+
isPanelOpen ? 'Close the header menu' : 'Open the header menu',
17+
)}
18+
aria-expanded={isPanelOpen}
1619
color="tertiary-text"
1720
icon={
1821
<Icon

0 commit comments

Comments
 (0)