-
Notifications
You must be signed in to change notification settings - Fork 350
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(DualListSelector): add disabled flag #6442
Conversation
PF4 preview: https://patternfly-react-pr-6442.surge.sh |
@jessiehuff curious if this would also need some accessibility props |
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.
@jcaianirh If isDisabled
is set, I would expect menu items to behave like other disabled menu items (see Dropdown or Menu with disabled items, for example). Looks like those styles are available. See this Core example: https://staging.patternfly.org/v4/components/dual-list-selector/html/#tree-view-with-chosen-and-disabled-options
packages/react-integration/cypress/integration/duallistselectordisabled.spec.ts
Outdated
Show resolved
Hide resolved
@mcarrano utilized core styles for the items. @tlabaj @nicolethoen removed integration tests and demo app entry. |
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. Thanks @jcaianirh !
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.
I'm noticing that with VO, the dual list selector items still seem available through screen reader. I'm thinking that we should add aria-disabled="true"
when the dual list selector is disabled on the <ul>
which will announce all of its contents as disabled as well.
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 other than the comment Jessie left.
@tlabaj @jessiehuff added aria-disabled prop to the ul |
0e7b802
to
e78b3fc
Compare
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! :)
Your changes have been released in:
Thanks for your contribution! 🎉 |
What: Closes #6250
Additional issues:
Added an isDisabled flag to the DualListSelector, and added an example to the examples page with a checkbox to enable/disable the control.
Added unit tests, demo-app entry, and cypress integration test.