Skip to content

ListSectionHeader: set Accessible.role to Heading

Christoph Wolk requested to merge cwo/kirigami:sectionheader into master

ListSectionHeader currently does not set an explicit Accessible.role. If the role of the parent list is correctly set, orca will read out the number of items in the list when the list receives focus. With the default role on ListSectionHeader, this number will count headers. This is misleading, as users can typically not interact with them, and they may not even be read out at all as they do not receive focus. For example, a list announced as 8 items might only contain 5 actual user- interactable elements, if there are also 3 ListSectionHeaders.

This change sets the Accessible.role of ListSectionHeader to Accessible.Heading, which causes orca to ignore the item when determining the number of entries for the list.

Merge request reports

Loading