[whatwg] [WebForms2] custom form validation notifications

Am Donnerstag, den 23.10.2008, 23:02 +0100 schrieb Eduard Pascual:
> Would having some sort of "custom-error-message" attribute hurt that
> much? (Of course, the name is just an example, and I wouldn't really
> suggest it). It would simply ignored by current UAs, and not really
> hard to implement (actually, it'd be trivial compared to implementing
> reg.exp. parsing).
We already have @title and as section 2.6 of WF2 says:

"Authors should include a description of the pattern in the title
attribute. User agents may use the contents of this attribute when
informing the user that the pattern is not matched, or at any other
suitable time, such as in a tooltip or read out by assistive technology
when the control gains focus."

That pretty much sweeps the issue, does it ?

> OTOH, I think Joao's idea was more like to relying on visual hints
> (ie: marking the field as red) on cases where an error message popup
> would be redundant and annoying. I think that could be more elegantly
> handled with an empty attribute value for an hipothetical
> "custom-error-message" attribute (which is not the same as an absent
> attribute).
What's the problem with having :valid and :invalid CSS pseudo-classes ?

Greetings
-- 
Nils Dagsson Moskopp
<http://dieweltistgarnichtso.net>

Received on Thursday, 23 October 2008 21:37:06 UTC