Repository navigation
Conversation
Inside a CheckboxGroup, useCheckboxAria was defaulting validationBehavior to 'native', which overrode the group's setting (e.g. "aria") because useCheckboxGroupItem only falls back when the value is undefined. Leave validationBehavior undefined when group state is present so the group-level setting is inherited. Fixes adobe#10856.
nwidynski
reviewed
Oct 27, 2026
Comment on lines
+349
to
+351
| // Regression for #10856: a group-level aria validationBehavior must reach | ||
| // each checkbox. With the buggy 'native' default on useCheckboxAria, the | ||
| // checkbox keeps required and form.checkValidity() blocks submit. |
Contributor
|
Otherwise LGTM |
yihuiliao
reviewed
Oct 27, 2026
| // Standalone checkboxes default to native validation. Inside a CheckboxGroup, | ||
| // leave validationBehavior undefined so useCheckboxGroupItem inherits the | ||
| // group's setting (e.g. validationBehavior="aria" on the group). | ||
| let validationBehavior = |
Member
There was a problem hiding this comment.
Generally I think this seems okay but let's say you have a CheckboxGroup with validationBehavior='aria' inside a RAC Form, the formValidationBehavior will take precedence and by default, it always sets validationBehavior to native.
The test pass because it's inside a <form> but if you were to use RAC <Form>, it would fail.
I think the check should be something like this
let validationBehavior =
props.validationBehavior ??
(groupState ? undefined : (formValidationBehavior ?? 'native'));
snowystinger
reviewed
Nov 3, 2026
…lidation-behavior
…lidation-behavior
yihuiliao
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Inside a
CheckboxGroup,useCheckboxAriawas defaultingvalidationBehaviorto'native'. That overrode a group-level setting such asvalidationBehavior="aria", becauseuseCheckboxGroupItemonly inherits the group's value when the checkbox leavesvalidationBehaviorundefined.Fix
When checkbox group state is present, leave
validationBehaviorundefined unless the checkbox (or form context) sets it explicitly, so the group setting is inherited.Test plan
validationBehavior="aria"+isRequired→ checkbox has norequiredattr andform.checkValidity()is trueFixes #10856