This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 9439 - UA should not change values of input elements in telephone state
Summary: UA should not change values of input elements in telephone state
Status: RESOLVED NEEDSINFO
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://dev.w3.org/html5/spec/forms.ht...
Whiteboard:
Keywords: NE
Depends on:
Blocks:
 
Reported: 2010-04-06 23:00 UTC by Mounir Lamouri
Modified: 2010-10-04 13:57 UTC (History)
7 users (show)

See Also:


Attachments

Description Mounir Lamouri 2010-04-06 23:00:59 UTC
According to the specifications "User agents may change the punctuation of values that the user enters." and according to Ian, this means "For example, if I enter "1 650 253-0000", the user agent is allowed to change that to "+1 (650) 253 0000" or "16502530000" or "+1 (650) 253-0000". This is because such reformatting is common practice in telephone number entry fields.".

In my opinion, this is the opposite from the note: "Unlike the URL and E-mail types, the Telephone type does not enforce a particular syntax. This is intentional; in practice, telephone number fields tend to be free-form fields, because there are a wide variety of valid phone numbers."

Changing the punctuation is part of enforcing a particular syntax.

In addition, it may make the check very hard. For example, I can check if a french phone number is valid by adding this in the pattern attribute: "/^0\d{9}$/"
If the UA is adding spaces, hyphens or anything else, it will break the check.
Comment 1 Ian 'Hixie' Hickson 2010-04-13 01:34:53 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: In practice, telephone number fields reformat the input — that's just how they work. We may have to change that if we find it really doesn't work well on the Web, but I think that it makes sense to start with what the existing practices are.
Comment 2 Olli Pettay 2010-04-14 20:57:03 UTC
So the current wording allows browser to do whatever to the punctuation.
Scripts can't rely on what, nor can server side code.
So why to have such "may change" functionality?
Comment 3 Olli Pettay 2010-04-22 15:37:52 UTC
If the wording stays the same in the specification, could someone
at least give good reasoning for such "may"  feature, which lets
browser to do whatever.
Comment 4 Ian 'Hixie' Hickson 2010-08-17 19:06:18 UTC
Is the reasoning in comment 1 insufficient? I don't really understand what you're asking for.