#1264: Incubation: Filterable select
Discussions
Log in to see TAG-private discussions.
Discussed
Aug 31, 2026 (See Github)
Dan: No comment yet, but have been looking over the issues. There are 3 options given in the explainer, think they are asking for info from us. The nicest option (B) involves the options being within the element, but this may not work from a webcompat perspective (may break the parser). Option A involves hooking things up with IDs (referencetarget may be needed for shadow DOM). Makes sense but needs more tags. Option C involves an attribute you add to the <select> which magically adds the required elements, but then would require pseudo elements for the styling. Not keen on it due to that, but it seems to be the one gaining momentum.
Dan: Option A seems to be the best in terms of clarity. I don't have strong feelings so am concerned about how it will come across if I appear to endorse one particular one.
Matthew: Same as for reference target, problematic if developers need to do non obvious stuff, will look at it as soon as possible.
Discussed
Sep 21, 2026 (See Github)
Dan: We wrote a response. 3 options they're juggling for how to do it, and I'm undecided which is best. Lightly endorsed one in the response. They're already engaging developers. I could be pretty easily persuaded to endorse another option, but haven't been persuaded yet.
Lola: You'll post your comment
Dan: With the accessibility note from matthew. Won't close the review, since I'm still asking some questions.
Comment by @dandclark Oct 1, 2026 (See Github)
Thanks for sending this to the TAG. We're happy to see this being worked on, as a continuation of prior efforts to make native <select> more customizable and useful.
On the 3 approaches being considered:
For Option B, we agree that webcompat and lack of progressive enhancement is a major issue with this approach and probably sufficient to block it. It'd be interesting to compare with <button>-inside-<select>, which historically also didn't work but is now allowed for customizable select in supporting browsers. Allowing that was a similar breaking change that seems to have been proven feasible. Do you know how current usage of <input>-inside-<select> parsing rules compares to historical dependence on the <button>-inside-<select> parsing rules at the time that change was made? If the usage numbers are comparable or lower for <input>-inside-<select> then this may still be feasible in terms of web compat. Progressive enhancement remains a problem though unless all browser implementations can align in shipping this change.
Assuming B remains a non-starter for those reasons, we'd support an approach like the one proposed here, where <select> gets a filterable attribute as described in Option C that would make the common case easy, and something like Option A is pursued later if there is still demand for flexibility beyond what C can achieve. The internal <input> would need to be styleable through a pseudo element. It's unfortunate though if a lot of properties specific to filtering would need to be added to HTMLSelectElement to support this, especially if they'd be redundant with properties eventually added to HTMLInputElement for Approach A or for Combobox. From the discussion in https://github.com/openui/open-ui/issues/1491 it looks like only a few properties would be needed, but if that list grows this approach should probably be reconsidered in favor of Option A.
We're happy to see that you're engaging with the developer community about these approaches, and if dev feedback strongly pushes towards one of these options, we'd support following that feedback.
Other miscellaneous thoughts:
- The proposed UA stylesheet has
option:filteredgivendisplay: none !important, but the!importantseems overly constraining. What if a developer wants to have filtered options grayed-out or crossed-off instead of disappeared (although devs would need to be careful to exlude such options from the a11y tree and from focus order)? It'd be good to ensure that animations between filtered and non-filtered states also work well. - The explainer mentions the
searchattribute a couple times in passing but it isn't really defined in this document. We assume this is referring to https://open-ui.org/components/combobox.explainer/#the-search-attribute -- if so it'd be good to link that directly, or inline an explanation into this explainer. - We assume
<select multiple>is in scope here since the GitHub label picker example is a multi-select. It would be good to have the explainer confirm this, and to ensure the accessibility implications with<select multiple>are also being considered (as was at least briefly discussed in https://github.com/w3c/aria/issues/2841). - For option A, is "sibling" a hard requirement or can the
<input>and<select>(and<selectedcontent>) be in different places in the DOM? It may be best not to be too strict on this requirement to allow for different DOM structures. For full composability, it could be desirable to have these be linkable across shadow DOM. Reference Target could forward thefilterID into a shadow root. Consider adding a corresponding reflecting IDL attribute likeinput.filterElement, which would allow the filter<input>to connect to a<select>in a parent shadow.- If Option A is selected, the attribute name
filtermay be worth bikeshedding. The current name sort of reverses the intended semantics:<input filter=foo>could be read like the thing with IDfoois the filter for the input, but what we want to express is the other way around where the<input>is the filter for the<select>foo.<input filters=foo>could work better since it reads like "this input filters the element with ID foo", but maybe thescould be confused for a pluralization. Maybefilterfor?
- If Option A is selected, the attribute name
Discussed
Oct 5, 2026 (See Github)
Dan: We posted and are waiting for a response.
Comment by @josepharhar Oct 22, 2026 (See Github)
Thanks for the review!
Do you know how current usage of
<input>-inside-<select>parsing rules compares to historical dependence on the<button>-inside-<select>parsing rules at the time that change was made? If the usage numbers are comparable or lower for<input>-inside-<select>then this may still be feasible in terms of web compat. Progressive enhancement remains a problem though unless all browser implementations can align in shipping this change.
I didn't look at <button> in <select> in particular, I don't remember that having special parsing rules like <input> and <textarea> do.
I added some use counters for parsing <input> in <select>, and this one contains many websites which I manually confirmed would be broken by changing the parser to simply allow <input> in <select>: https://chromestatus.com/metrics/feature/timeline/popularity/5546
Mason had a good idea of only allowing <input> in <select> if the select element hasn't parsed any option elements yet, which would avoid breaking most sites since the ones relying on this generally put options before the input. Use counter for that here. Unfortunately, this isn't perfect either.
As a progressive enhancement strategy, sites might actually want to put <input> after all the <option>s though in order to prevent the option elements from getting dumped out after the end of the select on older browsers. Here's a demonstration of how the parser works today:
As you can see, the "defensive" approach which puts the input tag at the end still gets its options inside the select element. With some CSS to hide the input element, you'd still have a working select element, it just wouldn't have the filtering input. We could have custom slotting code to make sure that this input element gets slotted into the correct spot regardless of where it shows up inside the select.
However, if we went with the idea of only allowing the parser to nest input in select when it comes before the options for compat reasons, it would break this progressive enhancement. I get that progressive enhancement is probably not what most people want compared to a polyfill, but customizable select (and therefore filterable select) is already not very polyfillable due to the HTML parser changes, so progressive enhancement for all this select related stuff is my best advice for authors.
</details>Assuming B remains a non-starter for those reasons, we'd support an approach like the one proposed here, where
<select>gets afilterableattribute as described in Option C that would make the common case easy, and something like Option A is pursued later if there is still demand for flexibility beyond what C can achieve. The internal<input>would need to be styleable through a pseudo element. It's unfortunate though if a lot of properties specific to filtering would need to be added toHTMLSelectElementto support this, especially if they'd be redundant with properties eventually added to HTMLInputElement for Approach A or for Combobox. From the discussion in openui/open-ui#1491 it looks like only a few properties would be needed, but if that list grows this approach should probably be reconsidered in favor of Option A.
Thanks! Agreed, and hopefully more developer testing should make it clear how much we need to expose.
The proposed UA stylesheet has
option:filteredgivendisplay: none !important, but the!importantseems overly constraining. What if a developer wants to have filtered options grayed-out or crossed-off instead of disappeared (although devs would need to be careful to exlude such options from the a11y tree and from focus order)? It'd be good to ensure that animations between filtered and non-filtered states also work well.
Thanks, I am going to remove the !important here: https://github.com/openui/open-ui/pull/1536
- The explainer mentions the
searchattribute a couple times in passing but it isn't really defined in this document. We assume this is referring to https://open-ui.org/components/combobox.explainer/#the-search-attribute -- if so it'd be good to link that directly, or inline an explanation into this explainer.- We assume
<select multiple>is in scope here since the GitHub label picker example is a multi-select. It would be good to have the explainer confirm this, and to ensure the accessibility implications with<select multiple>are also being considered (as was at least briefly discussed in Filtering a listbox with a text field (filterable select) w3c/aria#2841).
Thanks, I am addressing these here: https://github.com/openui/open-ui/pull/1537
- For option A, is "sibling" a hard requirement or can the
<input>and<select>(and<selectedcontent>) be in different places in the DOM? It may be best not to be too strict on this requirement to allow for different DOM structures. For full composability, it could be desirable to have these be linkable across shadow DOM. Reference Target could forward thefilterID into a shadow root. Consider adding a corresponding reflecting IDL attribute likeinput.filterElement, which would allow the filter<input>to connect to a<select>in a parent shadow.
Sibling is not a hard requirement at all, I just found the word "sibling" to be useful when describing how to use it. The prototype should work totally fine without them literally being siblings in the DOM.
- If Option A is selected, the attribute name
filtermay be worth bikeshedding. The current name sort of reverses the intended semantics:<input filter=foo>could be read like the thing with IDfoois the filter for the input, but what we want to express is the other way around where the<input>is the filter for the<select>foo.<input filters=foo>could work better since it reads like "this input filters the element with ID foo", but maybe thescould be confused for a pluralization. Maybefilterfor?
Thanks, I filed an issue to discuss this: https://github.com/openui/open-ui/issues/1538
Discussed
Nov 16, 2026 (See Github)
Dan: Expanded on this in Oct. It was discussed in length at TPAC. Joey’s response might no longer be up-to-date. Latest idea is to put an attribute or another element under select which would allow an input element to appear there. This was debated because of parser concerns, but I don’t share the scepticism. Might reach out to Joey and get his feeling how feasible it is to propose the breaking change. Would be nice if it could be done.
Lola: Why not the nested route?
Dan: MXSS issues, sanitizers, another way to branch the HTML parser…
(Dan to check back with Joey.)
OpenedAug 12, 2026
Explainer
https://open-ui.org/components/filterable-select.explainer/
The explainer
Where and by whom is the work is being done?
Feedback so far
You should also know that...
We still need to choose one of the API shape options, but the HTML parser changes in option B are opposed by developers and participants of OpenUI
<!-- Content below this is maintained by @w3c-tag-bot -->Track conversations at https://tag-github-bot.w3.org/gh/w3ctag/design-reviews/1264