Re: [css3-ui]? Proposal for ::error pseudoelement

On Tue, Aug 25, 2009 at 2:59 PM, Boris Zbarsky<bzbarsky@mit.edu> wrote:
> To be clear...  If you have ~5 inputs and they all fit on the screen at
> once, then showing the error messages next to the inputs is fine; the user
> clicks submit, sees the errors, changes the data, etc.
>
> If you have 300 inputs (lots of forms like that out there, in fact), or 2000
> (I've seen multiple bug reports on forms like _that_ as well), and they do
> validation, then having to scroll around looking for that one input where
> the error happened is a terrible user experience. For this setup,
> centralizing the error list in one place and focusing inputs (scrolling to
> them and highlighting them) when one of the errors is clicked is the only
> sane way to go.
>
> I would like browsers to be able to use whichever of the above two
> error-reporting modes they want, or even a combination depending on the
> number of inputs in the form...  Your proposal restricts the possible user
> interfaces such as to prevent the second mode.

You make some excellent points, so let me qualify my proposal a bit.

As a general principle, if the browser inserts UI into the page, it
should consider granting authors a way of styling it with CSS.

Opera's current behavior is definitely inserting UI into the page.
Your proposed alternate behavior, which is very reasonable, would
*not* insert UI into the page - it stays firmly in the browser side of
things.  Anne privately brought up a third possible display - an
unobtrusive icon inserted into the page which, when clicked/hovered,
brings up details on what's wrong with the element.  This one is
probably minimal enough that it's not necessary to provide
author-styling hooks, just like the grabber for <textarea> resizing
isn't available for author styling.

So, we probably want to wait a bit on even trying to standardize this
stuff until we see how users like their errors to be displayed.  For
now, since Opera wants to make their messages styleable, I suggest a
::-o-error pseudoelement.  Once more browsers implement WF2, we can
revisit this and see what sort of UI is common and whether it should
provide hooks.

~TJ

Received on Tuesday, 25 August 2009 21:27:54 UTC