Bug 254468 - AX: VoiceOver not reading entered text in text fields.
Summary: AX: VoiceOver not reading entered text in text fields.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Andres Gonzalez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-03-25 13:54 PDT by Andres Gonzalez
Modified: 2023-03-26 14:20 PDT (History)
11 users (show)

See Also:


Attachments
Patch (17.72 KB, patch)
2023-03-25 14:00 PDT, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (17.90 KB, patch)
2023-03-26 09:26 PDT, Andres Gonzalez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andres Gonzalez 2023-03-25 13:54:40 PDT
Fallout from https://bugs.webkit.org/show_bug.cgi?id=252193.
Comment 1 Radar WebKit Bug Importer 2023-03-25 13:54:49 PDT
<rdar://problem/107226245>
Comment 2 Andres Gonzalez 2023-03-25 13:56:22 PDT
rdar://106958414
Comment 3 Radar WebKit Bug Importer 2023-03-25 13:56:30 PDT
<rdar://problem/107226275>
Comment 4 Andres Gonzalez 2023-03-25 14:00:03 PDT
Created attachment 465591 [details]
Patch
Comment 5 chris fleizach 2023-03-25 14:24:56 PDT
Comment on attachment 465591 [details]
Patch

Good nuance to remember that apparently these ax attributes strings need CGcolors instead of NSColors

Thanks!
Comment 6 Andres Gonzalez 2023-03-26 09:26:08 PDT
Created attachment 465596 [details]
Patch
Comment 7 Darin Adler 2023-03-26 09:31:06 PDT
> The cause of the problem was that we were setting the color attribute in the AttributedString using the NSColor pointer that is not retained after the caller of this function returns

This explanation doesn’t make sense. Attributed strings retain the attributes, so the NSColor should be retained by the attributed string. There must be something else going on.
Comment 8 chris fleizach 2023-03-26 10:18:56 PDT
(In reply to Darin Adler from comment #7)
> > The cause of the problem was that we were setting the color attribute in the AttributedString using the NSColor pointer that is not retained after the caller of this function returns
> 
> This explanation doesn’t make sense. Attributed strings retain the
> attributes, so the NSColor should be retained by the attributed string.
> There must be something else going on.

I talked to andres offline. This explanation isn't right. The problem was that AX system expects cgcolors instead of nscolors. Andres can you update the message
Comment 9 EWS 2023-03-26 10:24:25 PDT
Committed 262126@main (ae7bf78d3f4f): <https://commits.webkit.org/262126@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 465596 [details].
Comment 10 Andres Gonzalez 2023-03-26 14:20:54 PDT
(In reply to Darin Adler from comment #7)
> > The cause of the problem was that we were setting the color attribute in the AttributedString using the NSColor pointer that is not retained after the caller of this function returns
> 
> This explanation doesn’t make sense. Attributed strings retain the
> attributes, so the NSColor should be retained by the attributed string.
> There must be something else going on.

Corrected the code comment in https://bugs.webkit.org/show_bug.cgi?id=254486. Thanks for pointing out.