summaryrefslogtreecommitdiffstats
path: root/src/network/access/qrestreply.cpp
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2023-11-10 18:25:02 +0100
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2024-02-29 04:44:22 +0000
commitfb5ffe862688a87cfc136113e067bcba0c49a7ae (patch)
tree1612b26c714875043714d4709a1142bb3b946655 /src/network/access/qrestreply.cpp
parent6164b17d226a4dd2099a852a6c34bae6fa19876d (diff)
a11y: Add new QAccessibleAttributesInterface
This adds a new QAccessibleAttributes interface that implements support for reporting (object) attributes (as compared to offset-specific text attributes, which are handled by the QAccessibleTextInterface). The concept of object attributes/properties can be found in all of ARIA, AT-SPI2 on Linux, IAccessible2 and UIA on Windows and NSAccessibility on macOS, and while some of the properties/attributes on these platforms can be mapped to from information retrieved via existing QAccessible* interfaces, a lot of relevant information cannot be made available this way. The new interface is meant to bridge this gap. Each attribute is handled as a key-value pair. Other than for the handling of text attributes (where a single string is used for all attributes, s. QAccessibleTextInterface::attributes), the object attributes handled by the new interface use the newly introduced QAccessible::Attribute enum class for keys. This helps to clearly define the semantics of each attribute and simplifies mapping to the different platform representations in the platform a11y bridges. Initially, two attribute types, Custom and Level are added, s. the documentation added with this commit for more details. Mapping of these two attributes to their platform equivalent for AT-SPI2 on Linux and UIA on Windows will be added in following commits. The Core Accessibility API Mappings specification [1] can be very useful when considering new attributes to add and how to bridge them to the specific platform APIs. Conceptually, the possibility to expose object-specific attributes might seem a good fit for the existing QAccessibleInterface, but adding new virtual methods to non-leaf classes would be an ABI-incompatible change [2], so adding a new interface/class is necessary. There is also a related discussion for Gtk 4 in [3], which - other than Gtk 3 - currently also lacks API to support many AT-SPI object attributes relevant for assistive technology like screen readers. The implementation here is also inspired by the dicussion there. A sample implementation for LibreOffice can be found at [4]. [1] https://www.w3.org/TR/core-aam-1.2/ [2] https://community.kde.org/Policies/Binary_Compatibility_Examples#Add_new_virtuals_to_a_non-leaf_class [3] https://gitlab.gnome.org/GNOME/gtk/-/issues/6196 [4] https://gerrit.libreoffice.org/c/core/+/159309 [ChangeLog][QtGui][QAccessibleAttributesInterface] Added new QAccessibleAttributesInterface that can be used to expose object attributes/properties to assistive technology. Task-number: QTBUG-119057 Change-Id: I9d51c818e82673d1e755a3c909d3e8f5bb064a35 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/network/access/qrestreply.cpp')
0 files changed, 0 insertions, 0 deletions