[whatwg] Errormessages in forms

> On Mon, Jul 21, 2008 at 10:31 PM, Robert (Jamie) Munro wrote:
>> What's wrong with:
>>
>> <label for="myfield">Instructions</label>
>> <input id="myfield" etc />
>> <label for="myfield" class="error"> Must be a valid  value</label>
>>
>> Can an input not have 2 labels?
> 

Thomas Broyer skrev:

> Or even:
> <label>Instructions <input etc> <strong class=error>Must be a valid
> value</strong></label>

Both of these suggestions lack the precision, the semantics and the 
flexibility of my suggestion.

Vz Thomas B's solution:
- What if a designer wishes to have the error messages grouped together 
on the top of the page, instead of next to the input fields and manages 
to come up with a solution that is very usable?
- For the default UA error messages to be inserted correctly it must 
honour the classname as a microformat. Since that must be spec'd, it 
might just as well be a real element.

Vz Robert M's solution:
- Where would the UA put a default error message, in the first or second 
label?
- How could assistive technologies differentiate between normal 
instructions and specific errors?


Lars Gunther

Received on Tuesday, 22 July 2008 04:55:10 UTC