summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-04-08 15:32:11 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2024-05-21 14:44:23 +0200
commit353dd10a1c4098c4b535295211cbb9bbc161a706 (patch)
tree7c5a65e155f4af5d168c755ab5ea81fa8b349542 /src/gui
parent9b0ec58f4c74c3de3b51eff5b9562fe83af7ffe0 (diff)
a11y atspi: Bridge help text to AT-SPI
at-spi2-core commit [1] commit 8f1c70155b4132de2c567b3034e4f242e0450df5 Author: Mike Gorse <mgorse@suse.com> Date: Wed Jan 3 16:52:31 2024 -0600 Add HelpText property and corresponding functions in atk and libatspi. Closes #146 added a HelpText property to AT-SPI2. Qt already has a corresponding QAccessible::Help, so report that as the HelpText property in the AT-SPI adaptor. [1] https://gitlab.gnome.org/GNOME/at-spi2-core/-/commit/8f1c70155b4132de2c567b3034e4f242e0450df5 Fixes: QTBUG-124197 Change-Id: I01489c1fdac953658d379951207f91784f3d1dfe Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/accessible/linux/atspiadaptor.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/accessible/linux/atspiadaptor.cpp b/src/gui/accessible/linux/atspiadaptor.cpp
index 2cebad1453..13cd494d8c 100644
--- a/src/gui/accessible/linux/atspiadaptor.cpp
+++ b/src/gui/accessible/linux/atspiadaptor.cpp
@@ -135,6 +135,7 @@ QString AtSpiAdaptor::introspect(const QString &path) const
" <interface name=\"org.a11y.atspi.Accessible\">\n"
" <property access=\"read\" type=\"s\" name=\"Name\"/>\n"
" <property access=\"read\" type=\"s\" name=\"Description\"/>\n"
+ " <property access=\"read\" type=\"s\" name=\"HelpText\"/>\n"
" <property access=\"read\" type=\"(so)\" name=\"Parent\">\n"
" <annotation value=\"QSpiObjectReference\" name=\"org.qtproject.QtDBus.QtTypeName\"/>\n"
" </property>\n"
@@ -1624,6 +1625,8 @@ bool AtSpiAdaptor::accessibleInterface(QAccessibleInterface *interface, const QS
sendReply(connection, message, accessibleInterfaces(interface));
} else if (function == "GetDescription"_L1) {
sendReply(connection, message, QVariant::fromValue(QDBusVariant(interface->text(QAccessible::Description))));
+ } else if (function == "GetHelpText"_L1) {
+ sendReply(connection, message, QVariant::fromValue(QDBusVariant(interface->text(QAccessible::Help))));
} else if (function == "GetState"_L1) {
quint64 spiState = spiStatesFromQState(interface->state());
if (interface->tableInterface()) {