vitepress icon indicating copy to clipboard operation
vitepress copied to clipboard

accessibility: interactive controls should not be nested

Open gorlanova opened this issue 1 year ago • 0 comments

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

Screenshot 2024-01-29 at 15 55 59

Validations

gorlanova avatar Jan 29 '24 14:01 gorlanova