[whatwg] Constraint validation feedback (various threads)

Mounir Lamouri mounir.lamouri at gmail.com
Fri Sep 24 18:23:14 PDT 2010


On 08/11/2010 03:03 PM, Ian Hickson wrote:
> On Tue, 20 Jul 2010, Mounir Lamouri wrote:
>> > 
>> > At the moment, three form elements are barred from constraint 
>> > validation: object, fieldset and output. I can understand why object and 
>> > fieldset are barred from constraint validation but I think output could 
>> > use the constraint validation.
> The user can't edit the value of <output>, so the only time this would be 
> helpful is when you have script, with the script setting the validity 
> using setCustomValidity(). But then the script can just as easily set it 
> on the control that's actually making the output be invalid. That would 
> also be better UI -- having the user agent point out the <output> control 
> is invalid would likely just infuriate users who couldn't tell what they 
> had to do to change the value.

I don't think having invalid <output> will be confusing for the user
given that the authors will have to set a message describing the issue.
The authors would have no reason to make this message unclear.
In addition, <output> is already semantically linked to some elements so
marking it invalid should be a hint that they need to be modified.

For the UI point of view, you can easily found use cases when showing
the output is much more convenient that highlighting all elements making
the output invalid. For example, in a web application to select courses
in a university. If there is an output showing the sum of credits which
has to be between 12 and 18, it sounds to be nicer to have the output
marked as invalid with a message explaining that the sum of credits has
to be between 12 and 18 than having all courses marked as invalid which
can be wrongly interpreted.
Though, I don't think the UI is a valid point here. Shouldn't we let the
authors choose what UI they want to implement and just give them the API
to do it?

Tab, you seemed to support this proposition when I made it. Is it
planned to have that implemented in Webkit?

Thanks,
--
Mounir



More information about the whatwg mailing list