Bug 479466 - Extra, unwanted accessibility events coming from system tray items
Summary: Extra, unwanted accessibility events coming from system tray items
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: System Tray widget (show other bugs)
Version: 5.27.10
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: accessibility
Depends on:
Blocks:
 
Reported: 2024-01-06 15:19 UTC by Joanmarie Diggs
Modified: 2024-02-17 00:02 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0
Sentry Crash Report:


Attachments
AT-SPI2 accessible-event listener (377 bytes, text/x-python)
2024-01-06 15:19 UTC, Joanmarie Diggs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joanmarie Diggs 2024-01-06 15:19:58 UTC
Created attachment 164707 [details]
AT-SPI2 accessible-event listener

STEPS TO REPRODUCE:
1. Launch the attached AT-SPI2 accessible-event listener in a terminal
2. Use Meta+Alt+P to move focus to the panel
3. Use Right/Left arrow to move among items outside of, and within, the system tray

Note that you may need to set an environment variable. I (Orca maintainer) have quite a few set in my .bashrc, but I *think* the one relevant here is:

     export QT_LINUX_ACCESIBILITY_ALWAYS_ON=1

OBSERVED RESULT:
There are quite a few duplicate focus events for system tray items. See sample output below.

EXPECTED RESULT:
There should be a single focus event when an item gains focus and when it loses focus. See sample output below.

EXAMPLE OUTPUT FROM OUTSIDE THE SYSTEM TRAY (GOOD):
(The Application Launcher had focus. Then I pressed right arrow three times. With each press, the previously-focused item notifies that it lost focus, and the newly-focused item notifies that it gained focus.)

==============================================
Application Launcher push button is now focused: True
Application Launcher push button is now focused: False
System Settings push button is now focused: True
System Settings push button is now focused: False
Discover push button is now focused: True
Discover push button is now focused: False
Home — Dolphin push button is now focused: True
==============================================

EXAMPLE OUTPUT FROM THE SYSTEM TRAY (BAD):
(This is from a single press of right arrow, causing the "dropbox" system tray item to become focused. Only the first -- or if you prefer the last -- event should be present. The rest are duplicates.

==============================================
dropbox push button is now focused: True
dropbox push button is now focused: False
dropbox push button is now focused: True
dropbox push button is now focused: False
dropbox push button is now focused: True
==============================================

Each press of left/right arrow in the system tray gives me those five events; it's not just the first item in the tray.

IMPACT:
I'm handling this in Orca, but no one likes event spam. :) So if you could get to the bottom of these extra events and stop them from occurring, that would be great. Thanks in advance!
Comment 1 Nate Graham 2024-02-15 22:21:50 UTC
Thanks a lot for the bug report!
Comment 2 Bug Janitor Service 2024-02-16 03:26:04 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3908
Comment 3 Fushan Wen 2024-02-16 23:38:36 UTC
Git commit fc1055ff81118573ef6d63100de8d3a3958a867a by Fushan Wen.
Committed on 16/02/2024 at 23:20.
Pushed by fusionfuture into branch 'master'.

applets/systemtray: remove unnecessary focus hack
FIXED-IN: 6.0

M  +46   -13   appiumtests/systemtraytest.py
M  +1    -1    applets/systemtray/package/contents/ui/ExpanderArrow.qml
M  +1    -7    applets/systemtray/package/contents/ui/items/AbstractItem.qml
M  +0    -5    applets/systemtray/package/contents/ui/items/ItemLoader.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/fc1055ff81118573ef6d63100de8d3a3958a867a
Comment 4 Fushan Wen 2024-02-17 00:02:34 UTC
Git commit 4c49e11e60581db58ad79613e5b4d70e39446fc6 by Fushan Wen.
Committed on 16/02/2024 at 23:50.
Pushed by fusionfuture into branch 'Plasma/6.0'.

applets/systemtray: remove unnecessary focus hack
FIXED-IN: 6.0


(cherry picked from commit fc1055ff81118573ef6d63100de8d3a3958a867a)

M  +46   -13   appiumtests/systemtraytest.py
M  +1    -1    applets/systemtray/package/contents/ui/ExpanderArrow.qml
M  +1    -7    applets/systemtray/package/contents/ui/items/AbstractItem.qml
M  +0    -5    applets/systemtray/package/contents/ui/items/ItemLoader.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/4c49e11e60581db58ad79613e5b4d70e39446fc6