[whatwg] Pattern Hint

Matthew Raymond mattraymond at earthlink.net
Sat Oct 8 04:57:52 PDT 2005

Ian Hickson wrote:
> On Fri, 7 Oct 2005, Matthew Raymond wrote:
>>   There is a certain presumption that the author doesn't want to use 
>>|title| for any other purpose than providing input hints. This is 
>>potentially erroneous. For instance, the |title| may describe the 
>>purpose of the input rather than the input pattern. If someone is 
>>inputting a credit card number, it may be to hold a reservation rather 
>>than make payment, and the author may wish to communicate that via a 
>>tooltip. By making the |title| the semantic method of providing pattern 
>>hints, you block the web author from using tooltips for any other 
>>purpose, and that's even assuming the user agent won't treat |title| as 
>>a special case when applied to form controls.
> I'd agree this was a problem, if authors ever used title="" in the first 
> place.
> But in this case that's fine. title="Your credit card number. This is 
> used for reserving your flight only." is perfect conformant and good.

   But the example text I have was for the tooltip, not for the pattern
hint. The pattern hint might be "Format: #### #### #### ####" or "Enter
in the full credit card number without any spaces." And this hint would
need to be visible while the user it typing, or else they have to stop
typing, take one hand completely off the keyboard and put it on the
mouse, then hover the pointer over the control until the tooltip
appears. Pattern hints, in legacy HTML at least, need to be text in the
web page and not tooltips.

More information about the whatwg mailing list