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 11499 - make clear whether value attribute on input[type='button'] element can be empty
Summary: make clear whether value attribute on input[type='button'] element can be empty
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-08 04:02 UTC by Michael[tm] Smith
Modified: 2011-08-04 05:01 UTC (History)
9 users (show)

See Also:


Attachments

Description Michael[tm] Smith 2010-12-08 04:02:43 UTC
r5550 made the value attribute required for the "button state" of the input element (input[type='button'])

http://html5.org/tools/web-apps-tracker?from=5549&to=5550
http://dev.w3.org/html5/spec/number-state.html#button-state

...but to me at least it does not seem clear from the spec whether the value attribute for this case is allowed to be empty.

In other words, if a document contains an instance of <input type=button value=""> then should a conformance checker emit an error message for that instance, or not?
Comment 1 Michael[tm] Smith 2010-12-08 04:03:35 UTC
this relates to bug 10710
Comment 2 Tab Atkins Jr. 2010-12-08 04:14:46 UTC
The spec draws a clear distinction between an attribute being absent and it being present but empty.  <input type=button value=''> is perfectly fine.
Comment 3 Michael[tm] Smith 2010-12-08 04:39:46 UTC
(In reply to comment #2)
> The spec draws a clear distinction between an attribute being absent and it
> being present but empty.  <input type=button value=''> is perfectly fine.

Sorry if my bug description isn't clear. I understand what the difference is between an attribute being absent vs. being present but empty. What I'm asking to have clarified is whether <input type=button value=''> should be fine in this particular case or not.

The change that was made for bug 10710 was for the spec to state that "A label for the button must be provided". So I guess the question I'm asking is, do we want the empty string count as a label in this case, or not (should a conformance checker emit an error message if it's empty)?
Comment 4 Ian 'Hixie' Hickson 2011-01-11 06:26:33 UTC
Good question. I guess we should allow value="" on the basis that sometimes we will fill in the label later, for the same reason we allow empty paragraphs?
Comment 5 Henri Sivonen 2011-01-13 14:09:10 UTC
(In reply to comment #4)
> Good question. I guess we should allow value="" on the basis that sometimes we
> will fill in the label later, for the same reason we allow empty paragraphs?

Makes sense to me.
Comment 6 Ian 'Hixie' Hickson 2011-02-17 02:03:40 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: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter's comments.
Comment 7 contributor 2011-02-17 02:05:15 UTC
Checked in as WHATWG revision r5902.
Check-in comment: Define that <button value=''> (empty) is ok.
http://html5.org/tools/web-apps-tracker?from=5901&to=5902
Comment 8 Michael[tm] Smith 2011-08-04 05:01:44 UTC
mass-moved component to LC1