Skip to content

Allow custom-elements to be a labelable element without being form-associated. #11584

@lukewarlow

Description

@lukewarlow

What is the issue with the HTML Standard?

Currently a custom element can opt-in to be a fully form-associated element via static formAssociated = true;, this comes with a few different bits of functionality. Firstly it makes the element labelable, but it also makes it so stuff like adding the disabled and readonly attributes have an effect. For example, pseudo-classes such as :disabled, :enabled, and :valid all match.

Some built-in elements are labelable but are not form associated, namely <progress> and <meter>. Should we expose this to custom-elements so they can get the labelable behaviour without the rest, to better match certain built-ins?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions