Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs-infra] Demo toolbar buttons can't be accessed via keyboard #42083

Open
1 task done
zanivan opened this issue May 1, 2024 · 2 comments
Open
1 task done

[docs-infra] Demo toolbar buttons can't be accessed via keyboard #42083

zanivan opened this issue May 1, 2024 · 2 comments
Assignees
Labels
accessibility a11y bug 🐛 Something doesn't work regression A bug, but worse scope: docs-infra Specific to the docs-infra product

Comments

@zanivan
Copy link
Contributor

zanivan commented May 1, 2024

Search keywords

demo toolbar

Latest version

  • I have tested the latest version

Steps to reproduce

Steps:

  1. Go to any doc's page with a demo container
  2. Try to navigate using only the keyboard

Current behavior

Screen.Recording.2024-05-01.at.09.45.27.mov

Expected behavior

The toolbar needs to be accessible for keyboard users. Right now, if you're only using a keyboard, you can't expand, reset, or edit any demos. This is essential for ensuring all users can fully interact with the toolbar's features.

Your environment

npx @mui/envinfo
System:
    OS: macOS 14.3
    CPU: (10) arm64 Apple M1 Pro
    Memory: 125.86 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 16.20.2 - ~/.nvm/versions/node/v16.20.2/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 8.19.4 - ~/.nvm/versions/node/v16.20.2/bin/npm
    pnpm: 8.14.0 - /usr/local/bin/pnpm
  Managers:
    Homebrew: 4.0.18 - /opt/homebrew/bin/brew
    pip3: 21.2.4 - /usr/bin/pip3
    RubyGems: 3.0.3.1 - /usr/bin/gem
  Utilities:
    Make: 3.81 - /usr/bin/make
    GCC: 15.0.0 - /usr/bin/gcc
    Git: 2.40.1 - /opt/homebrew/bin/git
    Clang: 15.0.0 - /usr/bin/clang
    Curl: 8.4.0 - /usr/bin/curl
  Servers:
    Apache: 2.4.56 - /usr/sbin/apachectl
  IDEs:
    VSCode: 1.86.0 - /usr/local/bin/code
    Vim: 9.0 - /usr/bin/vim
    Xcode: /undefined - /usr/bin/xcodebuild
  Languages:
    Bash: 3.2.57 - /bin/bash
    Perl: 5.30.3 - /usr/bin/perl
    Python3: 3.9.6 - /usr/bin/python3
    Ruby: 2.6.10 - /usr/bin/ruby
  Databases:
    SQLite: 3.43.2 - /usr/bin/sqlite3
  Browsers:
    Chrome: 124.0.6367.93
    Safari: 17.3
  Monorepos:
    Lerna: 8.1.2

Search keywords: demo toolbar

@zanivan zanivan added docs Improvements or additions to the documentation accessibility a11y labels May 1, 2024
@danilo-leal danilo-leal changed the title [docs] Demo toolbars can't be used with keyboard navigation [docs-infra] Demo toolbar buttons can't be accessed via keyboard May 1, 2024
@danilo-leal danilo-leal added scope: docs-infra Specific to the docs-infra product and removed docs Improvements or additions to the documentation labels May 1, 2024
@danilo-leal danilo-leal self-assigned this May 1, 2024
@danilo-leal
Copy link
Contributor

I have a hunch the problem could be living here:

tabIndex: index === activeControlIndex ? 0 : -1,

Changing this line to tabIndex: index === activeControlIndex && 0 fixes the problem, but I'm unsure whether that has unintended consequences because the concept of an "active" control in the context of the toolbar buttons is a bit blurry to me. I think all of these buttons, as Victor states, should indeed be focusable. @alexfauquette + @bharatkashyap + @siriwatknp any insights? 😬

@oliviertassinari
Copy link
Member

oliviertassinari commented May 1, 2024

This was broken in #37319.

Off-topic. Maybe an issue to create from #37319 (comment), it's annoying to have this crop into the docs when opening the dev tools. We could fix this with Next.js App Router, I guess.

@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work regression A bug, but worse labels May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility a11y bug 🐛 Something doesn't work regression A bug, but worse scope: docs-infra Specific to the docs-infra product
Projects
Status: Backlog
Development

No branches or pull requests

3 participants