-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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][material-ui] Missing aria-multiselectable attribute on multiple Select component #38855
Conversation
Co-authored-by: AsiwajuDev <[email protected]>
Netlify deploy previewhttps://deploy-preview-38855--material-ui.netlify.app/ Bundle size reportDetails of bundle changes (Toolpad) |
@mj12albert this PR is ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also add a simple test (I suppose here) to check for this ~
Co-authored-by: AsiwajuDev <[email protected]>
Co-authored-by: AsiwajuDev <[email protected]>
Co-authored-by: AsiwajuDev <[email protected]>
@mj12albert the test has been added, thanks for the review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good ~ 🙆♂️
…ple Select component (mui#38855) Co-authored-by: AsiwajuDev <[email protected]>
Description
Missing aria-multiselectable attribute on multiple Select component
Steps to reproduce 🕹
Link to live example: https://codesandbox.io/s/nhnkzh?file=/Demo.tsx Steps:
doesn't have the aria-multiselectable attribute set to true
Steps with JAWS screen reader:
Current behavior 😯
The Select component is missing the aria-multiselectable attribute when using the multiple prop. Screen readers read the Select listbox as a standard listbox.
Expected behavior 🤔
If the listbox supports selection of more than one option, the element with role listbox has aria-multiselectable set to true. Otherwise, aria-multiselectable is either set to false or the default value of false is implied.
(Source)
With this attribute set to true - the JAWS screen reader will read the Select as "extended selection list box".
As stated on MDN Web Docs "The aria-multiselectable attribute is the way to inform assistive technology users that they may select more than one item from the current selectable items if they so choose."
Reference to JAWS documentation "Multiple Selection List Boxes": https://www.freedomscientific.com/SurfsUp/Forms.htm
See Example 2 Multi-Select Listbox on w3.org: https://www.w3.org/WAI/ARIA/apg/patterns/listbox/examples/listbox-rearrangeable/
Code example of working model: https://codepen.io/pen?&prefill_data_id=63e06758-0048-4774-a720-87cddb15147e
Context 🔦
When a screen reader user interacts with the Select component they are not informed that multiple options can be selected if the Select is using the multiple prop.
closes #38631
This code was written and reviewed by GitStart Community. Growing great engineers, one PR at a time.