[whatwg] Errormessages in forms

Dne Fri, 26 Jun 2009 07:17:17 +0200 Ian Hickson <ian at hixie.ch> napsal/-a:

> On Tue, 2 Dec 2008, Old?ich Vete?n?k wrote:
>> Dne Tue, 02 Dec 2008 11:31:07 +0100 Ian Hickson <ian at hixie.ch>  
>> napsal/-a:
>> >
>> > Well, in the snippet above, the following seems adequate:
>> >   <label> Instructions <input name=idfield>
>> >            Type in dd-mm-yyy format</label>
>> > ...and the custom error message should be set from script, using
>> > addCustomValidity(). How is that not accessible? It seems fine to me.  
>> The
>> > AT can read the whole label when entering the field, and the error  
>> message
>> > handling is done by the UA.
>>
>> Alright, I agree, I don't have a problem with it. But is it possible to  
>> create
>> a detailed documentation for this, including "How do I code it right?,"  
>> with
>> wrong good and examples? In my opinion, if there was a good, clear and
>> understandable (for human regular beings that is) documentantion which
>> developers could refer to, and if it succeeded in getting known widely,  
>> it
>> could improve the overall knowledge and accessibility. It reminds of the
>> longdesc attribute - it's useful but nobody really knows how to make it  
>> right.
>
> I think it would be reasonable to have examples, yes.
>
> I've added one for <label> similar to the above. Do you have any other
> areas where you would like particular examples?

Mm, maybe adding an error message would be fine - just to nail the head :)
<p><label>Post code: <input name=pc> <small>Format: AB12 3CD</small>  
<span>There seems to be an error, please type the post code in the correct  
format.</span></label></p> (for example)

> Note that Lachy is working on a whole authoring guide for HTML5 which  
> will
> probably cover things like this in more detail also.

Great, can I see it somewhere?

Thanks,
O.V.

Received on Tuesday, 21 July 2009 02:20:34 UTC