<?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>95644</bug_id>
          
          <creation_ts>2012-09-01 07:09:19 -0700</creation_ts>
          <short_desc>[Gtk] accessibility/canvas-description-and-role expected results needed</short_desc>
          <delta_ts>2012-09-06 22:08:44 -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>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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>0</everconfirmed>
          <reporter name="Joanmarie Diggs">jdiggs</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>apinheiro</cc>
    
    <cc>dmazzoni</cc>
    
    <cc>webkit.review.bot</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>710235</commentid>
    <comment_count>0</comment_count>
    <who name="Joanmarie Diggs">jdiggs</who>
    <bug_when>2012-09-01 07:09:19 -0700</bug_when>
    <thetext>A new CanvasRole was added to the accessibility code so we have a new layout test in need of expected results.

The thing is, I don&apos;t see why the decision was made to not map CanvasRole to ATK_ROLE_CANVAS. I think the mapping is wrong, thus the expected results which will get generated will also be wrong.

Filing this in Tools / Tests largely as a heads-up to gardeners. I&apos;ll attach a patch which addresses both issues and leave it to someone else to decide how to proceed with the lack of results.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>710237</commentid>
    <comment_count>1</comment_count>
      <attachid>161826</attachid>
    <who name="Joanmarie Diggs">jdiggs</who>
    <bug_when>2012-09-01 07:21:39 -0700</bug_when>
    <thetext>Created attachment 161826
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>710238</commentid>
    <comment_count>2</comment_count>
    <who name="Joanmarie Diggs">jdiggs</who>
    <bug_when>2012-09-01 07:23:35 -0700</bug_when>
    <thetext>Dominic, adding you to the CC here to comment in case CanvasRole really should not be mapped to ATK_ROLE_CANVAS. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>710241</commentid>
    <comment_count>3</comment_count>
      <attachid>161826</attachid>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2012-09-01 07:32:21 -0700</bug_when>
    <thetext>Comment on attachment 161826
Patch

Are the results here the same as for other platforms, thus allowing them to be shared and placed by placing them in a platform-independent results directory?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>710244</commentid>
    <comment_count>4</comment_count>
    <who name="Joanmarie Diggs">jdiggs</who>
    <bug_when>2012-09-01 07:53:57 -0700</bug_when>
    <thetext>They&apos;re quite close, but not exact (pasted below for your convenience).

These differences result from two things:
1. Different ports have different output &quot;just &apos;cuz&quot; (AXCanvas versus canvas).
2. Different ports have different roles.

The former we should try to resolve (though that is a bug bigger than what I have filed here). The latter is a bit tougher. Especially when in certain cases what is being tested requires more of the accessible hierarchy than this particular example because those hierarchies tend to diverge pretty quickly amongst ports.

Mac:
        PASS axContainer.childrenCount is 2
        Canvas 1 description: AXDescription: Canvas label
    --&gt; Canvas 1 role: AXRole: AXImage
        Canvas 2 description: AXDescription:
    --&gt; Canvas 2 role: AXRole: AXGroup

Win: 
        FAIL axContainer.childrenCount should be 2. Was 3.
        Canvas 1 description: Description: Canvas label
    --&gt; Canvas 1 role: graphic
        Canvas 2 description:
    --&gt; Canvas 2 role: graphic

Chromium:
        PASS axContainer.childrenCount is 2
        Canvas 1 description: AXDescription: Canvas label
    --&gt; Canvas 1 role: AXRole: AXCanvas
        Canvas 2 description: AXDescription:
    --&gt; Canvas 2 role: AXRole: AXCanvas

Gtk (Proposed):
        PASS axContainer.childrenCount is 2
        Canvas 1 description: AXDescription: Canvas label
    --&gt; Canvas 1 role: AXRole: canvas
        Canvas 2 description: AXDescription: 
    --&gt; Canvas 2 role: AXRole: canvas</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>710920</commentid>
    <comment_count>5</comment_count>
    <who name="Alejandro Piñeiro">apinheiro</who>
    <bug_when>2012-09-04 02:44:30 -0700</bug_when>
    <thetext>(In reply to comment #0)
&gt; A new CanvasRole was added to the accessibility code so we have a new layout test in need of expected results.
&gt; 
&gt; The thing is, I don&apos;t see why the decision was made to not map CanvasRole to ATK_ROLE_CANVAS. I think the mapping is wrong, thus the expected results which will get generated will also be wrong.

FWIW, I also think that the current WebCore CanvasRole to ATK ATK_ROLE_IMAGE mappping is wrong. ATK_ROLE_CANVAS is the proper mapping.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>711216</commentid>
    <comment_count>6</comment_count>
    <who name="Dominic Mazzoni">dmazzoni</who>
    <bug_when>2012-09-04 10:29:54 -0700</bug_when>
    <thetext>Hi -

I&apos;m sorry for not just mapping to ATK_ROLE_CANVAS right away. I didn&apos;t know how that might affect Orca, so I tried to just keep the same behavior as before with ATK, rather than make assumptions.

The only potential reason to not always map to ATK_ROLE_CANVAS is if you think it&apos;d make sense to distinguish between an interactive canvas and a static one.

For example:

1. &lt;canvas alt=&quot;User image icon&quot; width=100 height=100&gt;&lt;/canvas&gt;

2. &lt;canvas width=100 height=100 id=&quot;monkey_spinner_widget&quot;&gt;
     &lt;label&gt;
       Number of flying monkeys
       &lt;input type=&quot;range&quot; min=0 max=100&gt;
     &lt;/label&gt;
   &lt;/canvas&gt;

In the first case, it might make more sense to use ATK_ROLE_IMAGE since the canvas is just static content, and conceptually it&apos;s just an image. In the second case, from an accessibility perspective the canvas element is just a container for an interactive widget. It&apos;s not conceptually a &quot;graphic&quot; anymore, the canvas element is just a container for interactive content - and the fact that it&apos;s displayed in a graphical canvas is only of secondary importance to a screen reader user.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>711284</commentid>
    <comment_count>7</comment_count>
    <who name="Joanmarie Diggs">jdiggs</who>
    <bug_when>2012-09-04 11:34:46 -0700</bug_when>
    <thetext>(In reply to comment #6)
 
&gt; The only potential reason to not always map to ATK_ROLE_CANVAS is if you think it&apos;d make sense to distinguish between an interactive canvas and a static one.
&gt; 
&gt; For example:
&gt; 
&gt; 1. &lt;canvas alt=&quot;User image icon&quot; width=100 height=100&gt;&lt;/canvas&gt;
&gt; 
&gt; 2. &lt;canvas width=100 height=100 id=&quot;monkey_spinner_widget&quot;&gt;
&gt;      &lt;label&gt;
&gt;        Number of flying monkeys
&gt;        &lt;input type=&quot;range&quot; min=0 max=100&gt;
&gt;      &lt;/label&gt;
&gt;    &lt;/canvas&gt;

The second case is awesome btw. :)

And I do see your point. But in that case it&apos;s not really a platform thing, is it? In other words, case 1 is a static image for all users of all platforms. Thus perhaps in that instance, WebCore a11y should determine that it is ImageRole rather than CanvasRole and only declare CanvasRole for those objects which are functionally canvas.

Thoughts?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>711299</commentid>
    <comment_count>8</comment_count>
    <who name="Dominic Mazzoni">dmazzoni</who>
    <bug_when>2012-09-04 11:43:35 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; And I do see your point. But in that case it&apos;s not really a platform thing, is it? In other words, case 1 is a static image for all users of all platforms. Thus perhaps in that instance, WebCore a11y should determine that it is ImageRole rather than CanvasRole and only declare CanvasRole for those objects which are functionally canvas.

I don&apos;t have strong feelings either way, but you could argue that approach would &quot;lose information&quot; - if a platform didn&apos;t want a static canvas to be an ImageRole, it wouldn&apos;t have a way to do that.

I just felt it was the most clear for WebCore to always call a canvas a canvas - but provide platforms with enough information to distinguish between static and dynamic canvases *if they want*.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>711306</commentid>
    <comment_count>9</comment_count>
    <who name="Joanmarie Diggs">jdiggs</who>
    <bug_when>2012-09-04 11:48:52 -0700</bug_when>
    <thetext>(In reply to comment #8)

&gt; I just felt it was the most clear for WebCore to always call a canvas a canvas - but provide platforms with enough information to distinguish between static and dynamic canvases *if they want*.

Gotcha. Sounds good to me.

Martin (or anyone else with reviewer status): Please review so that Gtk maps a WebCore accessible CanvasRole to ATK_ROLE_CANVAS and that we also have expected test results. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>711881</commentid>
    <comment_count>10</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2012-09-05 03:03:33 -0700</bug_when>
    <thetext>*** Bug 95825 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>714102</commentid>
    <comment_count>11</comment_count>
      <attachid>161826</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-09-06 22:08:41 -0700</bug_when>
    <thetext>Comment on attachment 161826
Patch

Clearing flags on attachment: 161826

Committed r127825: &lt;http://trac.webkit.org/changeset/127825&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>714103</commentid>
    <comment_count>12</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-09-06 22:08:44 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>161826</attachid>
            <date>2012-09-01 07:21:39 -0700</date>
            <delta_ts>2012-09-06 22:08:41 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-95644-20120901102125.patch</filename>
            <type>text/plain</type>
            <size>3722</size>
            <attacher name="Joanmarie Diggs">jdiggs</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTI3MzcwCmRpZmYgLS1naXQgY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