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

feat(checkbox): add pf-checkbox #2608

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

feat(checkbox): add pf-checkbox #2608

wants to merge 8 commits into from

Conversation

bennypowers
Copy link
Member

What I did

  1. add pf-checkbox

Testing Instructions

Notes to Reviewers

  1. still needs docs, changeset, jsdoc

@changeset-bot
Copy link

changeset-bot bot commented Oct 18, 2023

🦋 Changeset detected

Latest commit: 3634aad

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@patternfly/elements Minor

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

@github-actions github-actions bot added demo Updating demo pages doc functionality Functionality, typically pertaining to the JavaScript. styles An issue or PR pertaining only to CSS/Sass work in progress POC / Not ready for review tests Related to testing labels Oct 18, 2023
@github-actions github-actions bot added this to In progress in Workflow Oct 18, 2023
@netlify
Copy link

netlify bot commented Oct 18, 2023

Deploy Preview for patternfly-elements ready!

Name Link
🔨 Latest commit ccb472a
😎 Deploy Preview https://deploy-preview-2608--patternfly-elements.netlify.app/

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions github-actions bot added the AT passed Automated testing has passed label Oct 18, 2023
@bennypowers bennypowers marked this pull request as ready for review October 18, 2023 13:39
@bennypowers
Copy link
Member Author

@nikkimk any usability concerns here?

@bennypowers bennypowers linked an issue Oct 20, 2023 that may be closed by this pull request
@bennypowers
Copy link
Member Author

@nikkimk ptal when you get a minute

}

override willUpdate() {
this.#internals.setFormValue(this.checked ? this.value : null);
Copy link
Collaborator

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>
Copy link
Collaborator

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}">
Copy link
Collaborator

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

Copy link
Member Author

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);
});
});
});
Copy link
Collaborator

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?

Copy link
Member Author

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

Workflow automation moved this from In progress to Ready: code & design review Oct 31, 2023
@bennypowers bennypowers marked this pull request as draft April 12, 2024 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AT passed Automated testing has passed demo Updating demo pages doc functionality Functionality, typically pertaining to the JavaScript. styles An issue or PR pertaining only to CSS/Sass tests Related to testing work in progress POC / Not ready for review
Projects
Workflow
Ready: code & design review
Development

Successfully merging this pull request may close these issues.

[1:1]: pf-checkbox
3 participants