Skip to content

[Textbox] Label not associated with input via htmlFor #54

Description

@olegpolyakov

Component

Textbox

Problem

Label element is not associated with the input control via htmlFor.

Suggested Fix

const id = useId();

<label htmlFor={id} className={styles.label}>
    {label}
</label>

// Pass id to control via children

Impact

Clicking label doesn't focus input

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions