diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2023-02-17 13:48:38 +0100 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2023-03-01 17:20:41 +0100 |
commit | f5358e5932bc8701621389c265c4ea86c92c536c (patch) | |
tree | 39522c9a2abfcce58ca1b340f650204fd744abc2 /src/gui/accessible/qaccessible.cpp | |
parent | 6990f23813bc14be791838949dd93b5b33b40b77 (diff) |
a11y: Add new relations DescriptionFor, Described, Flows{From,To}
This is equivalent to the corresponding relation types defined
in the IAccessible2 spec [1] (IA2_RELATION_DESCRIPTION_FOR,
IA2_RELATION_DESCRIBED_BY, IA2_RELATION_FLOWS_FROM,
IA2_RELATION_FLOWS_TO) and for AT-SPI on Linux [2]
(relation types ATSPI_RELATION_DESCRIPTION_FOR,
ATSPI_RELATION_DESCRIBED_BY, ATSPI_RELATION_FLOWS_FROM,
ATSPI_RELATION_FLOWS_TO).
User Interface Automation (UIA) on Windows also has corresponding
properties for 3 of them [3]: UIA_DescribedByPropertyId,
UIA_FlowsFromPropertyId, UIA_FlowsToPropertyId.
This commit adds the new flags and implements the mapping for
the AT-SPI case.
Note that the relation type is conceptually always "inverted"
when comparing Qt and AT-SPI (or Qt and UIA)
as clarified in afbfe30093d49eff0ec4c28c220d33c233b9f807.
"QAccessible::Description" instead of "QAccessible::DescriptionFor"
would align better with the naming scheme of the other relations, but
that is already used in the Text enum.
[1] https://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/group__grp_relations.html
[2] https://lazka.github.io/pgi-docs/Atspi-2.0/enums.html#Atspi.RelationType
[3] https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-automation-element-propids
[ChangeLog][QtGui][QAccessible::RelationFlag] Added new relation
flags DescriptionFor, Described, FlowsFrom and FlowsTo.
Fixes: QTBUG-105864
Change-Id: If2d46099eeea75e177358c821d1ae833a553bd0e
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/gui/accessible/qaccessible.cpp')
-rw-r--r-- | src/gui/accessible/qaccessible.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp index a1ed334d54..b382f20037 100644 --- a/src/gui/accessible/qaccessible.cpp +++ b/src/gui/accessible/qaccessible.cpp @@ -367,12 +367,16 @@ Q_LOGGING_CATEGORY(lcAccessibilityCore, "qt.accessibility.core"); the returned list, and the \c origin object is the one represented by the calling interface. - \value Label The \c returned object is the label for the \c origin object. - \value Labelled The \c returned object is labelled by the \c origin object. - \value Controller The \c returned object controls the \c origin object. - \value Controlled The \c returned object is controlled by the \c origin object. - \value AllRelations Used as a mask to specify that we are interesting in information - about all relations + \value Label The \c returned object is the label for the \c origin object. + \value Labelled The \c returned object is labelled by the \c origin object. + \value Controller The \c returned object controls the \c origin object. + \value Controlled The \c returned object is controlled by the \c origin object. + \value [since 6.6] DescriptionFor The \c returned object provides a description for the \c origin object. + \value [since 6.6] Described The \c returned object is described by the \c origin object. + \value [since 6.6] FlowsFrom Content logically flows from the \c returned object to the \c origin object. + \value [since 6.6] FlowsTo Content logically flows to the \c returned object from the \c origin object. + \value AllRelations Used as a mask to specify that we are interesting in information + about all relations Implementations of relations() return a combination of these flags. Some values are mutually exclusive. |