This bridges the 2 currently existing attribute types for
the newly added QAccessibleAttributesInterface to AT-SPI2
by using the corresponding object attributes.
QAccessible::Attribute::Level semantically matches
the "aria-level" ARIA attribute, and is mapped to
the "level" AT-SPI object attribute as described in
the Core Accessibility API Mappings specification
for both, headings [1] and non-headings [2].
All of the key-value pairs set in the
QAccessible::Attribute::Custom attribute
are bridged to the AT-SPI level as object attributes
using the same names and values.
Together with a corresponding demo change [3] for LibreOffice
implementing support for the QAccessible::Attribute::Level
attribute in the qt6-based LibreOffice variant, this makes
the specific use-case for reporting the heading level
mentioned in QTBUG-119057 work with the Orca screen reader.
Also tweak the QAccessibleAttributesInterface::attributeValue
documentation to clarify the type to be returned in the
QVariant. (The newly added AT-SPI implementation has
corresponding asserts.)
[1] https://www.w3.org/TR/core-aam-1.2/#ariaLevelHeading
[2] https://www.w3.org/TR/core-aam-1.2/#ariaLevel
[3] https://gerrit.libreoffice.org/c/core/+/159309
Task-number: QTBUG-119057
Change-Id: I7ccdbbcd601c176319ca547d4bdf50b8f93bd7d8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>