<?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>92100</bug_id>
          
          <creation_ts>2012-07-24 04:46:38 -0700</creation_ts>
          <short_desc>[Gtk] accessibility/canvas-accessibilitynodeobject.html is failing</short_desc>
          <delta_ts>2017-03-11 10:49:31 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Gtk, LayoutTestFailure</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>98347</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Zan Dobersek">zan</reporter>
          <assigned_to name="Dominic Mazzoni">dmazzoni</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>dmazzoni</cc>
    
    <cc>jdiggs</cc>
    
    <cc>mario</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>676661</commentid>
    <comment_count>0</comment_count>
    <who name="Zan Dobersek">zan</who>
    <bug_when>2012-07-24 04:46:38 -0700</bug_when>
    <thetext>The test fails since it has been (re)introduced in r123428[1].

Here&apos;s the diff from the 64-bit debug builder (but the test fails on all the other builders as well):
--- /home/slave/webkitgtk/gtk-linux-64-debug/build/layout-test-results/accessibility/canvas-accessibilitynodeobject-expected.txt
+++ /home/slave/webkitgtk/gtk-linux-64-debug/build/layout-test-results/accessibility/canvas-accessibilitynodeobject-actual.txt
@@ -4,16 +4,16 @@
 On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
 
 
-PASS axRenderObjects.length is axNodeObjects.length
-PASS i == 0; axRenderObject.role == axNodeObject.role is true
-PASS i == 1; axRenderObject.role == axNodeObject.role is true
-PASS i == 2; axRenderObject.role == axNodeObject.role is true
-PASS i == 3; axRenderObject.role == axNodeObject.role is true
-PASS i == 4; axRenderObject.role == axNodeObject.role is true
-PASS i == 5; axRenderObject.role == axNodeObject.role is true
-PASS i == 6; axRenderObject.role == axNodeObject.role is true
-PASS i == 7; axRenderObject.role == axNodeObject.role is true
-PASS i == 8; axRenderObject.role == axNodeObject.role is true
+FAIL axRenderObjects.length should be 25. Was 9.
+FAIL i == 0; axRenderObject.role == axNodeObject.role should be true. Was false.
+FAIL i == 1; axRenderObject.role == axNodeObject.role should be true. Was false.
+FAIL i == 2; axRenderObject.role == axNodeObject.role should be true. Was false.
+FAIL i == 3; axRenderObject.role == axNodeObject.role should be true. Was false.
+FAIL i == 4; axRenderObject.role == axNodeObject.role should be true. Was false.
+FAIL i == 5; axRenderObject.role == axNodeObject.role should be true. Was false.
+FAIL i == 6; axRenderObject.role == axNodeObject.role should be true. Was false.
+FAIL i == 7; axRenderObject.role == axNodeObject.role should be true. Was false.
+FAIL i == 8; axRenderObject.role == axNodeObject.role should be true. Was false.
 PASS successfullyParsed is true
 
 TEST COMPLETE

[1] - http://trac.webkit.org/changeset/123428</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>676770</commentid>
    <comment_count>1</comment_count>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2012-07-24 06:54:20 -0700</bug_when>
    <thetext>Adding Dominic to CC, just in case he could help us figure out the problem here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>676806</commentid>
    <comment_count>2</comment_count>
    <who name="Dominic Mazzoni">dmazzoni</who>
    <bug_when>2012-07-24 07:45:56 -0700</bug_when>
    <thetext>Thanks. I&apos;ll take a look, I might know what could cause this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>677200</commentid>
    <comment_count>3</comment_count>
      <attachid>154141</attachid>
    <who name="Dominic Mazzoni">dmazzoni</who>
    <bug_when>2012-07-24 14:20:00 -0700</bug_when>
    <thetext>Created attachment 154141
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>677201</commentid>
    <comment_count>4</comment_count>
    <who name="Dominic Mazzoni">dmazzoni</who>
    <bug_when>2012-07-24 14:20:21 -0700</bug_when>
    <thetext>OK, I see what&apos;s going on.

In the second half of the test, it recursively explores all descendants of the canvas. It tries to distinguish between links and controls and other nodes based on whether they&apos;re focusable or not.

But in the GTK port, all text nodes are reported as focusable according to ATK. I think that&apos;s because of how Orca uses caret browsing to move throughout the page, right?

This patch is a bit of a hack - I don&apos;t have a GTK build, could someone try it and see if it fixes the issue, and send me a diff otherwise?

I will definitely do a cleaner fix after I&apos;ve implemented more of AccessibilityNodeObject.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>677800</commentid>
    <comment_count>5</comment_count>
    <who name="Mario Sanchez Prada">mario</who>
    <bug_when>2012-07-25 01:58:54 -0700</bug_when>
    <thetext>Thanks Dominic for the prompt reply.

