Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search element specification with form functionality #7382

Closed
wants to merge 26 commits into from

Conversation

Kaleidea
Copy link

@Kaleidea Kaleidea commented Dec 1, 2021

Credit for the explainer and examples goes to @scottaohara, only minor adjustments were made.

Proposal

  1. Design
  2. Motivation

Implementations (proof-of-concept)

Specification (generated)

Specification source

Design decisions

  • <search> is implemented by HTMLFormElement.
  • If the action attribute is not set then form submission is disabled (method=dialog still closes an ancestor dialog).
  • Empty action="" attribute is valid - contrary to <form> -, behaves as if action is unset on a <form>: submits to the document's base URL.
  • The parser treats <search> as a <form>: nesting of <search> and <form> is invalid in any combination. Invalid DOM with nesting can still be constructed with JS, behaves as nested forms do.
  • <search> cannot be a shadow root: .attachShadow() is not allowed (like <form>, but unlike <div>). (MDN)

Prerequisites

  • At least two implementers are interested (and none opposed):
    • TODO: Seeking contact.
  • Tests are written and can be reviewed and commented upon at:
    • TODO: Awaiting feedback for the proof-of-concept implementations.
  • Implementation bugs are filed:
    • Chrome: TODO
    • Firefox: TODO
    • Safari: TODO

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


/acknowledgements.html ( diff )
/common-dom-interfaces.html ( diff )
/custom-elements.html ( diff )
/dom.html ( diff )
/form-control-infrastructure.html ( diff )
/form-elements.html ( diff )
/forms.html ( diff )
/index.html ( diff )
/indices.html ( diff )
/infrastructure.html ( diff )
/input.html ( diff )
/interaction.html ( diff )
/interactive-elements.html ( diff )
/links.html ( diff )
/obsolete.html ( diff )
/parsing.html ( diff )
/rendering.html ( diff )
/semantics-other.html ( diff )
/semantics.html ( diff )
/syntax.html ( diff )
/window-object.html ( diff )

Changes:

<span><code>form</code> element pointer</span>
->
<span><code data-x="">form</code> element pointer</span>
…ta-x=""`)

Changes:

<span><code data-x="form">form</code> element pointer</span>
->
<span><code data-x="">form</code> element pointer</span>
Changes:

<code>form</code> elements
->
<span data-x="concept-form">forms</span>

the <code>form</code> element
->
<span data-x="concept-form">forms</span>
Changes:

<code>form</code> element
->
<span data-x="concept-form">form</span>
Changes:

<code>form</code> element
->
<span data-x="concept-form">form</span>

<code>form</code> elements
->
<span data-x="concept-form">forms</span>
Changes:

<code>form</code> element <var>form</var>
->
<span data-x="concept-form">form</span> <var>form</var>
Changes:

<code>form</code> element
->
<span>form owner</span>
Changes:

<code>form</code>
->
<span data-x="concept-form">form</span>
Changes:

<code>form</code> element
->
<span data-x="concept-form">form</span> (<codeform</code> or <code>search</code> element)
Changes:

<code>form</code>,
->
<code>form</code>, <code>search</code>,

, or <code>form</code>
->
<code>form</code>, or <code>search</code>
Changes:

and <code>form</code>
->
<code>form</code>, and <code>search</code>

<code>form</code>
->
<code>form</code> and <code>search</code>
Changes:

<code>form</code> elements
->
<span data-x="concept-form">forms</span> (<code>form</code> or <code>search</code> elements)
…ustom elements" section

In this section form refers to either a `form` or a `search` element.
In this section form refers to either a `form` or a `search` element.
…bsections

In this section form refers to either a `form` or a `search` element.
Changes:

Any form starts with a <code>form</code> element
->
Any <span data-x="concept-form">form</span> starts with a <code>form</code> or <code>search</code> element

expected
->
expected, but not as a descendant of another <code>form</code> or <code>search</code> element.

<code>form</code> element
->
<code>form</code> or <code>search</code> element

<code>form</code> elements
->
<code>form</code> and <code>search</code> elements
Defines:
- attr-search-action

Amends:
- attr-fs-action
- attr-fs-formaction
Defines:
- attr-aria-role-search

Credit for the explainer and examples:
@scottaohara
@annevk
Copy link
Member

annevk commented Dec 2, 2021

As discussed in whatwg/sg#93 it's currently not possible to accept pseudonymous contributions. The SG is looking into this, but I suspect it will take quite a while before that has meaningfully progressed.

@Kaleidea
Copy link
Author

Kaleidea commented Dec 2, 2021

As discussed in whatwg/sg#93 it's currently not possible to accept pseudonymous contributions. The SG is looking into this, but I suspect it will take quite a while before that has meaningfully progressed.

Thank you for the reminder, not a problem at this stage. It seems there is a solution: what was necessary for you to approve PhistucK 2 years ago? whatwg/participant-data@9056efb
Let's discuss this on whatwg/sg#93 (comment).

@josepharhar
Copy link
Contributor

It sounds like whatwg/sg#93 didn't go so well...
@Kaleidea are you still interested in working on this?
Should me or someone else pick up the work on this?

@domenic
Copy link
Member

domenic commented Aug 8, 2023

This proposal was rejected; the search element that landed in the spec was instead https://html.spec.whatwg.org/#the-search-element. Thanks for the reminder to close this PR.

@domenic domenic closed this Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants