-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(multiselect): allow disabled listbox items #9859
feat(multiselect): allow disabled listbox items #9859
Conversation
✔️ Deploy Preview for carbon-react-next ready! 🔨 Explore the source changes: 390a87e 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-react-next/deploys/6170792887e7d200080752db 😎 Browse the preview: https://deploy-preview-9859--carbon-react-next.netlify.app |
A few notes regarding the accessibility of this:
Overall I think we're within bounds accessibility-wise. @dakahn @mbgower definitely would appreciate any critique you might have of my thinking here! |
✔️ Deploy Preview for carbon-elements ready! 🔨 Explore the source changes: 390a87e 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-elements/deploys/6170792864c33100070e6059 😎 Browse the preview: https://deploy-preview-9859--carbon-elements.netlify.app |
✔️ Deploy Preview for carbon-components-react ready! 🔨 Explore the source changes: 390a87e 🔍 Inspect the deploy log: https://app.netlify.com/sites/carbon-components-react/deploys/61707928c6b085000833afcc 😎 Browse the preview: https://deploy-preview-9859--carbon-components-react.netlify.app |
Yep downshift does its job when it comes to disabled. Nice! I'd actually recommend |
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.
Totally agree with keeping the disabled item focusable -- good call there. Looks good 👍🏾
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.
The disabled text and icon should be color token $disabled-02, not -03.
@laurenmrice thanks for catching that! Just updated it. |
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.
lgtm!
Closes #9610
Refs #6477
Modifies MultiSelect to pass through the
disabled
option on items to downshift. Adds new styles to properly display disabled items.Changelog
New
Changed
disabled
option for listbox itemsTesting / Reviewing
carbon-components-react
storybook default MultiSelect story. The third option in the listbox should have thedisabled
attribute and appear disabled.carbon-react-next
storybook default MultiSelect story. The third option in the listbox should have thedisabled
attribute and appear disabled.