[whatwg] Pattern Hint

Matthew Raymond mattraymond at earthlink.net
Thu Aug 4 07:14:27 PDT 2005

Lachlan Hunt wrote:
> Dean Edwards wrote:
>>fantasai wrote:
>>>Dean Edwards wrote:
>>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.

   In theory, that could be done with some kind of <hint> element:

| <label for="phone">Phone:</label>
| <input id="phone" name="phone" pattern="[Blah, blah, blah]">
| <hint for="phone">(XXX) YYY-ZZZZ</hint>

   However, this starts to look way too much like my old <format> idea
really quick:

| <label for="startdate">Start Date:</label>
| <input type="date" id="startdate" name="startdate">
| <hint for="startdate">YYYY-MM-DD</hint>

   Hmm... I have to think about this one...

More information about the whatwg mailing list