[Bug 12885] Add a new input type=numeric

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

--- Comment #11 from Henri Sivonen <hsivonen@iki.fi> 2011-06-07 05:43:52 UTC ---
(In reply to comment #9)
> The current i18n story with <input type=number> is sad (the localized digit
> code points are not treated as digits).  I think that we should allow the UA to
> accept localized digits too, and treat them internally as digits, not
> characters, as the 0-9 digits are treated.  I also think that the default form
> submission behavior should be to submit the number values in the Latin digit
> code points, since that is probably what most web applications deployed on
> servers understand.

Browsers are already supposed to be allowed to display type=number in localized
ways as long what shows up in the DOM and what goes over the wire uses Basic
Latin digits and period as the decimal separator. (The spec isn't particularly
clear on this.)

If the user is shown Persian digits in type=number, it's obvious to the user
(who reads Persian) what is going on. Localizing the decimal separator to a
comma might be more of a problem, because a Finnish user would expect
English-language sites to use a period as the decimal separator, so there'd be
doubt about whether a comma is a decimal or thousand separator on an
English-language site if fi-FI browser UI changed all type=numbers to present a
numbers with a decimal comma.

I think type=number should change its localization behaviors depending on the
language of the element (per
http://www.whatwg.org/specs/web-apps/current-work/#language). The downside is
that browsers would have to contain the localization capabilities for all known
locales instead of their own UI locale. For number formatting, the relevant
libs probably support all known locales anyway, so this shouldn't be too much
of a problem.

-- 
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 Tuesday, 7 June 2011 05:43:55 UTC