Bug 239549

Summary: AX: The isolated tree is not updated after role changes in AccessibilityRenderObject::updateRoleAfterChildrenCreation()
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: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Tyler Wilcock 2022-04-20 10:32:02 PDT
The isolated tree is not updated after role changes in AccessibilityRenderObject::updateRoleAfterChildrenCreation()
Comment 1 Radar WebKit Bug Importer 2022-04-20 10:32:13 PDT
<rdar://problem/92036686>
Comment 2 Tyler Wilcock 2022-04-20 10:40:01 PDT
Created attachment 457995 [details]
Patch
Comment 3 Andres Gonzalez 2022-04-21 11:22:25 PDT
(In reply to Tyler Wilcock from comment #2)
> Created attachment 457995 [details]
> Patch

--- a/LayoutTests/accessibility/mac/invalid-menu-role-does-not-send-notification.html
+++ a/LayoutTests/accessibility/mac/invalid-menu-role-does-not-send-notification.html

+        accessibilityController.addNotificationListener(() => {

Shouldn't the => function take a parameter notification? JS is probably this tolerant, but not sure.
Comment 4 Tyler Wilcock 2022-04-21 11:51:13 PDT
Created attachment 458079 [details]
Patch
Comment 5 Tyler Wilcock 2022-04-21 11:53:23 PDT
> +        accessibilityController.addNotificationListener(() => {
> 
> Shouldn't the => function take a parameter notification? JS is probably this
> tolerant, but not sure.
Fixed.
Comment 6 Andres Gonzalez 2022-04-21 12:04:17 PDT
(In reply to Tyler Wilcock from comment #5)
> > +        accessibilityController.addNotificationListener(() => {
> > 
> > Shouldn't the => function take a parameter notification? JS is probably this
> > tolerant, but not sure.
> Fixed.

Actually looking at the other instances of accessibilityController.addNotificationListener((element, notification) => {, they always have two parameters, the accessible element and the notification name. this is unlike the DoM notification which is an object that encapsulates the target and the type of the notification.
Comment 7 Tyler Wilcock 2022-04-21 12:48:29 PDT
Created attachment 458083 [details]
Patch
Comment 8 EWS 2022-04-22 00:03:24 PDT
Committed r293212 (249883@main): <https://commits.webkit.org/249883@main>

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