vitepress
vitepress copied to clipboard
accessibility: interactive controls should not be nested
Describe the bug
in the collapsible navigation sidebar, group header interactive controls are nested, this is inaccessible for some accessibility tools as the nested button will not always be announced
Reproduction
set a collapsible nav in the sidebar inspect the tree : the nav group header is "tabindex = 0" and contains a button
Expected behavior
either the header should not have a tabindex, or the header button should simply be an icon (no need for two buttons doing the same thing ?)
System Info
System:
OS: macOS 14.2.1
CPU: (8) arm64 Apple M2
Memory: 393.92 MB / 24.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.10.0 - /usr/local/bin/node
Yarn: 1.22.19 - /opt/homebrew/bin/yarn
npm: 10.2.5 - /usr/local/bin/npm
pnpm: 8.9.2 - /opt/homebrew/bin/pnpm
Browsers:
Safari: 17.2.1
npmPackages:
vitepress: ^1.0.0-rc.31 => 1.0.0-rc.35
Additional context
Validations
- [X] Check if you're on the latest VitePress version.
- [X] Follow our Code of Conduct
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.