<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>14601</bug_id>
          
          <creation_ts>2011-10-30 20:57:19 +0000</creation_ts>
          <short_desc>Investigate if support for &lt;a&gt; inside image maps should be brought back to HTML</short_desc>
          <delta_ts>2011-11-02 21:17:00 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Olli Pettay">bugs</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
    
    <cc>Ms2ger</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>59242</commentid>
    <comment_count>0</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2011-10-30 20:57:19 +0000</bug_when>
    <thetext>http://www.whatwg.org/specs/web-apps/current-work/#the-map-element
has an example where &lt;map&gt; contains both &lt;a&gt; and &lt;area&gt; elements.
That would become significantly simpler if image maps could handle anchor
elements similarly (perhaps not exactly the same way) as in HTML4.

I was actually writing a gecko patch to remove support for &lt;a&gt; in image maps, but
had all the time the feeling that I&apos;m removing something useful
and decided to not to remove the support after all - at least not right now.

The difference to HTML4 could be that area/a element handling could be simplified.
All the area and a elements underneath map could be taken account.
Or something like that. Whatever is most backward compatible

(I don&apos;t feel really strong about this issue, but seems like the
issue wasn&apos;t ever discussed properly.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59364</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-11-01 05:54:45 +0000</bug_when>
    <thetext>It was discussed in quite a lot of depth and based on solid numbers from one of the Google crawls a few years ago. How would you like it to be investigated further?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59386</commentid>
    <comment_count>2</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2011-11-01 12:03:57 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; It was discussed in quite a lot of depth
I wish I could find where it was discussed, and what were the arguments.


&gt;  and based on solid numbers from one of
&gt; the Google crawls a few years ago.
that is not important. HTML spec adds also new (IMO less useful) stuff which
isn&apos;t used anywhere. &lt;a&gt; in a map is just an HTML4 feature not implemented widely.
It could be implemented properly everywhere.

I was also thinking to use image map for &lt;canvas&gt;, but apparently that
approach hasn&apos;t gain support when discussing how to handle a11y
for canvas. I don&apos;t know yet why.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59387</commentid>
    <comment_count>3</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2011-11-01 12:05:09 +0000</bug_when>
    <thetext>I&apos;ll ask around and try to search some reasoning for both dropping
support for &lt;a&gt; and not supporting image map in canvas.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59390</commentid>
    <comment_count>4</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2011-11-01 13:34:16 +0000</bug_when>
    <thetext>I found http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2005-April/003508.html
But nothing there indicates that there was an agreement to drop support for
&lt;a&gt;. Searching some more...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59410</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-11-01 16:27:48 +0000</bug_when>
    <thetext>Decisions are not based on consensus, so I wouldn&apos;t look for an agreement.

Here&apos;s the lay out of the land regarding using &lt;a&gt; for image maps:
 - it&apos;s not supported by many browsers
 - it&apos;s used by very few authors
 - it provides functionality redundant with &lt;area&gt;, which is widely supported and widely used
 - it is positioned to allow for better fallback, but does not, since &lt;area&gt; is required to be supported by all user agents, including those that don&apos;t do graphical image maps. 
 - it has a commensurate cost for implementations, testing, tutorials, and speccing.
 - it has an additional cost due to the introduction of the possibility that an &lt;a&gt; element will be focused but that the focus won&apos;t be on the page where the &lt;a&gt; element is displayed, but will instead be where the image map is (with &lt;area&gt; elements, they can _only_ be focused in the image map, so it&apos;s not as huge a deal).

It&apos;s true that sometimes you will want to use both &lt;a&gt; and &lt;area&gt; for the same link. In fact, there are many more times where you&apos;ll want to use &lt;a&gt; twice for the same link, or &lt;a&gt; and &lt;link&gt;. This in itself is not a reason to require that the same element be used for both. Consider, in particular, the example in the &lt;map&gt; section in the spec. It is equivalent to a page with this structure:

 &lt;HEADER&gt;
  &lt;H1&gt;Toys&lt;/H1&gt;
  &lt;A HREF=&quot;/clothes/&quot;&gt;Clothes&lt;/A&gt;
  &lt;A HREF=&quot;/toys/&quot;&gt;Toys&lt;/A&gt;
  &lt;A HREF=&quot;/food/&quot;&gt;Food&lt;/A&gt;
  &lt;A HREF=&quot;/books/&quot;&gt;Books&lt;/A&gt;
 &lt;/HEADER&gt;
  ...
 &lt;FOOTER&gt;
  &lt;A HREF=&quot;/clothes/&quot;&gt;Clothes&lt;/A&gt;
  &lt;A HREF=&quot;/toys/&quot;&gt;Toys&lt;/A&gt;
  &lt;A HREF=&quot;/food/&quot;&gt;Food&lt;/A&gt;
  &lt;A HREF=&quot;/books/&quot;&gt;Books&lt;/A&gt;
 &lt;/FOOTER&gt;

The only difference is that the first set of links is actually done as an image, so it needs an image map, and so the &lt;AREA&gt; elements have to be put somewhere. Since the page has these links twice, a simple place to put the links is at the bottom. It&apos;s not like they&apos;re the same link, though. It&apos;s quite possible, in fact, that the page would look like this:

 &lt;HEADER&gt;
  &lt;H1&gt;Toys&lt;/H1&gt;
  &lt;A HREF=&quot;/clothes/#top&quot;&gt;Clothes&lt;/A&gt;
  &lt;A HREF=&quot;/toys/#top&quot;&gt;Toys&lt;/A&gt;
  &lt;A HREF=&quot;/food/#top&quot;&gt;Food&lt;/A&gt;
  &lt;A HREF=&quot;/books/#top&quot;&gt;Books&lt;/A&gt;
 &lt;/HEADER&gt;
  ...
 &lt;FOOTER&gt;
  &lt;A HREF=&quot;/clothes/#bottom&quot;&gt;Clothes&lt;/A&gt;
  &lt;A HREF=&quot;/toys/#bottom&quot;&gt;Toys&lt;/A&gt;
  &lt;A HREF=&quot;/food/#bottom&quot;&gt;Food&lt;/A&gt;
  &lt;A HREF=&quot;/books/#bottom&quot;&gt;Books&lt;/A&gt;
 &lt;/FOOTER&gt;

An author would still need somewhere to put the image map links, and might still put them with the other links. But it doesn&apos;t argue for reusing the same &lt;A&gt; element for two links.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59527</commentid>
    <comment_count>6</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-11-02 20:53:14 +0000</bug_when>
    <thetext>Based on comment 5 and further thought on the topic, I come to the same conclusion that I did before: removing this subfeature of &lt;a&gt; is a net win.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59531</commentid>
    <comment_count>7</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2011-11-02 21:17:00 +0000</bug_when>
    <thetext>Ok.
I disagree, but I don&apos;t care enough about the issue to reopen this bug.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>