rebassjs / rebass

:atom_symbol: React primitive UI components built with styled-system.
https://rebassjs.org
MIT License
7.94k stars 658 forks source link

Checkbox in label is technically invalid #1138

Open samgreen-spp opened 2 years ago

samgreen-spp commented 2 years ago

label elements should only contain phrasing content, which does not include div elements. The checkbox example is technically invalid for this reason since the Checkbox component is wrapped in a Box which defaults to a div. Would it be possible to provide a prop to change the type of tag that is used for this container element? For example, being able to set it to be a span

Screen Shot 2021-11-29 at 9 32 46 am

This guideline is defined in the following spec

Thanks for the awesome library :)

shikhar13012001 commented 1 year ago

Hey @samgreen-spp , I would like to work on this issue can you please assign this to me?