You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow item-level size_of_set to override container size_of_set for flat trees #875
In a virtualized flat tree (a Role::Tree whose Role::TreeItem rows are direct children distinguished by Node::level and Node::position_in_set), sibling sets at different levels have different sizes. For example:
fruits (level 1, position 1 of 2)
apple (level 2, position 1 of 3)
banana (level 2, position 2 of 3)
cherry (level 2, position 3 of 3)
vegetables (level 1, position 2 of 2)
Because accesskit_windows (src/node.rs, NodeWrapper::size_of_set) and accesskit_atspi_common (src/node.rs, NodeWrapper::size_of_set) only call size_of_set_from_container(&filter) and never read Node::size_of_set on the item itself, cherry inherits the Role::Tree container's size_of_set (2) and is reported to UIA and AT-SPI as "3 of 2" (violating position_in_set < size_of_set).
Synthesizing unlabelled Role::Group wrappers by level is not transparent in AccessKit because size_of_set_from_container(&filter) requires ancestors to pass common_filter, which also makes Role::Group navigable on Windows UIA (IsControlElement / IsContentElement = true), macOS (AXApplicationGroup), and AT-SPI (AtspiRole::Panel).
What Chromium does
For flat ARIA trees using aria-level, aria-posinset, and aria-setsize, Chromium keeps treeitem nodes as direct children of role="tree" and reports each item's own hierarchical level setsize directly on the treeitem (ui/accessibility/ax_tree.cc, AXTree::ComputeSetSizePosInSetAndCache).
Suggested change
Check an item's own size_of_set on item roles before falling back to size_of_set_from_container(&filter) (gating to item roles so containers like Tree, ListBox, and Group never report their children's count as their own sibling set size):
Activity