[Development] Proposal: expose accessibility group position (PositionInSet / SizeOfSet) via Qt on Windows

Reza Bakhshi r.bakhshi72 at gmail.com
Fri Aug 28 01:13:05 CEST 2026


Hi,

Following the feedback from Volker and Michael, I have filed QTBUG-149577
with the attributes-based design: PositionInSet and SizeOfSet added to
QAccessible::Attribute, reported through QAccessibleAttributesInterface,
mapped to the UIA set properties on Windows and to the posinset/setsize
object attributes on AT-SPI, plus a role-dependent mapping of the existing
Level attribute (UIA_HeadingLevelPropertyId for headings,
UIA_LevelPropertyId for structural depth). The ticket lists the expected
outcome for each QtWidgets control.

https://bugreports.qt.io/browse/QTBUG-149577

Unless there are objections to the design, I will push the first qtbase
change (the enum values plus the UIA mapping) to Gerrit referencing the
ticket.

Best regards,
Reza Bakhshi

On Mon, Dec 22, 2025 at 12:23 PM Michael Weghorn <m.weghorn at posteo.de>
wrote:
>
> Hi,
>
> On 2025-12-16 16:01, Volker Hilsheimer via Development wrote:
> >> On Windows, screen readers rely on UI Automation properties such as
PositionInSet, SizeOfSet, and Level to announce group position information
(e.g. “option 1 of 4”). With our current setup, this information is not
exposed via Qt’s accessibility layer, so screen readers lose this context
in grouped controls (radio button groups, menus, lists, etc.).
> >>
> >> I have a prototype implementation for Qt 5.15.x that provides this
information via Windows UIA. Before turning it into an upstream
contribution, I’d like to ask:
> >> - Is this feature something the Qt project would be interested in
supporting?
> >> - If yes, is there a preferred API/design approach for implementing it?
> >> - Should I first file a Jira issue, and if so, under which component?
> >>
> >>
> > [...]
> > Thanks for spotting this! Supporting this part of the UI Automation
interface would indeed be interesting for our integration in Qt. I assume
this can be implemented with the existing hierarchy-traversal APIs,
although finding the position of a specific interface within its parent
might be a comparatively expensive operation in very large lists (for
instance in a tree view).
> >
> > A Jira ticket that documents what the expected outcome should be for
different controls would be great; i.e. is “Level” something that we should
expect from nested group boxes, or only from nested menus? The component
for accessibility issues is “GUI: Accessibility (a11y)”.
> >
> > Given that you have a working implementation for UI Automation, it’s
probably best to discuss possible approaches based on the existing patch.
One thing to consider is whether this can/should be implemented across
platforms, but that depends on whether the native a11y infrastructure on
other platforms have that feature in the first place, or whether they use
(or fall back to) existing tree-navigation infrastructure to get this
information.
>
> As far as I can see, all of the mentioned UIA properties have an
> equivalent in ARIA, see [1]:
>
> * PositionInSet: "aria-posinset"
> * SizeOfSet: "aria-setsize"
> * Level: "aria-level"
>
> As such, I think they're likely relevant for all platforms, not just
> UIA/Windows.
>
> Using the existing QAccessibleAttributesInterface [2] could be a
> potential way to implement support, by adding corresponding values to
> the QAccessible::Attribute enum [3] and then handling those in the
> relevant widget a11y implementations.
>
> For Level/"aria-level", there already is `QAccessible::Attribute::Level`.
>
> Commit [4] added some initial mapping for UIA. As far as I can see,
> UIA_HeadingLevelPropertyId isn't handled in the UIA bridge yet, but that
> should be relatively straight-forward to add.
> More attributes could probably be handled similarly there (and in other
> platform bridges, where applicable).
>
> In case of taking that approach, the corresponding logic for reporting
> these attributes could then be done in the a11y implementations of the
> corresponding widgets and be cross-platform.
>
> Regards,
> Michael
>
>
> [1]
>
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Attributes
> [2] https://doc.qt.io/qt-6/qaccessibleattributesinterface.html
> [3] https://doc.qt.io/qt-6/qaccessible.html#Attribute-enum
> [4]
>
https://code.qt.io/cgit/qt/qtbase.git/commit/?id=bd0a6e83079efd8a26d9ece6055f584a8c89c1fd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20260828/74316567/attachment.htm>


More information about the Development mailing list