Bug 254743

Summary: AX: [GTK] Accessibility events from document are either missing or come from a "dead" host application
Product: WebKit Reporter: Joanmarie Diggs <jdiggs>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WORKSFORME    
Severity: Normal CC: andresg_22, cgarcia, mcatanzaro, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: Linux   
Attachments:
Description Flags
pyatspi accessible-event listener none

Description Joanmarie Diggs 2023-03-30 08:30:33 PDT
Created attachment 465680 [details]
pyatspi accessible-event listener

Steps to reproduce:
1. Launch a Gtk3 minibrowser
2. Launch the attached accessible-event listener in a terminal
3. Tab from the URL/location bar down into the content
4. Tab within the content (www.webkitgtk.org)
5. Follow a link from the content (e.g. epiphany)
6. Tab within the newly-loaded content

Expected results: Focused-changed events would always be fired and would come from a valid host application

Actual results:

* On step 3, focus events are emitted as expected:
  object:state-changed:focused(1, 0, 0)
	source: [text | ]
	host_application: [application | MiniBrowser]
	sender: [application | MiniBrowser]
  object:state-changed:focused(1, 0, 0)
	source: [push button | Refresh]
	host_application: [application | MiniBrowser]
	sender: [application | MiniBrowser]
  object:state-changed:focused(1, 0, 0)
	source: [push button | Find]
	host_application: [application | MiniBrowser]
	sender: [application | MiniBrowser]
 object:state-changed:focused(1, 0, 0)
	source: [toggle button | Menu]
	host_application: [application | MiniBrowser]
	sender: [application | MiniBrowser]

* On step 4, no focus events are emitted at all

* On step 6, the focus events are emitted, but from a "dead" host application:

  object:state-changed:focused(1, 0, 0)
	source: [link | Apps]
	host_application: [DEAD]
	sender: [DEAD]
  object:state-changed:focused(1, 0, 0)
	source: [link | Web]
	host_application: [DEAD]
	sender: [DEAD]
  object:state-changed:focused(1, 0, 0)
	source: [link | Home]
	host_application: [DEAD]
	sender: [DEAD]
  object:state-changed:focused(1, 0, 0)
	source: [link | RecentChanges]
	host_application: [DEAD]
	sender: [DEAD]

Impact: Orca does not present the focus changes emitted from the document content.
Comment 1 Radar WebKit Bug Importer 2023-03-30 08:30:46 PDT
<rdar://problem/107421136>
Comment 2 Joanmarie Diggs 2023-05-09 05:46:46 PDT
I just retested and now I'm back to correct events and a valid host application. (The "sender" is still [DEAD]" but Orca ignores the sender.)

I don't have the time to do a bisect at the moment, but I'll close this as WFM.