Skip to content

Handle form elements when resolving submission attributes - #13137

Open
JinDX wants to merge 2 commits into
whatwg:mainfrom
JinDX:fix/form-self-submission-attributes
Open

JinDX wants to merge 2 commits into
whatwg:mainfrom
JinDX:fix/form-self-submission-attributes

Conversation

@JinDX

@JinDX JinDX commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

Handle the form-self submitter case in the action, method, enctype, no-validate and target lookups. submit(), requestSubmit() with no argument, and implicit submission without a submit button can use the form itself as submitter, but form has no form owner.

For target lookup, use the form only when submitter is the form. For ordinary submit buttons, retain the existing lookup through the submitter's current form owner, including after submission-event mutations. This does not redefine the latter edge case.

Suggested coverage: form.submit(), requestSubmit() without an argument, implicit submission, submission attributes, and reassociation of a submit button during submit/formdata.

Spec: https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-submission-algorithm

  • At least two implementers are interested (and none opposed):
    • …
    • …
  • Tests are written and can be reviewed and commented upon at:
    • …
  • Implementation bugs are filed:
    • Chromium: …
    • Gecko: …
    • WebKit: …
    • Deno (only for timers, structured clone, base64 utils, channel messaging, module resolution, web workers, and web storage): …
    • Node.js (only for timers, structured clone, base64 utils, channel messaging, and module resolution): …
  • Corresponding HTML AAM & ARIA in HTML issues & PRs:
  • MDN issue is filed: …
  • The top of this comment includes a clear commit message to use.

(See WHATWG Working Mode: Changes for more details.)


/form-control-infrastructure.html ( diff )

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

Labels

None yet

1 participant