<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <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#c9">Comment # 9</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="bz_obsolete"><a href="attachment.cgi?id=257593&amp;action=diff" name="attach_257593" title="patch">attachment 257593</a> <a href="attachment.cgi?id=257593&amp;action=edit" title="patch">[details]</a></span>
patch

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

in general, i think we don't want to add new attributes. we want to keep our logic inside ::roleValue() and determineRoleValue()

<span class="quote">&gt; Source/WebCore/accessibility/AccessibilityRenderObject.h:214
&gt; +    virtual bool shouldIgnoreAttributeRole() const { return false; }</span >

I doubt we need either of these methods.

<span class="quote">&gt; Source/WebCore/accessibility/AccessibilityTree.cpp:62
&gt; +    m_ariaRole = determineAriaRoleAttribute();</span >

it doesn't look like you use this anywhere.

for 1, if the role is not a &quot;tree&quot; role we shouldn't proceed any further

<span class="quote">&gt; Source/WebCore/accessibility/AccessibilityTree.cpp:65
&gt; +    m_role = TreeRole;</span >

seems like we should just override canHaveChildren() and return true

<span class="quote">&gt; Source/WebCore/accessibility/AccessibilityTree.cpp:74
&gt; +        if (child-&gt;isGroup()) {</span >

can we have groups of groups of groups of tree items?

<span class="quote">&gt; Source/WebCore/accessibility/AccessibilityTree.cpp:77
&gt; +                    m_isMalformed = true;</span >

this should just set some local variable. we don't need an instance variable to store this

<span class="quote">&gt; Source/WebCore/accessibility/AccessibilityTree.cpp:84
&gt; +    // After validating the tree, we want the children to reflect the correct role</span >

this comment is not necessary. it is self evident from the code

<span class="quote">&gt; Source/WebCore/accessibility/AccessibilityTreeItem.h:42
&gt; +        virtual bool shouldIgnoreAttributeRole() const override { return !m_isTreeItemValid; }</span >

i don't think this concept is a good one. i think the role should just reflect what the object is. we don't want to have to check another attribute to figure out what the role is

<span class="quote">&gt; Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:2059
&gt; +            return &#64;&quot;AXMalformed&quot;;</span >

this is not something we want to return. if the object is not a tree, it should just revert to what it normally would be, which will be taken care of by code below</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>