Bug 263843

Summary: AX: The isolated tree doesn't update when the name attribute changes
Product: WebKit Reporter: Tyler Wilcock <tyler_w>
Component: AccessibilityAssignee: Tyler Wilcock <tyler_w>
Status: RESOLVED FIXED    
Severity: Normal CC: aboxhall, andresg_22, apinheiro, cfleizach, dmazzoni, ews-watchlist, jcraig, jdiggs, samuel_white, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Tyler Wilcock 2023-10-28 23:46:03 PDT
We use the name attribute for the AXRadioGroupSearchKey, which allows clients to find the next / previous distinct radiogroup. By not updating AXPropertyName::NameAttribute, this search query can return incorrect results after dynamic changes.
Comment 1 Radar WebKit Bug Importer 2023-10-28 23:46:12 PDT
<rdar://problem/117641685>
Comment 2 Tyler Wilcock 2023-10-29 00:10:08 PDT
Created attachment 468396 [details]
Patch
Comment 3 chris fleizach 2023-10-29 08:08:15 PDT
Comment on attachment 468396 [details]
Patch

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

> Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:592
> +            else

Does storing an empty string recreate the issue we tried to fix by not storing default values?
Comment 4 Tyler Wilcock 2023-10-29 09:45:29 PDT
Created attachment 468401 [details]
Patch
Comment 5 Tyler Wilcock 2023-10-29 09:48:21 PDT
(In reply to chris fleizach from comment #3)
> Comment on attachment 468396 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=468396&action=review
> 
> > Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:592
> > +            else
> 
> Does storing an empty string recreate the issue we tried to fix by not
> storing default values?
Uploaded a new version of the patch that removes std::optional from the method signature of nameAttribute(), obviating the need to store an empty string here (which would've resulted in AXPropertyName::NameAttribute from being removed from the map rather than storing an empty string per AXIsolatedObject::setProperty).
Comment 6 EWS 2023-10-29 14:27:04 PDT
Committed 269912@main (2ab054fd990f): <https://commits.webkit.org/269912@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 468401 [details].