Skip to content

Form-Associated Custom Elements #203

Closed

Description

@Westbrook

Description

The form-associated custom elements APIs enable custom elements to participate in form submission and validation lifecycles.

This agreed upon spec is not fully delivered cross browser. Following the Web Platform Test link below, you will find the it is currently missing in Safari and suffers from a number of failures in Firefox.

Rationale

  • Enable custom elements to participate in form submission by adding a value to the FormData object, adding to the HTMLFormElement.prototype.elements object and in other submission formats.
  • Enables custom elements to participate in the form validation lifecycle by providing APIs similar to and building on top of the constraint validation APIs.

Specification

https://html.spec.whatwg.org/multipage/custom-elements.html#form-associated-custom-elements

Tests

https://github.com/web-platform-tests/wpt/tree/master/custom-elements/form-associated

Activity

  1. moved this to Proposed in Interop 2023on Oct 12, 2022
  2. karlcow commented on Oct 13, 2022

    @karlcow
  3. hsinyi commented on Nov 1, 2022

    @hsinyi

    Based on the discussion with @jcsteh , we'd like to exclude the ones tested with ARIA idref attributes under https://wpt.fyi/results/custom-elements/form-associated/ElementInternals-accessibility.html

    We are interested in keeping the non-idref part in the scope. However, there appear to be open spec issues for this part :
    w3c/aria#1110
    w3c/aria#1239

    How likely is it that we can get consensus on the spec issues before the start of the Interop period?

  4. josepharhar commented on Nov 1, 2022

    @josepharhar

    I am happy to drop ElementInternals-accessibility.html or separate subtests of it if needed. I don't have context on those aria issues and I don't know how likely they are to be resolved before the start of the interop period.

  5. domenic commented on Nov 8, 2022

    @domenic
    Member

    Based on the discussion with @jcsteh , we'd like to exclude the ones tested with ARIA idref attributes under https://wpt.fyi/results/custom-elements/form-associated/ElementInternals-accessibility.html

    Honestly this test seems to be in the wrong directory. It is not related to form-associated custom elements and should be in the parent directory.

  6. josepharhar commented on Nov 8, 2022

    @josepharhar

    Honestly this test seems to be in the wrong directory. It is not related to form-associated custom elements and should be in the parent directory.

    Sound good to me, I created a PR to do it: web-platform-tests/wpt#36875

  7. foolip commented on Nov 11, 2022

    @foolip
    Member

    In the MDN short survey on APIs & JavaScript, "Web Components (custom elements, Shadow DOM, etc.)" was the most popular choice by a fairly wide margin, selected by ~39% of survey takers.

    Web Components was split into many granular proposals, and the survey results don't tell us which aspects web developers want the most, but it's fair to say that something about Web Components is important. (I'm posting this comment on each of the split proposals.)

  8. added
    accepted
    on Feb 1, 2023
  9. nairnandu commented on Feb 1, 2023

    @nairnandu
    Contributor

    Thank you for proposing Form-Associated Custom Elements for inclusion in Interop 2023.

    We are pleased to let you know that this proposal was accepted as part of the Web Components focus area. You can follow the progress of this Focus Area on the Interop 2023 dashboard.

    For an overview of our process, see the proposal selection summary. Thank you for contributing to Interop 2023!

    Posted on behalf of the Interop team.

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

    acceptedfocus-area-proposal

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions