W3C home > Mailing lists > Public > www-validator@w3.org > May 2010

Re: value attribute on image type input

From: David Dorward <david@dorward.me.uk>
Date: Fri, 14 May 2010 19:19:45 +0100
Cc: www-validator@w3.org
Message-Id: <6B5B3434-277F-4E59-865F-E116767C89E5@dorward.me.uk>
To: MEM <talofo@gmail.com>
On 12 May 2010, at 17:27, MEM wrote:

> In order to have the form properly processed on the server side I need
> to add the value property on my image type input field, like so:

Browsers are inconsistent about sending the value of server side image maps. Some browsers send it, some send only the x/y co-ordinates. It is a very poor idea to depend on it being sent.

> However, when I validate, I'm getting the following error message on
> the validator:
> Line 152, Column 151: Attribute value not allowed on element input at
> this point.

I don't recognise this style of error message, which suggests that you are using HTML 5 mode.

From the draft HTML 5 specification:

	The element's value attribute must be omitted.


So this is not a bug. I assume the attribute was forbidden because common current browsers fail to implement it so that while it would be backwards compatible with HTML 4, it is not compatible with browsers in practice. 

> Element-specific attributes for element input:

>    value

If this is output from the validator, then the list of acceptable attributes is a bug, but the reporting that the value attribute is forbidden is not.

David Dorward
Received on Friday, 14 May 2010 18:20:29 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:59:17 UTC