Skip to content

Commit 4bb35be

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 4bb35be

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ and this project adheres to
1717
- ♿(frontend) improve ARIA in doc grid and editor for a11y #1519
1818
- ♿(frontend) improve accessibility and styling of summary table #1528
1919
- ♿(frontend) add focus trap and enter key support to remove doc modal #1531
20+
- ♿(frontend) fix toggle panel button a11y with dynamic label and aria-… #1634
2021
- 🐛(frontend) preserve @ character when esc is pressed after typing it #1512
2122
- 🐛(frontend) make summary button fixed to remain visible during scroll #1581
2223
- 🐛(frontend) fix pdf embed to use full width #1526

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)