<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: Spell check and style attributes should be optional when fetching attributed string"
   href="https://bugs.webkit.org/show_bug.cgi?id=160744">160744</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>AX: Spell check and style attributes should be optional when fetching attributed string
          </td>
        </tr>

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

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

        <tr>
          <th>Version</th>
          <td>WebKit 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>d_russell&#64;apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>webkit-bug-importer&#64;group.apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The overhead of fetching a spell checked attributed string via AX API is substantial. In some cases on the order of 7/8 of the total time spent fetching the string. Overhead for style is much smaller, but still a substantial portion of total time spent fetching an attributed string.

I propose:

1. Introducing two new attributes -
AXSimpleAttributedStringForTextMarkerRange - includes neither style nor spell checking
AXMisspelledAttributedStringForTextMarkerRange - includes both style and spell checking

2. Modifying the existing property AXAttributedStringForTextMarkerRange to not include spell checking, but retain style attributes.

(AXAttributedStringForRange will be unchanged.)

Spell checking is only relevant in editable nodes. Assistive technology clients can detect if they or their ancestors are editable and choose the appropriate attribute.

Style is often not output via speech or braille and in those cases is wasted overhead. Again assistive technology can make contextual decisions to ask for the correct attribute.

Other approaches considered:
Leaving AXAttributedStringForTextMarkerRange unchanged and introducing AXAttributedStringForTextMarkerRangeWithOptions allowing spell checking, style and future attributes to be toggled on and off. The overhead of boxing and unboxing these parameters outweighed the cost savings of skipping any individual attribute except spelling in most cases.</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>