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 13318 - Input of type image gives "attribute value not allowed" error on tag end character
Summary: Input of type image gives "attribute value not allowed" error on tag end char...
Status: RESOLVED WORKSFORME
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC other
: P2 normal
Target Milestone: ---
Assignee: Michael[tm] Smith
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-21 16:52 UTC by Andy S
Modified: 2015-08-23 07:07 UTC (History)
0 users

See Also:


Attachments

Description Andy S 2011-07-21 16:52:59 UTC
The following snippet of an image input does not validate:

<input type="image" src="/images/searchbutton.gif" id="searchsubmit" value="Search" alt="Search" class="search-button" />


The error specified is:

Line 36, Column 121: Attribute value not allowed on element input at this point.

ton.gif" id="searchsubmit" value="Search" alt="Search" class="search-button" />


The "attribute value" highlighted is the tag end character (">").

Other types of inputs validate in the same place. The snippet validates in XHTML, and, AFAIK, contains no illegal or malformed attributes.

Probably not relevant, but:
OS: Windows 7
Browser: Firefox 5.0
Comment 1 Michael[tm] Smith 2011-07-29 08:41:40 UTC
The error message is correct; the "value" attribute is not allowed on the input element when its type is "image":

  http://dev.w3.org/html5/spec/number-state.html#image-button-state

See the "Bookkeeping details" section -- in particular this part:

  "The element's value attribute must be omitted."
Comment 2 Andy S 2011-08-01 22:42:11 UTC
Thanks for clarifying; I was misinterpreting the error message. I think it's a little confusing, as attributes have values. Thus, I parsed it as "Attribute value not allowed on element 'input' at this point." instead of "Attribute 'value' not allowed on element 'input' at this point."