W3C home > Mailing lists > Public > public-html@w3.org > July 2010

Form error messages and default presentation of invalid state

From: Kornel Lesiński <kornel@geekhood.net>
Date: Fri, 30 Jul 2010 11:35:03 +0100
Message-Id: <65EFCA39-2871-4526-AC03-1739C40AA563@geekhood.net>
To: public-html@w3.org

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
Received on Friday, 30 July 2010 10:35:39 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:19 UTC