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

Column header menu button aria-labels should be descriptive and unique #16454

Open
dil-pvajda opened this issue Feb 4, 2025 · 0 comments
Open
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: pro standard Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla/

Comments

@dil-pvajda
Copy link

dil-pvajda commented Feb 4, 2025

Steps to reproduce

Steps:

  1. Open any MUI DataGrid example, eg.: https://mui.com/x/react-data-grid/column-definition/
  2. Inspect the menu button inside column headers with DevTools

Current behavior

  • All the menu buttons have identical labels, "Menu", which makes them hard to tell apart from each other.
  • Because of aria-haspopup, the menu button will be announced to a screen reader user as "Menu menu button", which is inappropriate.
  • Screen reader users will be unable to determine the purpose of these buttons

Expected behavior

Ideally we'd be able to customize the label that is used for each column, possibly adding the name of the column and more descriptive text about the purpose of the button.

The default localization of the component should probably be revisited to resolve the underlying issue.

Context

We're in an accessibility audit with our design system and we cannot resolve these issues.
Originally identified by Level Access.

Your environment

npx @mui/envinfo
  System:
    OS: macOS 15.3
  Binaries:
    Node: 20.18.0 - ~/.local/share/nvm/v20.18.0/bin/node
    npm: 10.8.2 - ~/.local/share/nvm/v20.18.0/bin/npm
    pnpm: 10.1.0 - /opt/homebrew/bin/pnpm
  Browsers:
    Chrome: Not Found
    Edge: Not Found
    Safari: 18.3
  npmPackages:
    @emotion/react: 11.13.5 => 11.13.5 
    @mui/icons-material: ^6.1.9 => 6.1.9 
    @mui/lab: 6.0.0-beta.25 => 6.0.0-beta.25 
    @mui/material: ^6.4.2 => 6.4.2 
    @mui/system: ^6.4.2 => 6.4.2 
    @mui/utils: ^6.4.2 => 6.4.2 
    @mui/x-data-grid-pro: ^7.25.0 => 7.25.0 
    @mui/x-date-pickers: ^7.25.0 => 7.25.0 
    @mui/x-date-pickers-pro: ^7.25.0 => 7.25.0 
    @types/react: ^18.2.51 => 18.3.12 
    react: ^18.2.0 => 18.3.1 
    react-dom: ^18.2.0 => 18.3.1 
    typescript: ^4.8.4 => 4.9.5 

Search keywords: accessibility, a11y, column header, menu button

Order ID: 75534

@dil-pvajda dil-pvajda added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Feb 4, 2025
@github-actions github-actions bot added component: data grid This is the name of the generic UI component, not the React module! support: pro standard Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla/ labels Feb 4, 2025
@dil-pvajda dil-pvajda changed the title Column header menu button aria-labels should descriptive and unique Column header menu button aria-labels should be descriptive and unique Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: pro standard Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla/
Projects
None yet
Development

No branches or pull requests

1 participant