Skip to content

Checkbox in label is technically invalid #1138

@samgreen-spp

Description

@samgreen-spp

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions