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 7729 - input type image validation error against value attribute
Summary: input type image validation error against value attribute
Status: RESOLVED WORKSFORME
Alias: None
Product: HTML Checker
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Henri Sivonen
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-25 20:51 UTC by Kevin Peno
Modified: 2015-08-23 07:06 UTC (History)
1 user (show)

See Also:


Attachments

Description Kevin Peno 2009-09-25 20:51:58 UTC
<input type="image" name="submit" value="submit" src="/images/ui-login.png" class="submit"/>

This should be invalid against HTML5 because it contains the value attribute. This works properly. HOWEVER, the follow also fails:

<input type="image" name="submit" src="/images/ui-login.png" class="submit"/>

the error given is:
"Required attributes missing on element input."

Error #2 does not conform with http://www.whatwg.org/specs/web-apps/current-work/#image-button-state which states under "bookkeeping details" that: "The element's value attribute must be omitted"
Comment 1 Ville Skyttä 2009-09-26 20:31:37 UTC
These messages come directly from validator.nu, assigning to upstream for comments.
Comment 2 Michael[tm] Smith 2010-06-14 09:08:53 UTC
For input/@type=image (input elements with the value of the type attribute attribute set to "image"), the alt attribute is required.

So you need to do:

  <input type="image" alt="foo bar baz" name="submit" src="/images/ui-login.png" class="submit"/>

I realize that the "Required attributes missing on element input." message is not very helpful at all and we have made some backend changes to improve the error-reporting for this case. Please test again here:

http://qa-dev.w3.org:8888/