[Bug 12885] Add a new input type=numeric

http://www.w3.org/Bugs/Public/show_bug.cgi?id=12885

--- Comment #7 from Adrian Bateman [MSFT] <adrianba@microsoft.com> 2011-06-06 16:45:28 UTC ---
(In reply to comment #6)
> I'm not sure adding new types is the right way to go here, though.  Using a
> different attribute might make more sense, maybe expect="" or hint="" or
> keyboard="".  All the existing types except search really dictate the input's
> functionality a lot more than just a soft keyboard hint.  E.g., type=tel could
> provide suggestions from the user's address book on a smartphone.

It could be another attribute, although I worry about the complexity of having
both type and a hint and having to work out what to do for each combination.
The semantic information about the expected data might be used for other input
means such as hinting to the heuristics for speech recognition.

> (In reply to comment #1)
> > I take it '.', '+' or '-' characters wouldn't be allowed in this new control?
> 
> Adrian can correct me if I'm wrong, but it sounds to me like there are supposed
> to be no validation requirements.  It's just a hint to switch keyboards.

Right - we didn't intend there to be any validation - pattern="" can be used
for that. 

> (In reply to comment #5)
> > It seems to me that type=tel is already what you are asking for:
> > http://www.whatwg.org/specs/web-apps/current-work/#telephone-state
> 
> That isn't meant to handle things like zip codes, credit card numbers, etc. 
> UAs might do confusing things like autocomplete to phone numbers from your
> address book.

Agreed - I think it would be a mistake to try to re-use the telephone state for
arbitrary numeric input.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Monday, 6 June 2011 16:45:33 UTC