[whatwg] input element list attribute and filtering suggestions
Jonas Sicking
jonas at sicking.cc
Fri Jul 29 20:48:32 PDT 2011
On Fri, Jul 29, 2011 at 8:32 PM, Ian Hickson <ian at hixie.ch> wrote:
> On Fri, 29 Jul 2011, Jonas Sicking wrote:
>>
>> I have no idea how the UA would be smart enough to figure out if
>> filtering makes sense or not based on the set of suggestions.
>
> You could do something like:
>
> - if there are 7 or fewer suggestions, show them all.
> - if filtering reduces the list to 1 to 7 suggestions, show those.
> - if there's some way to prioritise the filtered list, show the 7 best
> results from the filtered list.
> - otherwise, show everything.
I assume it's a bug in the above suggestion that if filtering results
in more than 7 results, we'd show everything, rather than just the
filtered result?
If so, this basically comes down to "filter if it's more than 7,
otherwise don't filter". These sort of magic limits is exactly the
type of things that authors are going to end up butting up against and
are going to want to configure.
I don't see a way that HTML5 currently provides enough data to do any
useful prioritization.
> Exactly how the filtering is done can vary, in a way similar to how
> autocomplete dropdowns in browser location bars have pretty involved
> heuristics for figuring out how to filter to a few results.
Yes, but we have a *lot* more data available to do that filtering and
sorting, compared to just the plain value that we have available for
<datalist>.
/ Jonas
More information about the whatwg
mailing list