-
Notifications
You must be signed in to change notification settings - Fork 463
Open
Labels
Description
docs/src/frontend/apps/impress/src/features/header/components/ButtonTogglePanel.tsx
Lines 7 to 27 in a4e3168
| export const ButtonTogglePanel = () => { | |
| const { t } = useTranslation(); | |
| const { isPanelOpen, togglePanel } = useLeftPanelStore(); | |
| return ( | |
| <Button | |
| size="medium" | |
| onClick={() => togglePanel()} | |
| aria-label={t('Open the header menu')} | |
| color="tertiary-text" | |
| icon={ | |
| <Icon | |
| $variation="800" | |
| $theme="primary" | |
| iconName={isPanelOpen ? 'close' : 'menu'} | |
| /> | |
| } | |
| className="--docs--button-toggle-panel" | |
| /> | |
| ); | |
| }; |
- Problem: The toggle button always announces “Open the header menu,” never updates based on
isPanelOpen, lacksaria-expanded/aria-pressed, and doesn’t reference the controlled panel. - Impact: Screen-reader users cannot tell whether the panel is open or closed or whether activating the control will open or close it.
- Acceptance criteria / fix ideas:
- Update the label text depending on
isPanelOpen(e.g., “Open…” vs “Close…”). - Add
aria-expanded={isPanelOpen}(and optionallyaria-controlspointing to the panel container) or make it a proper toggle witharia-pressed.
- Update the label text depending on
Ovgodd
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status