[whatwg] input element list attribute and filtering suggestions

On Fri, Dec 31, 2010 at 3:46 PM, Jonas Sicking <jonas at sicking.cc> wrote:
> I like the idea of bolding the matching parts of the suggestions which
> match the typed string. Or at least creating a pseudo-element which
> selected the matching substrings such that you could get the behavior
> you want using:
> input::matching-suggest {
> ?font-weight: bold;
> }
> Would be great if you could file a bug in bugzilla.mozilla.org to
> implement such a feature and cc me.

I think that's too narrow to be really useful as a dedicated feature
for authors (although maybe UAs will want to use it in their default
stylesheets).  The number of authors who want to highlight the
matching suggestion but don't want any further markup seems like it
would be too small to justify a special-case feature.  Especially
since if you get even slightly sophisticated, you might be returning
results that don't have the given string as an exact substring, e.g.,
if you normalize spacing and punctuation before doing matches (let
alone doing typo fixes and synonym substitutions like Google).

> That aside, I do in general agree that it would be nice to allow
> markup inside <option>s. I do wonder if a lot of pages would break if
> parsing was changed in such a way.

That does seem like a very logical way to do this.  It would be cool
if this were possible -- it's a pain to get the absolute positioning
and such right as it stands.

Received on Saturday, 1 January 2011 16:45:49 UTC