<?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>16125</bug_id>
          
          <creation_ts>2012-02-26 20:29:33 +0000</creation_ts>
          <short_desc>Validation of image(s) that form(s) a link or button</short_desc>
          <delta_ts>2017-11-08 11:53:31 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML Checker</product>
          <component>General</component>
          <version>unspecified</version>
          <rep_platform>HP</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>http://dev.w3.org/html5/spec/the-img-element.html#a-link-or-button-containing-nothing-but-the-image</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="Leif Halvard Silli">xn--mlform-iua</reporter>
          <assigned_to name="Michael[tm] Smith">mike+validator</assigned_to>
          <cc>bhawkeslewis</cc>
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>64627</commentid>
    <comment_count>0</comment_count>
    <who name="Leif Halvard Silli">xn--mlform-iua</who>
    <bug_when>2012-02-26 20:29:33 +0000</bug_when>
    <thetext>Spec says:

]] When an a element that creates a hyperlink, or a button element, has
no textual content but contains one or more images, the alt attributes
must contain text that together convey the purpose of the link or
button.[[

Therefore one would expect that the following examples would trigger errors:

  &lt;a href=foo &gt;&lt;img src=bar alt=&apos;&apos;&quot; &gt;&lt;/a&gt;
  &lt;a href=foo &gt;&lt;object data=bar type=&quot;image/gif&quot;&gt;&lt;/object&gt;&lt;/a&gt;
  &lt;button type=button &gt;&lt;img src=bar alt=&quot;&quot; &gt;&lt;/button&gt;
  &lt;button type=button &gt;&lt;object data=bar type=&quot;image/gif&quot; &gt;&lt;/object&gt;&lt;/button&gt;
   
But currently, as the validator considers the above examples as valid. Please fix.

See message to public-html/public-html-a11y:  
http://lists.w3.org/Archives/Public/public-html/2012Feb/0407</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>