Skip to content

Instantly share code, notes, and snippets.

View Kaleidea's full-sized avatar

Kaleidea

View GitHub Profile
@Kaleidea
Kaleidea / 0000-search-element-patch-blink.md
Last active November 10, 2021 07:43
<search> element with <form> functionality - draft implementation patch for Chromium Blink
@Kaleidea
Kaleidea / search-element-specification.md
Created November 9, 2021 14:43
<search> element specification draft with <form> functionality

Specification draft

Categories:

  • Flow content.
  • Palpable content.

Contexts in which this element can be used:

  • Where flow content is expected, but not within another search or form element.

Content model:

  • Flow content, but with no search or form element descendants.

Tag omission in text/html:

@Kaleidea
Kaleidea / search-element-alternatives.md
Created November 9, 2021 16:06
<search> element alternatives

Alternatives

Should the implementation of a hybrid element as defined above fall through, an alternative is to define 2 elements (<search> and <searchform>) for the 2 use-cases:

  • <search> === <div role=search>
  • <searchform action="..."> === <form role=search action="...">

Implementing this is trivial by aliasing HTMLElement -> <search> and <form> -> <searchform>. Corner cases of nesting need no consideration, and the specification is a trivial "Uses HTMLFormElement, as defined for form elements". The trade-off is that two instead of one element specifications are added.

Should 2 elements find opposition, the proposal would be to favor the best practice:

@Kaleidea
Kaleidea / search-element-migration.md
Created November 10, 2021 00:24
<search> element migration guide with <form> functionality

How to migrate current application of role=search

Simple cases

  • <div role=search> -> <search>
  • <form role=search> -> <search action="">
  • <form role=search action="..."> -> <search action="...">

Nesting

  • ... -> ...
@Kaleidea
Kaleidea / search-element-div-functionality.md
Last active February 6, 2022 00:45
<search> element with <div> functionality

Div functionality

This solution satisfies the original use-case defined as "people who don't want form behavior": <search> without the action attribute behaves as <div role=search>, the same as the original proposal.

Breakdown of individual form features:

  • Form submission is disabled if the action attribute is unspecified.
  • Autocomplete is not affected (it is already enabled by default for <input type=search>).
  • There is no form validation unless the developer explicitly sets it up.
  • There is no reset button unless the developer adds one.
  • `` is registered in document.forms, this has no effect unless the developer iterates `forms`, in which case this is expected.
@Kaleidea
Kaleidea / search-element-coc-complaint.md
Last active December 2, 2021 01:46
Appeal to the WHATWG Steering Group about discourtesy and a non-inclusive standardization process for the proposed `<search>` element

Dear Steering Group members,

I'd like to raise concerns regarding my experience recently contributing to the ongoing standardization of the search element. I'm facing serious communication difficulties, misunderstandings and disrespectful comments. I'd like to ask for your attention and independent input to steer this discussion towards mutual understanding and an outcome that's inclusive to differing perspectives and practices.

The issue

There is a disagreement about the viability of extending the form element. To prove my point I've implemented the form-based search element: 29 lines changed for the key features, proving its viability and low implementation cost.

This input is not welcome, deliberations about it are not reciprocated. We are discussing incompatible concepts (reuse vs. duplication) and despite my attempts to clear up this misunderstanding, my reasoning is not

@Kaleidea
Kaleidea / search-element-request.md
Created November 10, 2021 09:53
<search> element request with <form> functionality

Consider making the HTML <search> element an alias for <form> when the action attribute is specified

This proposal presents a novel approach to implementing the <search> element with improved API ergonomy and featuring the best practice usage for the little cost of 29 lines of code changed in Chromium Blink (draft, without tests). This implementation disproves the prior assumption that aliasing the <form> element raises huge implementation costs, which assumption was the reason to oppose this feature.

Contents:

  1. Motivation
  2. Feature definition
  3. Best practice
@Kaleidea
Kaleidea / search-element-coc-complaint-2.md
Created November 13, 2021 06:17
Report of code of conduct violations by a WHATWG member

Dear Steering Group members,

Please confirm whether this and the previous complaint was received upon receiving this email.

The previously reported pattern of policy and code of conduct violations has continued, despite a complaint to the person at fault. This is very unfortunate and I deeply regret that a prominent member of the WHATWG has to be reported. Please take immediate action to restore a safe environment and to prevent damage to the WHATWG's image as an open, safe, welcoming and professional environment.

"Whether you're a regular contributor or a newcomer, we care about making this community a safe place for you and we've got your back."

@Kaleidea
Kaleidea / search-element-response-to-inappropriate-remarks.md
Last active December 18, 2021 23:53
Response to inappropriate remarks in the <search> element standardization process

This is a detailed response to the code of conduct violating remarks in the <search> element standardization process: previous, last (archive).

Non-technical discussion should be kept to a minimium on the issue tracker. If you wish to respond, please do so here in the comments.

Detailed and polite reasoning preceded the problematic comments:

@Kaleidea
Kaleidea / search-element-implementation.md
Last active December 6, 2021 23:10
<search> element implementation draft with form functionality

Implementation details

Implementations:

  • Chromium (prototype, commits on GitHub)
  • WebKit (proof-of-concept, commits on GitHub)
  • Firefox in progress (commits in Mercurial)