[whatwg] pattern-hint

Mark Schenk css at markschenk.com
Fri Jul 9 05:40:05 PDT 2004


On Thu, 08 Jul 2004 16:51:33 +0200, fantasai
<fantasai.lists at inkedblade.net> wrote:

>>  I do not entirely agree that the HTML title attribute is equivalent to  
>> the  XForms hint element[3], as in the following example which for  
>> entering a  (customer-/tracking-)id as is often used in correspondence  
>> between company  and customer:
>>  <input type="text"
>>        name="uid"
>>        title="Correspondence Number"
>>        pattern="some-regexp-here"
>>        hint="The correspondence number is a number of the form   
>> 1234-56-789" />
>>  The title describes what the field is about and hint describes in  
>> what  format the data should be entered, which I think are two  
>> distinctly  different things.

I have to correct myself here, as I was wrong when saying that hint and
title are two different things. The HTML 4.01 specs states:

"title = text [CS]
This attribute offers advisory information about the element for which it
is set"

<url: http://www.w3.org/TR/REC-html40/struct/global.html#h-7.4.3 >

So effectively the title attribute is the same as the Hint attribute in
XForms, so there is no need for a new attribute.


> Shouldn't that be
>    <label for="corr">Correspondence Number</label><input id="corr" ... />

That is also an idea for the UA developers to consider. However, what
would take precedence: a label or the title attribute?

-- 
Mark Schenk




More information about the whatwg mailing list