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] 8f1c70155b

Fixes: QTBUG-124197
Change-Id: I01489c1fdac953658d379951207f91784f3d1dfe
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
bb10
Michael Weghorn 2024-04-08 15:32:11 +02:00
parent 9b0ec58f4c
commit 353dd10a1c
1 changed files with 3 additions and 0 deletions

View File

@ -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()) {