W3C home > Mailing lists > Public > whatwg@whatwg.org > November 2008

[whatwg] Errormessages in forms

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 5 Nov 2008 15:32:41 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0811051523410.1237@hixie.dreamhostps.com>
On Mon, 21 Jul 2008, Keryx Web wrote:
> 
> A simple use case: It is getting quite common to have the following:
> 
> <label for="myfield">Instructions
>   <strong class="error"> Must be a valid  value</strong>
> </label>
> <input id="myfield" etc />
>
> But presentationwise it should be displayed like this:
> 
> Instructions  [ (input) ] Must be a valid value

What's wrong with?:

   <label>
     Instructions
     <input name="idfield" ...>
     <strong class="error"> Must be a valid value </strong>
   </label>


> And by adding a new element the following two additional benefits could 
> be achieved:
> 
> 1. A default hook for errormessages from the UA. I.e. if a field has an 
> associated errormsg-element the UA knows exactly where to put its 
> messages.

Opera seems to use a pop-up UI, which seems fine, and less likely to 
cause problems.


> 2. Assistive technology can use this additional semantics and it is not 
> hard to imagine how that could lead to better user experiences.

It's not clear to me how.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 5 November 2008 07:32:41 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:07 UTC