[Webkit-unassigned] [Bug 261056] AX: Expose accessibility attributes for inline text predictions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 5 22:48:41 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=261056

--- Comment #6 from Joshua Hoffman <jhoffman23 at apple.com> ---
Comment on attachment 467522
  --> https://bugs.webkit.org/attachment.cgi?id=467522
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=467522&action=review

>> Source/WebCore/accessibility/ios/AccessibilityObjectIOS.mm:227
>> +    if (&node != editor.compositionNode())
> 
> we should check this at the top so we don't do this other work first

We need to do this check after getting the complete word because the composition node that stores the last word will not be equal to the current node (since the prediction is complete).

>> Source/WebCore/editing/Editor.h:603
>> +    std::pair<String, unsigned> lastPresentedTextPredictionComplete() const { return m_lastPresentedTextPredictionComplete; }
> 
> It might be better to use a struct rather than a pair since you can name the members of a struct. Based on the name of the variable, it's reasonable to guess that the String part is the text prediction. But it's not as clear what the unsigned refers to. You can declare the struct right above these two function declarations.

I like the idea of a struct—will switch to that!

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20230906/5cc35656/attachment.htm>


More information about the webkit-unassigned mailing list