W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2009

[whatwg] Input type for phone numbers

From: Antti Koivisto <antti@apple.com>
Date: Tue, 31 Mar 2009 01:24:33 -0700
Message-ID: <0B8725D4-27EE-4B2B-8B14-B14082E92E7A@apple.com>

On 31.3.2009, at 0:12, Ian Hickson wrote:

> On Mon, 30 Mar 2009, Antti Koivisto wrote:
>>
>> I'd like to propose a new <input> type attribute value for phone  
>> numbers
>> (<input type="phonenumber"> perhaps). The primary benefit would be to
>> enable use of phone number specific input methods (for example a  
>> virtual
>> keyboard) and pickers (for example a system address book). A useful
>> minimal implementation could limit the allowed characters to those  
>> legal
>> in phone numbers (+ * # and 0-9).
>
> Would the pattern="" attribute not be enough?

Pattern attribute does not communicate the type. It would not allow  
you to bring up phone book based pickers or special input methods so  
it does not satisfy the use case. It also pushes the burden of  
specifying a right pattern to authors, something they are likely to  
get often wrong.

> Generally speaking at this point it's probably best for us to wait  
> for the
> currently defined features to be more widely implemented before we  
> add any
> more controls, since otherwise we'll just end up with different  
> browsers
> implementing different subsets and it'll be a big mess.

While I agree with the general sentiment I think there is some  
surprising asymmetry in including email type but leaving this  
unspecified.

Different browsers implementing different subsets is probably  
unavoidable initially in any case.


    antti

>
>
> -- 
> Ian Hickson               U+1047E                ) 
> \._.,--....,'``.    fL
> http://ln.hixie.ch/       U+263A                /,   _.. \   _ 
> \  ;`._ ,.
> Things that are impossible just take longer.   `._.-(,_..'-- 
> (,_..'`-.;.'
Received on Tuesday, 31 March 2009 01:24:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:47:49 GMT