Re: Form error messages and default presentation of invalid state

2010/7/30 Kornel Lesiński <kornel@geekhood.net>
>
> Section 4.10.20.2 Constraint validation has very little requirements regarding how form error conditions are presented to the user, and suggests that merely focusing an element is sufficient.
>
> While I agree that UAs should have freedom of implementation, I think the spec currently sets the bar too low. It should require UA to display error message or at least make invalid controls visually different from valid controls.
>
> The problem for me is Chrome's implementation, which does nothing besides focusing the element. I think it's confusing for users. Lack of any explanation or any hint that focus is in response to error condition makes website/browser appear to be broken.
>
> Test case:
>
> <form action="data:text/plain,ok">
> <input type=number value=100 max=50 autofocus>
> <input type=submit>
>
> In Chrome submit button doesn't appear to do anything. User has no way of discovering what's the maximum allowed value.
>
> I know this can be worked around with JS+CSS, but I'd like default behavior to be useful. Requiring authors to add extra error handling diminishes value of built-in validation and misses opportunity for standard, consistent display of form errors.
>
> --
> regards, Kornel
>

Hi Kornel,

The same issue occurred in WebKit (the rendering engine Chrome uses)
for required form-elements. The form would simply refuse to submit,
however, with no visible messages or warnings. Aryeh Gregor reported
the issue against Chrome[1] and WebKit[2]. For that reason interactive
validation has been disabled for Chromium by default, which already
landed on in the Dev Channel.

I think it's nothing more than sane that any UA which supports
interactive validation also supports an user interface for it. Having
bugs like this can't be intentional, as users are left clueless as to
why their information isn't being submitted.

Regards,
Peter Beverloo

[1] http://code.google.com/p/chromium/issues/detail?id=45804
[2] https://bugs.webkit.org/show_bug.cgi?id=40747

Received on Friday, 30 July 2010 10:48:12 UTC