This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Split from discussion on bug #9670 ( http://www.w3.org/Bugs/Public/show_bug.cgi?id=9670 ): The "maxlength" attribute is not allowed on number type input fields, as this can be inferred from min, max & step attributes in browsers that understand HTML 5. However, browsers that do not understand HTML 5 still need to know how many characters can be returned to the server, and should use the "maxlength" attribute for this. Can I suggest that "maxlength" should be allowed, but ignored by HTML 5 compliant browsers?
Hixie has already considered and rejected this idea elsewhere: """ During the transition period, I agree that it would be convenient to use maxlength="" and size="". And so go ahead and do so. The useful transition period won't be very long. By the time validators have caught up with the new rules, it won't be necessary any more. So in the spec, I've just gone ahead and specced the end game. """ http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-May/031766.html However, it seems to me that the useful transition period will be a matter of years -- how long until IE9 market share isn't worth worrying about? On the other hand, validators can be updated very quickly when the spec changes, to the tune of days. At most, this kind of combination should be obsolete but conforming, like other harmless legacy shims (<a name>, etc.). Authors should be warned that the attribute will have no effect in browsers that implement the type properly, but IMO they shouldn't be told it's an error.
mass-moved component to LC1
Hm, making it obsolete but conforming with a warning seems ok. 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: Accepted Change Description: see diff given below Rationale: Concurred with comment 1.
Checked in as WHATWG revision r6413. Check-in comment: Semi-allow <input type=number maxlength> for legacy reasons. http://html5.org/tools/web-apps-tracker?from=6412&to=6413
<MikeSmith> Hixie: I don't understand http://html5.org/r/6413 <MikeSmith> the spec already states that maxlength on input@type=number is not valid <MikeSmith> so validator.nu currently emits an error for it <MikeSmith> this change would cause it to emit a warning in addition to an error <MikeSmith> unless I'm misunderstanding something <MikeSmith> but http://www.whatwg.org/specs/web-apps/current-work/multipage/number-state.html#number-state lists maxlength under "The following content attributes must not be specified and do not apply to the element" <MikeSmith> and http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary also indicates that maxlength is now allowed on input@type=number <MikeSmith> if the intent is to actually make it conforming but obsolete, it seems like those parts of the spec should be changed as well <zcorpan> MikeSmith: "should not" means it's allowed if you have a good reason <MikeSmith> OK <MikeSmith> but if so, those two parts of the spec should be changed <zcorpan> yeah <MikeSmith> I don't see how otherwise we can make any changes to the validation behavior
Yeah, so basically the problem is that what is conforming and what actually has any effect is, intentionally, tied together here. So either we should back out r6413 and reject this request, or I guess we can put a temporary "override" requirement on validators here... would that be sufficient, Mike? I don't want to go and fiddle with the WF2 text here because it's a complicated thing to change and this is only temporary anyway.
(In reply to comment #6) > Yeah, so basically the problem is that what is conforming and what actually has > any effect is, intentionally, tied together here. > > So either we should back out r6413 and reject this request, or I guess we can > put a temporary "override" requirement on validators here... would that be > sufficient, Mike? Yeah, that'd be fine by me.
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: Accepted Change Description: see diff given below Rationale: Have to actually make this conforming to satisfy the use case, not just discourage it!
Checked in as WHATWG revision r6565. Check-in comment: Make size and maxlength conforming on type=number for now. (fixing r6413 better) http://html5.org/tools/web-apps-tracker?from=6564&to=6565