diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2022-06-17 17:29:19 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2022-06-17 19:30:29 +0200 |
commit | 8c3e8af0e60865ec6d38e2117efdb4ed2f10a20c (patch) | |
tree | 7e06c93d2e47ce37683ccfa53fe89b2d82baaff0 /compilerplugins | |
parent | 2e509b886f1d77ef158579385b55f1f94cfbc710 (diff) |
qt a11y: Forward STATE_CHANGED event as such
Handle `AccessibleEventId::STATE_CHANGED` by
sending a corresponding `QAccessibleStateChangeEvent`.
The previous way of sending a `QAccessible::ForegroundChanged`
event looked rather arbitrary and had no effect in practice,
since that type of event is currently ignored in Qt's AT-SPI adapter
anyway.
At this point in time, the Qt library doesn't forward
changes of all states to the AT-SPI layer. Most notably,
it ignores changes to the focused state.
(Qt itself uses events of type `QAccessible::Focus`
instead of `QAccessibleStateChangeEvent` with the `focused`
state set to notify about focus changes, but that's not exactly the
same, and e.g. causes Orca to ignore some focus changes).
I have submitted a change to Qt to implement
forwarding of `QAccessibleStateChangeEvent`s for the
focused state to the AT-SPI layer, currently awaiting
review. [1]
With that Qt change in place, Orca still ignored these
events in LibreOffice message dialogs, since those
use a11y role `ALERT`, which wasn't previously considered
when trying to retrieve a potential dialog that an
a11y object belonged to.
The corresponding Orca merge request [2] has just been merged.
With these two in place, Orca now announces the focused
button when switching focus using the tab key
e.g. in the "Save document?" dialog when using the qt6 VCL plugin.
(Most other things in the LO UI are still usually not announced.)
For some reason, forwarding changes to state `AccessibleStateType::ACTIVE`
resulted in Orca becoming unresponsive (stop talking) quite quickly.
That needs further analysis, so that state change isn't forwarded
to Qt for now.
[1] https://codereview.qt-project.org/c/qt/qtbase/+/416510
[2] https://gitlab.gnome.org/GNOME/orca/-/merge_requests/127
Change-Id: I81c9a0f5ec8c74f95943d3073bba5b304f995d31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136057
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'compilerplugins')
0 files changed, 0 insertions, 0 deletions