Accessibility tree broken for table view
Steps to reproduce:
- Launch the attached pyatspi accessible-event listener in a terminal
- Arrow around within Dolphin, both the icon view and the side panels
- Examine the listener output each time focus changes within Dolphin
Expected results: The final ancestor of the newly-focused object would always be an application.
Actual results: The expected results unless the focused object is inside the icon view. In that case the final ancestor is a table.
Sample output:
Good:
[list | ] is now focused.
Parent of [list | ] is [frame | Places]
Parent of [frame | Places] is [frame | Desktop]
Parent of [frame | Desktop] is [application | dolphin]
Parent of [application | dolphin] is None
[list item | Modified Today] is now focused.
Parent of [list item | Modified Today] is [list | ]
Parent of [list | ] is [frame | Places]
Parent of [frame | Places] is [frame | Desktop]
Parent of [frame | Desktop] is [application | dolphin]
Parent of [application | dolphin] is None
Bad:
[table cell | Desktop] is now focused.
Parent of [table cell | Desktop] is [table | ]
Parent of [table | ] is None
Impact: The Orca screen reader, which I maintain, does some checks in order to determine if the newly-focused object should be presented to the user (i.e. in speech and/or braille). One of these checks is that the newly-focused object is inside the active window. (Sometimes we get focused events for non-active windows.) Orca gets the window of the newly-focused object by ascending the accessibility tree until it gets to the top-level window/frame. In the case of the icon view, Orca never finds the window and (in Orca master/unstable) does not present the newly-focused icon.
Notes:
- I suspect this is not a Dolphin bug, but a Qt bug. But I'm not positive about that, so I'm filing the issue here. Thanks for doing the triage if it's a Qt bug!
- I recently added some additional sanity checks to Orca (which is how this bug was discovered). As a result, if you are using a stable version of Orca, you will not see the bug of Orca not presenting icons. I will lighten the sanity checks in Orca unstable so as not to regress the user experience. BUT this bug needs to be fixed. Please and thank you.
😄