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

[Select][base] Add attributes to conform with ARIA 1.2 #35182

Merged
merged 4 commits into from Nov 18, 2022

Conversation

michaldudak
Copy link
Member

Adds the role=combobox and aria-controls attributes to the unstyled select and multi-select (implemented in the useSelect hook), as required in WAI-ARIA 1.2 (https://www.w3.org/TR/wai-aria-1.2/#combobox).

@siriwatknp This change affected the Joy's Select tests, as the component has a different role now (combobox instead of button).

Side note:
I'm amazed by how good the GitHub copilot is. All the tests in SelectUnstyled.test.tsx were generated by it and required only minor changes.

@michaldudak michaldudak added accessibility a11y component: select This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base labels Nov 17, 2022
@mui-bot
Copy link

mui-bot commented Nov 17, 2022

Messages
📖 Netlify deploy preview: https://deploy-preview-35182--material-ui.netlify.app/

Details of bundle changes

Generated by 🚫 dangerJS against 42160ca

Copy link
Member

@siriwatknp siriwatknp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM

@michaldudak michaldudak merged commit d59f395 into mui:master Nov 18, 2022
@michaldudak michaldudak deleted the select-unstyled-a11y branch November 18, 2022 13:46
daniel-rabe pushed a commit to daniel-rabe/material-ui that referenced this pull request Nov 29, 2022
feliperli pushed a commit to jesrodri/material-ui that referenced this pull request Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility a11y component: select This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants