<?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>17630</bug_id>
          
          <creation_ts>2012-06-28 14:48:23 +0000</creation_ts>
          <short_desc>Image inputs with no image should fall back to non-replaced elements, just like normal images</short_desc>
          <delta_ts>2013-04-12 22:58:49 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#images</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2015 Q1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>69490</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-06-28 14:48:23 +0000</bug_when>
    <thetext>Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html
Multipage: http://www.whatwg.org/C#images
Complete: http://www.whatwg.org/c#images

Comment:
Image inputs with no image should fall back to non-replaced elements, just
like normal images

Posted from: 98.110.194.72 by bzbarsky@mit.edu
User agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:16.0) Gecko/16.0 Firefox/16.0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69491</commentid>
    <comment_count>1</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-06-28 14:52:20 +0000</bug_when>
    <thetext>And in particular, the text in the spec makes it very likely that the alt text will be cut off.  The difference from normal image behavior seems pretty unnecessary and confusing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70983</commentid>
    <comment_count>2</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-07-18 17:51:58 +0000</bug_when>
    <thetext>This bug was cloned to create bug 18258 as part of operation convergence.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>73083</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-08-30 19:08:28 +0000</bug_when>
    <thetext>The spec says:

&quot;When an input element whose type attribute is in the Image Button state does not represent an image and the user agent does not expect this to change, the element is expected to be treated as a replaced element consisting of a button whose content is the element&apos;s alternative text. The intrinsic dimensions of the button are expected to be about one line in height and whatever width is necessary to render the text on one line.&quot;

Why would rendering it as inline text be better? Surely rendering as a button is more appropriate.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79169</commentid>
    <comment_count>4</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-11-30 07:56:50 +0000</bug_when>
    <thetext>It&apos;s common for web pages to style image inputs with a width and height.  So while a button is more appropriate if the alt text is short, in practice doing that makes the alt text pretty much useless to the user.  :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80710</commentid>
    <comment_count>5</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-12-30 05:44:24 +0000</bug_when>
    <thetext>The text I quoted doesn&apos;t mention the height and width attributes; it explicitly says the text shouldn&apos;t be cut off. I don&apos;t understand the problem here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80713</commentid>
    <comment_count>6</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-12-30 06:18:05 +0000</bug_when>
    <thetext>The width and height attributes are mapped into style, so if the object is not a non-replaced inline, they affect the rendered size.  And then your options are overflowing (hence overlapping, hence unreadable) text, or text that&apos;s cut off.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80726</commentid>
    <comment_count>7</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-12-30 19:34:17 +0000</bug_when>
    <thetext>Ok, I&apos;ve made height/width not apply in this case. Is that sufficient?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80728</commentid>
    <comment_count>8</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-12-30 19:35:22 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r7614.
Check-in comment: Make width/height attributes not apply to &lt;input type=image src=404&gt; so that the button text doesn&apos;t get cut off in the common case.
http://html5.org/tools/web-apps-tracker?from=7613&amp;to=7614</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80735</commentid>
    <comment_count>9</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-12-30 20:19:24 +0000</bug_when>
    <thetext>I&apos;ll need to think about it.  There are likely to still be issues if the text is wide enough to not fit in the viewport, unfortunately,</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80743</commentid>
    <comment_count>10</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-12-31 03:40:27 +0000</bug_when>
    <thetext>It&apos;s a submit button, a wide label isn&apos;t likely to be correct anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80784</commentid>
    <comment_count>11</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-12-31 06:49:27 +0000</bug_when>
    <thetext>That&apos;s possible, but I&apos;m not clear on why we want these to have different behavior from &lt;img&gt;, exactly.....</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80805</commentid>
    <comment_count>12</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-01-01 03:18:21 +0000</bug_when>
    <thetext>Because they&apos;re interactive submit buttons, not inline text like &lt;img&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80806</commentid>
    <comment_count>13</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2013-01-01 04:22:35 +0000</bug_when>
    <thetext>&lt;img onclick&gt; is an interactive button too...

Basically, the distinction seems arbitrary to me.  Which correspondingly means that implementing anything like this is very low priority, of course.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80917</commentid>
    <comment_count>14</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-01-05 02:13:06 +0000</bug_when>
    <thetext>&lt;img onclick&gt; for a button is like &lt;span onclick&gt; for a link or &lt;div onclick&gt; for a button. Not good practice. &lt;img onclick&gt; is more correctly used not as a button, but as a piece of text or image that has some interaction (this is a similar distinction between a link and a button).

Understood about implementation priorities, of course.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86098</commentid>
    <comment_count>15</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2013-04-12 22:58:49 +0000</bug_when>
    <thetext>I&apos;m leaving the spec as-is here, since even though this isn&apos;t widely implemented as per the spec, there doesn&apos;t seem to be a compat reason _not_ to do it as per the spec, and what the spec suggests seems (slightly) better. So it&apos;s one of those things that we&apos;ll hope implementors eventually get to, even if it does take a while. (If there&apos;s a compat reason not to do this, though, please do reopen.)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>