[WICG/webcomponents] Does form association need to be per-class, or could it be per-instance? (Issue #1025)

In investigating [an issue with the scoped custom element registry polyfill](https://github.com/webcomponents/polyfills/issues/547) - where we need to provide `customElements.define()` with a single value for `formAssociated` for potentially many different element definitions - I had the question of why form-association is a class-level concern rather than an instance-level concern.

With ElementInternals, could we not have a `.formAssociated` property?

One reason to not just always make an element form-associated if any of its instances _might_ be form-associated is that form-association changes the behavior of the element in some significant ways. In the above issue it's that a form-associated element can't be disabled and focused as the same time, while a non-form-associated element can (more accurately, the `disabled` attribute has no default effect).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/1025
You are receiving this because you are subscribed to this thread.

Message ID: <WICG/webcomponents/issues/1025@github.com>

Received on Thursday, 17 August 2023 18:53:07 UTC