-
Notifications
You must be signed in to change notification settings - Fork 96
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(checkbox): add pf-checkbox #2608
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 3634aad The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for patternfly-elements ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@nikkimk any usability concerns here? |
@nikkimk ptal when you get a minute |
} | ||
|
||
override willUpdate() { | ||
this.#internals.setFormValue(this.checked ? this.value : null); |
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.
Screenreader is not picking up when checkbox is disabled.
@@ -0,0 +1,10 @@ | |||
<pf-checkbox label="Required" required></pf-checkbox> |
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.
Showing as valid for me when I uncheck it.
@input="${this.#onChange}" | ||
.disabled="${disabled}" | ||
.checked="${checked}" | ||
.indeterminate="${indeterminate}"> |
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.
Needs an aria-checked
value of mixed
if indeterminate.
If nested checkboxes, it would need an aria-controls
with space-separated IDrefs for each nested checkbox. Not sure how we'll do this without cross-root ARIA unless the component's internals is capturing the IDRefs of the slotted checkboxes.
See https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/examples/checkbox-mixed/#rps_label
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.
in that case let's defer checkbox until after 3.0, along with listbox
.to.be.an.instanceOf(PfCheckbox); | ||
}); | ||
}); | ||
}); |
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.
Will there be more tests for accessibility, nesting and validation here?
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.
would like your help to write them based on your insightful feedback above
What I did
Testing Instructions
Notes to Reviewers