(In reply to comment #4)
&gt; OK, I see what&apos;s going on.
&gt; 
&gt; In the second half of the test, it recursively explores all descendants of 
&gt; the canvas. It tries to distinguish between links and controls and other 
&gt; nodes based on whether they&apos;re focusable or not.
&gt; 
&gt; But in the GTK port, all text nodes are reported as focusable according to 
&gt; ATK. I think that&apos;s because of how Orca uses caret browsing to move throughout 
&gt; the page, right?

Yeah, exactly. 

&gt; This patch is a bit of a hack - I don&apos;t have a GTK build, could someone try 
&gt; it and see if it fixes the issue, and send me a diff otherwise?

The patch works here too, but I think we are hiding a bigger bug by writing the Layout test like that.

As I can see in Accerciser, without the patch applied, for the first list (axRenderObjects) everything seems to be normal in the a11y hierarchy:

  section (not in the list, role of the parent AX object)
    link
    push button
    entry
    check box
    radio button
    push button
    combo box
      menu
        menu item
        menu item
    push button
    link

However, for the second list (axNodeObjects), I see this:

  image (not in the list, role of the parent AX object)
    text
    link
    text
    push button
    text
    entry
    text
    check box
    text
    radio button
    text
    push button
    text
    combo box
      text
      text
    text
    push button
    text
    link
    text

Even the subtree under combo box seems to be wrong in that case!

So, assuming the hierarchies should be identical (shouldn&apos;t they?) in those two cases, I guess the main issue we are seeing here is that the AX hierarchy is not being properly generated in the second case, not sure if that&apos;s because of having an AXObject of role &apos;image&apos; as the root for the subtree, if that&apos;s because of the associated HTML node being a &lt;canvas&gt; or because of something else.

What do you think? Does that make sense?

&gt; I will definitely do a cleaner fix after I&apos;ve implemented more of AccessibilityNodeObject.

I think the most sane thing here, in order not to hide a bigger bug if it&apos;s there, would be to keep this bug open with the test in TestExpectations as it is now and file a new bug for this issue with the a11y trees, if we agree that&apos;s the problem behind all this.

But prior to filing that new bug, I would like to hear what do you think about all this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>678959</commentid>
    <comment_count>6</comment_count>
    <who name="Dominic Mazzoni">dmazzoni</who>
    <bug_when>2012-07-26 00:38:35 -0700</bug_when>
    <thetext>&gt; So, assuming the hierarchies should be identical (shouldn&apos;t they?) in those two cases, I guess the main issue we are seeing here is that the AX hierarchy is not being properly generated in the second case, not sure if that&apos;s because of having an AXObject of role &apos;image&apos; as the root for the subtree, if that&apos;s because of the associated HTML node being a &lt;canvas&gt; or because of something else.

Yes, this is not surprising. I just checked in a change that makes it possible for nodes in a canvas subtree to be accessible. These nodes do not have renderers, so I created a new class, AccessibilityNodeObject. This is still incomplete, I&apos;ve only implemented a few of the methods - over time I&apos;ll try to migrate as much as possible from AccessibilityRenderObject to AccessibilityNodeObject.

However, even when it&apos;s done, there will be some minor differences between the ax tree generated from Nodes and the ax tree generated from RenderObjects. I doubt it will matter; the only purpose is to create accessible fallback content for widgets built using canvas.

It&apos;s possible that AccessibilityNodeObject isn&apos;t handling whitespace the same way? Either way, I&apos;ll look into it.

&gt; I think the most sane thing here, in order not to hide a bigger bug if it&apos;s there, would be to keep this bug open with the test in TestExpectations as it is now and file a new bug for this issue with the a11y trees, if we agree that&apos;s the problem behind all this.

Sounds good.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>154141</attachid>
            <date>2012-07-24 14:20:00 -0700</date>
            <delta_ts>2012-07-24 14:20:00 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-92100-20120724141951.patch</filename>
            <type>text/plain</type>
            <size>1636</size>
            <attacher name="Dominic Mazzoni">dmazzoni</attacher>
            
              <data encoding="base64">SW5kZXg6IExheW91dFRlc3RzL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBMYXlvdXRUZXN0cy9D
aGFuZ2VMb2cJKHJldmlzaW9uIDEyMzUyNikKKysrIExheW91dFRlc3RzL0NoYW5nZUxvZwkod29y
a2luZyBjb3B5KQpAQCAtMSwzICsxLDE0IEBACisyMDEyLTA3LTI0ICBEb21pbmljIE1henpvbmkg
IDxkbWF6em9uaUBnb29nbGUuY29tPgorCisgICAgICAgIFtHdGtdIGFjY2Vzc2liaWxpdHkvY2Fu
dmFzLWFjY2Vzc2liaWxpdHlub2Rlb2JqZWN0Lmh0bWwgaXMgZmFpbGluZworICAgICAgICBodHRw
czovL2J1Z3Mud2Via2l0Lm9yZy9zaG93X2J1Zy5jZ2k/aWQ9OTIxMDAKKworICAgICAgICBSZXZp
ZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAgICBBZGRpdGlvbmFsIGluZm9ybWF0aW9u
IG9mIHRoZSBjaGFuZ2Ugc3VjaCBhcyBhcHByb2FjaCwgcmF0aW9uYWxlLiBQbGVhc2UgYWRkIHBl
ci1mdW5jdGlvbiBkZXNjcmlwdGlvbnMgYmVsb3cgKE9PUFMhKS4KKworIC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5yb2xlLnRvTG93ZXJDYXNlKCkuaW5kZXhPZigndGV4dCcpID09IC0xIHx8CisgICAgICAg
ICAgICAgICAgIGF4Q2hpbGQucm9sZS50b0xvd2VyQ2FzZSgpLmluZGV4T2YoJ2ZpZWxkJykgPj0g
MCkpIHsKICAgICAgICAgICAgICAgICBheEZvY3VzYWJsZUxpc3QucHVzaChheENoaWxkKTsKKyAg
ICAgICAgICAgIH0KICAgICAgICAgICAgIGFwcGVuZEZvY3VzYWJsZURlc2NlbmRhbnRzKGF4Q2hp
bGQsIGF4Rm9jdXNhYmxlTGlzdCk7CiAgICAgICAgIH0KICAgICB9Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>