← Back to release summary

Allow input in select in HTML parser

Category
DOM
Type
New or changed feature
Status
Proposed (Chrome Proposed)
Intent stage
None

WPT details: https://wpt.fyi/results/html/semantics/forms/the-select-element/customizable-select/select-input-parsing.tentative.html

Summary

The HTML parser currently has a behavior where parsing an input tag will close any open ancestor select tag, preventing input elements from being used inside select elements. This is blocking us from working on the filterable select feature, which needs support for nesting input elements inside select. Some sites have accidentally relied on this parser behavior, so I have done outreach to migrate sites by adding the missing select end tag, which is a very simple fix. Existing usage can be seen in these two use counters: https://chromestatus.com/metrics/feature/timeline/popularity/5546 https://chromestatus.com/metrics/feature/timeline/popularity/5547

Motivation

After spending a fair amount of time considering alternatives like using an attribute on the select element or making the input and select elements be siblings, we decided that it would still be best to change the parser and allow nesting input in select.

Standards & signals

Ecosystem

View on chromestatus.com