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

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>63463</bug_id>
          
          <creation_ts>2011-06-27 09:06:02 -0700</creation_ts>
          <short_desc>AX: Support HTML5 Canvas AX with hit regions</short_desc>
          <delta_ts>2014-10-06 11:04:50 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Accessibility</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Charles Pritchard">chuck</reporter>
          <assigned_to name="Charles Pritchard">chuck</assigned_to>
          <cc>chuck</cc>
    
    <cc>faulkner.steve</cc>
    
    <cc>jcraig</cc>
    
    <cc>lquinn</cc>
    
    <cc>mdelaney7</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>427990</commentid>
    <comment_count>0</comment_count>
    <who name="Charles Pritchard">chuck</who>
    <bug_when>2011-06-27 09:06:02 -0700</bug_when>
    <thetext>Currently, mobile safari treats Canvas as an untitled image. Activating pointer events on the element is difficult.

Related issue/patch for keyboard events:
https://bugs.webkit.org/show_bug.cgi?id=50126</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>876131</commentid>
    <comment_count>1</comment_count>
    <who name="James Craig">jcraig</who>
    <bug_when>2013-04-15 16:38:45 -0700</bug_when>
    <thetext>Add a test case of accessible canvas example. Otherwise will have to close as insufficient information.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>876153</commentid>
    <comment_count>2</comment_count>
    <who name="Charles Pritchard">chuck</who>
    <bug_when>2013-04-15 17:04:29 -0700</bug_when>
    <thetext>&lt;canvas role=&quot;button&quot; aria-describedby=&quot;button&quot; onclick=&quot;button.onclick()&quot;&gt;
&lt;button id=&quot;button&quot;&gt;I am a button&lt;/button&gt;
&lt;/canvas&gt;

Mobile Safari should support the new addHitRegion semantics:
http://www.w3.org/html/wg/drafts/2dcontext/html5_canvas/#dom-context-2d-addhitregion

&lt;canvas id=&quot;canvas&quot; role=&quot;application&quot;&gt;
&lt;button id=&quot;button&quot;&gt;I am a button&lt;/button&gt;
&lt;/canvas&gt;

var ctx = canvas.getContext(&apos;2d&apos;);
ctx.rect(0,0,100,100);
ctx.addHitRegion({control: button});



Those two items should both work in VoiceOver with Mobile Safari to allow a user to drag their finger over the rectangle with VoiceOver reporting that the area is a button. In the latter case, only the first 100x100 pixels (the rect).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>877182</commentid>
    <comment_count>3</comment_count>
    <who name="James Craig">jcraig</who>
    <bug_when>2013-04-17 08:14:18 -0700</bug_when>
    <thetext>Please upload that as an HTML test case.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>952135</commentid>
    <comment_count>4</comment_count>
    <who name="James Craig">jcraig</who>
    <bug_when>2013-11-19 10:37:30 -0800</bug_when>
    <thetext>&lt;rdar://problem/15504587&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>952146</commentid>
    <comment_count>5</comment_count>
    <who name="James Craig">jcraig</who>
    <bug_when>2013-11-19 11:23:05 -0800</bug_when>
    <thetext>Note that button is a null reference in your partial example, I assume you meant to use document.getElementById(&apos;button&apos;);</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1012430</commentid>
    <comment_count>6</comment_count>
    <who name="Charles Pritchard">chuck</who>
    <bug_when>2014-05-29 08:25:19 -0700</bug_when>
    <thetext>Chrome (Blink):
https://code.google.com/p/chromium/issues/detail?id=328961
Code review/patch (Blink):
https://codereview.chromium.org/287163007/

Firefox (Gecko):
https://bugzilla.mozilla.org/show_bug.cgi?id=966591
https://bugzilla.mozilla.org/show_bug.cgi?id=979692


Please note the following code sample may be outdated. Will check back in a few weeks to see if Blink and Gecko have converged and have an example using a DOM element.


Code sample (from Firefox):

&lt;canvas id=&quot;input&quot;&gt;&lt;/canvas&gt;

var ctx = input.getContext(&quot;2d&quot;);
ctx.beginPath();
ctx.rect(20, 20, 100, 75);
ctx.fill();
ctx.addHitRegion({id: &quot;a&quot;});


var regionId = &quot;&quot;;
input.addEventListener(&apos;mousedown&apos;, function(evt){
 regionId = evt.region;
});</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1012522</commentid>
    <comment_count>7</comment_count>
    <who name="James Craig">jcraig</who>
    <bug_when>2014-05-29 16:37:06 -0700</bug_when>
    <thetext>Please upload that as an HTML test case.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>