Last Comment Bug 392994 - Remove Support for the usemap Attribute on <input type=image> Elements
: Remove Support for the usemap Attribute on <input type=image> Elements
Status: NEW
:
Product: Core
Classification: Components
Component: HTML: Form Submission (show other bugs)
: Trunk
: x86 Windows XP
: -- normal with 1 vote (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
http://lists.whatwg.org/pipermail/wha...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-20 22:18 PDT by Lachlan Hunt
Modified: 2007-09-03 00:29 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Lachlan Hunt 2007-08-20 22:18:44 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6

Image maps on <input type=image> are currently supported (see bug 31188).

The URL given above provides some details about a survey conducted by Hixie, which lists a few hundred pages that use image maps on inputs (many of which break in Firefox) and provides some statistics of its use.  Some additional analysis of those pages in the survey is provided here.

http://lists.w3.org/Archives/Public/public-html/2007Aug/0506.html

This should be removed for the following reasons:

1. IE and Safari do not support this.

2. Very few sites use this, and many that do function better in browsers that don't.

3. The insignificant portion of sites that do rely on this to some degree are already broken in IE, and are outweighed by those that depend on it not working.

4. As its currently implemented, it provides no functionality beyond that provided by <img usemap>.

5. HTML5 currently will not be including the usemap attribute on input elements.

6. It appears that the intended purpose of it in HTML4 was to provide an accessible alternative to server-side image maps for form submission. But since, as it's currently implemented, image maps on input elements do not provide form submission, no accessibility benefits are achieved.

7. No significant use cases for client site image map form submission exist which cannot already be provided using alternative techniques.

Reproducible: Always

Steps to Reproduce:
1. Go to some of the pages listed in survey
2. Locate the input elements that use usemap
3. Click the region covered by an <area>
4. The form should submit, but doesn't
5. Compare with a browser that doesn't support usemap on input
Actual Results:  
The <area> covering the input prevents the form submission and creates usability problems.

Expected Results:  
The forms should submit.
Comment 1 Robert Burns 2007-08-20 22:32:31 PDT
This bug is incorrect. The bug is not the support for usemap. The bug is that with <input type='image' usemap='map'> Firefox does not properly submit the form. The proportion of pages that try to use this feature is very very very small (because each browser gets it wrong in one way or another).  However Firefox has the more serious bug in getting wrong by not submitting the form when the mapped image is clicked.
Comment 2 Hixie (not reading bugmail) 2007-08-20 22:34:08 PDT
Point 2 being the main one here. We can get better compatibility with sites by dropping this.
Comment 3 Robert Burns 2007-08-20 22:57:22 PDT
(In reply to comment #2)
> Point 2 being the main one here. We can get better compatibility with sites by
> dropping this.
> 

No, all that's required for compatibility is to submit the form.
Comment 4 Robert Burns 2007-08-20 23:06:14 PDT
(In reply to comment #0) 
> The URL given above provides some details about a survey conducted by Hixie,
> which lists a few hundred pages that use image maps on inputs (many of which
> break in Firefox) and provides some statistics of its use.  Some additional
> analysis of those pages in the survey is provided here.
> 
> http://lists.w3.org/Archives/Public/public-html/2007Aug/0506.html

One thing to keep in mind is that this survey failed to look for all examples of <input type=image usemap=map>. In particular it neglected to sample the most common case where the image map inlucded areas that did not have href attributes set on them. This is more likely the way the image maps for <input type=image> would be used.
 
> 3. The insignificant portion of sites that do rely on this to some degree are
> already broken in IE, and are outweighed by those that depend on it not
> working.

The sites are not broken in IE. They submit properly. They just do not provide any of the usemap functionality in IE. In other words IE, is broken but in not as serious a way as Gecko.

> 4. As its currently implemented, it provides no functionality beyond that
> provided by <img usemap>.

yes, that's the bug. It doesn't work as a submit button the way <input type='image' is supposed to work>

> 5. HTML5 currently will not be including the usemap attribute on input
> elements.

HTML5 is not even at public working draft status yet. Still too soon to cite it.
 
Comment 5 Jesse Ruderman 2007-08-20 23:44:10 PDT
See also bug 392997, about the failure to submit the form.

Note You need to log in before you can comment on or make changes to this bug.