Conversation
The aria-label prop is passed to the MUI Checkbox root, which forwards it to the ButtonBase span instead of the <input>, so a BBBCheckbox without a visible label has no accessible name. dataTest and the consumer's inputProps reach the <input>, but through inputProps, which is deprecated in MUI and removed in v7. Pass aria-label and data-test through slotProps.input so they land on the <input>, merging any slotProps.input supplied by the consumer (object or function form). MUI does not merge inputProps and slotProps.input (a slotProps.input replaces inputProps entirely), so a consumer's inputProps would be silently dropped; remove it from CheckboxProps instead, turning that into a compile error. Keeping a library-owned inputProps and forwarding it to slotProps.input was discarded to avoid maintaining a second API for the same purpose. BREAKING CHANGE: BBBCheckbox no longer accepts inputProps; use slotProps.input to set attributes on the underlying <input>.
This branch has not been deployed
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.
What does this PR do?
Analogus of #95 for the BBBCheckbox
The aria-label prop is passed to the MUI Checkbox root, which forwards it to the ButtonBase span instead of the , so a BBBCheckbox without a visible label has no accessible name. dataTest and the consumer's inputProps reach the , but through inputProps, which is deprecated in MUI and removed in v7.
Pass aria-label and data-test through slotProps.input so they land on the , merging any slotProps.input supplied by the consumer (object or function form).
MUI does not merge inputProps and slotProps.input (a slotProps.input replaces inputProps entirely), so a consumer's inputProps would be silently dropped; remove it from CheckboxProps instead, turning that into a compile error. Keeping a library-owned inputProps and forwarding it to slotProps.input was discarded to avoid maintaining a second API for the same purpose.
BREAKING CHANGE: BBBCheckbox no longer accepts inputProps; use slotProps.input to set attributes on the underlying .
Closes Issue(s)
Closes none