100 1 10 True False True 6 True True True adjustment1 True 2 False True 0 r> 2024-04-30T11:06:15+00:00 4cec279cf2bf55d33e0eb6c92348aa883d7593ff When creating a new LoAccessible, also consider accessible relations. These can be retrieved via the XAccessibleRelationSet UNO interface. Bridge those that have an equivalent in the GTK 4 a11y API. As the parent GtkAccessible of a target XAccessible is not known, extend `GtkAccessibleRegistry::getLOAccessible` with the functionality to find a parent via the XAccessible hierarchy (i.e. by walking up the XAccessible hierarchy until a parent is reached that has an entry in registry already). This could potentially be problematic as an a11y hierarchy solely based on the XAccessible hierarchy doesn't necessarily match the one with the GtkAccessibles from the native GtkWidget hierarchy. In my current understanding, this should presumably be OK as long as that mechanism finds one existing entry before getting to the root, so assert that this is the case. With this in place, having a Writer doc with multiple paragraphs, there is a flows_to relation shown for the first paragraph to the second in Accerciser, etc., and jumping to the target selects the next paragraph as expected. Change-Id: I2ec1fe8c48dd4250d407ae4fb3c8d9c0f6671646 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166926 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
When creating a new LoAccessible, also consider
accessible relations.
These can be retrieved via the XAccessibleRelationSet
UNO interface.

Bridge those that have an equivalent in the GTK 4 a11y API.

As the parent GtkAccessible of a target XAccessible
is not known, extend `GtkAccessibleRegistry::getLOAccessible`
with the functionality to find a parent via the XAccessible
hierarchy (i.e. by walking up the XAccessible hierarchy
until a parent is reached that has an entry in registry
already).
This could potentially be problematic as an a11y hierarchy
solely based on the XAccessible hierarchy doesn't necessarily
match the one with the GtkAccessibles from the native GtkWidget
hierarchy. In my current understanding, this should presumably
be OK as long as that mechanism finds one existing
entry before getting to the root, so assert that this is the case.

With this in place, having a Writer doc with multiple paragraphs,
there is a flows_to relation shown for the first paragraph to the
second in Accerciser, etc., and jumping to the target selects
the next paragraph as expected.

Change-Id: I2ec1fe8c48dd4250d407ae4fb3c8d9c0f6671646
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166926
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
gtk4 a11y: Remember LoAccessible for XAccessible 2023-12-20T16:38:08+00:00 Michael Weghorn m.weghorn@posteo.de 2023-12-20T10:12:58+00:00 70ef230aae4f961c8197cc11a7ff5feaf1d96c20 Don't create a new `LoAccessible` for an `XAccessible` each time, but add a `GtkAccessibleRegistry` class that remembers the corresponding `LoAccessible` for an `XAccessible` in a map. Remove the entry from the map again in `GtkAccessibleEventListener::disposing`. This prevents Libreoffice from becoming unresponsive in local WIP branches of both, gtk and LO that add handling for changes to the focused state, when used with the Orca screen reader. This commit is very similar to what was added for the Qt-based VCL plugins in commit 812fe185fba48b439fb1229517d62aa67c209016 Author: Michael Weghorn <m.weghorn@posteo.de> Date: Wed Aug 24 11:42:04 2022 +0200 qt a11y: Remember and reuse existing QObject for XAccessible Change-Id: Ib217b477bf15abf255fcf254bf607ab8fc11a040 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161061 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Don't create a new `LoAccessible` for an `XAccessible`
each time, but add a `GtkAccessibleRegistry` class that
remembers the corresponding `LoAccessible` for
an `XAccessible` in a map.

Remove the entry from the map again in
`GtkAccessibleEventListener::disposing`.

This prevents Libreoffice from becoming unresponsive
in local WIP branches of both, gtk and LO that add
handling for changes to the focused state, when used
with the Orca screen reader.

This commit is very similar to what was added for the Qt-based
VCL plugins in

    commit 812fe185fba48b439fb1229517d62aa67c209016
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Aug 24 11:42:04 2022 +0200

        qt a11y: Remember and reuse existing QObject for XAccessible

Change-Id: Ib217b477bf15abf255fcf254bf607ab8fc11a040
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161061
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>