[whatwg] Form element invalid message

On Wed, Jul 27, 2011 at 8:37 PM, Jukka K. Korpela <jkorpela at cs.tut.fi> wrote:
> 28.07.2011 03:21, Ian Hickson wrote:
>
>> A text input field could have a number of error conditions:
>
> Indeed. Therefore it would be essential to be able to set the error message
> for _each_ check that a browser is supposed to do on the basis of HTML
> markup alone.

That would require not just a message for each check, but a message
for all combinations of checks. That is for most practical purposes
not going to be a workable solution. This is why I think it's better
to let the page deal with checking the different combinations that it
desires and choose a message based on that.

> If this is not possible, it is easier to authors to code all
> data checking in JavaScript.

Yup, I think that's basically the situation.

>> I guess we can have a dedicated attribute that user agents can use
>> to provide a message, rather than the current solution of just using the
>> title="" attribute for pattern=""'s error message.
>
> The title="" attribute is generally supposed to contain an advisory title
> for an element, and deviating from this that way is very odd and confusing -
> especially since user agents may show its value in a tooltip or speak it out
> when entering the field.

Indeed. I think the extra use for @title is a bad idea and should be removed.

/ Jonas

Received on Friday, 29 July 2011 08:43:07 UTC