<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:cfleizach&#64;apple.com" title="chris fleizach &lt;cfleizach&#64;apple.com&gt;"> <span class="fn">chris fleizach</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - AX: VoiceOver unable to access content in malformed trees"
   href="https://bugs.webkit.org/show_bug.cgi?id=147295">bug 147295</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #257795 Flags</td>
           <td>review?
           </td>
           <td>review-
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - AX: VoiceOver unable to access content in malformed trees"
   href="https://bugs.webkit.org/show_bug.cgi?id=147295#c15">Comment # 15</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - AX: VoiceOver unable to access content in malformed trees"
   href="https://bugs.webkit.org/show_bug.cgi?id=147295">bug 147295</a>
              from <span class="vcard"><a class="email" href="mailto:cfleizach&#64;apple.com" title="chris fleizach &lt;cfleizach&#64;apple.com&gt;"> <span class="fn">chris fleizach</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=257795&amp;action=diff" name="attach_257795" title="patch">attachment 257795</a> <a href="attachment.cgi?id=257795&amp;action=edit" title="patch">[details]</a></span>
patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=257795&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=257795&amp;action=review</a>

thanks. almost there

<span class="quote">&gt; Source/WebCore/ChangeLog:9
&gt; +        VoiceOver is skipping the content of malformed trees. Fixed it by ignoring</span >

VoiceOver is skipping the content of malformed trees.
This fixes the problem by having the tree check if it has valid children (tree items) and makes tree items check if they are inside trees.

<span class="quote">&gt; Source/WebCore/accessibility/AccessibilityObject.h:776
&gt; +    // Function to determine if the attribute role should be ignored</span >

this comment probably not necessary. your method name does the same thing that this comment says

<span class="quote">&gt; Source/WebCore/accessibility/AccessibilityTree.cpp:72
&gt; +    // A valid tree can only have treeitem or group of treeitems as child</span >

&quot;... as a child.&quot;

<span class="quote">&gt; Source/WebCore/accessibility/AccessibilityTree.cpp:75
&gt; +    Deque&lt;Node*&gt; queue;</span >

we should make this queue after we check if there's node (next line)

<span class="quote">&gt; Source/WebCore/accessibility/AccessibilityTree.cpp:85
&gt; +        Node* child = queue.takeFirst();</span >

auto child

<span class="quote">&gt; Source/WebCore/accessibility/AccessibilityTree.cpp:89
&gt; +        if (nodeHasRole(child, &quot;treeitem&quot;))</span >

does nodeHasRole already check the is&lt;Element&gt; for us? we might be able to get rid of that check

<span class="quote">&gt; Source/WebCore/accessibility/AccessibilityTreeItem.cpp:56
&gt; +    m_isTreeItemValid = false;</span >

it looks like we don't need to initialize this to anything so the line below will take care of it

<span class="quote">&gt; Source/WebCore/accessibility/AccessibilityTreeItem.cpp:58
&gt; +    // Walk the parent chain looking for a parent that is a tree, treeitem is considered</span >

// Walk the parent chain looking for a parent that is a tree. A tree item is only considered valid if it is in a tree.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>