<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - AX: [ATK] We need to be smarter about flattening and the accessible text implementation"
   href="https://bugs.webkit.org/show_bug.cgi?id=144639">144639</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>AX: [ATK] We need to be smarter about flattening and the accessible text implementation
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>528+ (Nightly build)
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Accessibility
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jdiggs&#64;igalia.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>webkit-bug-importer&#64;group.apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Given:

  &lt;div&gt;
    &lt;span&gt;Span!&lt;/span&gt;
    &lt;h1&gt;Foo&lt;/h1&gt;
    &lt;h2&gt;Bar&lt;/h2&gt;
    &lt;p&gt;Hello world&lt;/p&gt;
  &lt;/div&gt;

There is an object of ATK_ROLE_SECTION which implements the accessible text interface and contains the text of all of its children:

  'Span!\nFoo\n\nBar\n\nHello world'

Getting rid of the span results in the ATK_ROLE_SECTION going away.

While the above test case is not a big deal, given a page with a ton of content in a div with a single span, we're doing a lot of work getting all the text. That's bad for performance. Furthermore, for a variety of reasons, Orca is going to have to implement its own caret navigation for WebKitGtk. Having duplicated text (the headings and paragraphs are still there in the tree, correctly implementing AtkText) is really screwing things up. So we need to be smarter about our flattening.

I have some ideas which I'll pursue.</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>