[whatwg] Pattern Hint

Dean Edwards dean at edwards.name
Thu Aug 4 18:25:35 PDT 2005

Dean Edwards wrote:
> Matthew Raymond wrote:
>> Lachlan Hunt wrote:
>>> Dean Edwards wrote:
>>>> fantasai wrote:
>>>>> Dean Edwards wrote:
>>>>> http://www.whatwg.org/specs/web-forms/current-work/#the-pattern
>>>> That is not enough. I wouldn't put something so complex in a 
>>>> tooltip. It would frighten my users.
>>> What could be so complex that would frighten users when used in a 
>>> title attribute, yet wouldn't have the same effect when used in some 
>>> kind of pattern hint attribute, regardless of how it's displayed to 
>>> the user?
>>    Wouldn't it be difficult for someone to type while viewing the
>> tooltip? When I try it in Firefox, the tooltip disappears as soon as I
>> start typing. Unless the user is being presented with a localized
>> control that displays the output in the pattern they're accustomed to,
>> the web developer is going to need to make the hint viewable 
>> continuously.
> That's my thinking. I'm also concerned about pattern mismatches. If a 
> form is invalid the UA is supposed to feed back information to help the 
> user complete the form.
> http://whatwg.org/specs/web-forms/current-work/#form-submission
> For most types, pattern mismatches are easy to explain to the user - 
> "Please enter a valid time (format HH:MM:SS).". For a complex pattern 
> this is more difficult. The UA can't assume that the "title" attribute 
> is going to help in this situation so must fall back to a generic 
> "Pattern mismatch".
> My concern is one of usability. We have provided a mechanism for 
> entering complex patterns, we should also provide a mechanism for 
> helping end-users enter these patterns.

OK. I just read the reference that fantasai provided and the UA is 
supposed to use the "title" attribute when the form is invalid. I really 
ought to read things. :-)

However, this seems like a "hackish" solution. A good UI system does not 
burden the user with lots of help information every time they enter 
data. Where a simple "Pleases enter a ZIP code" will do for a tooltip, a 
pattern hint can be quite verbose and technical. This should only be 
displayed on demand or when the form is invalid.

Also, as Matthew points out, on many UAs the tooltip is not visible when 
typing. The time when you actually want to read it.

My thinking is that the presence of a pattern "hint" attribute would 
trigger a small change in the chrome of an input box. A help icon would 
be displayed indicating a more complex data entry pattern. Clicking this 
icon presents the user with instructions on completing the field. The 
same text can be used to aid in completing invalid forms.

If we don't supply such a mechanism, developers will alter their 
markup/CSS to include a hint for complex patterns anyway.

But I still ought to read things. ;-)


More information about the whatwg mailing list