carbon
carbon copied to clipboard
feat(drawer): add sidebarAriaLabel prop
Proposed behaviour
- Remove landmark "navigation" role from sidebar content section and changes parent element to
- When
title
is provided, it is set as the sidebar's accessible name. - Adds 'sidebarAriaLabel' prop to provide an accessible name when no title is provided.
Current behaviour
Sidebar content section has role or "navigation" but no accessible name, this creates a risk of axe issues due to non-unique landmarks.
Checklist
- [x] Commits follow our style guide
- [ ] Related issues linked in commit messages if required
- [ ] Screenshots are included in the PR if useful
- [ ] All themes are supported if required
- [x] Unit tests added or updated if required
- [ ] Playwright automation tests added or updated if required
- [x] Storybook added or updated if required
- [ ] Translations added or updated (including creating or amending translation keys table in storybook) if required
- [ ] Typescript
d.ts
file added or updated if required - [ ] Related docs have been updated if required
QA
- [ ] Tested in provided StackBlitz sandbox/Storybook
- [ ] Add new Playwright test coverage if required
- [ ] Carbon implementation matches Design System/designs
- [ ] UI Tests GitHub check reviewed if required