Repository navigation
AT-SPI: Expose list item containers as accessible children - #21605
Conversation
Index selectable items directly under the selection container so the Selection interface's SelectChild/DeselectChild address them by index.
|
You can test this PR using the following package version. |
ListBox used ItemsControlAutomationPeer, which is not an ISelectionProvider, so it never exposed the Selection interface (AT-SPI) for multi-select.
|
You can test this PR using the following package version. |
Move the GetChildrenCore container override down to ItemsControlAutomationPeer so every ItemsControl returns its containers, and return null directly when there are no items instead of calling the base algorithm.
|
You can test this PR using the following package version. |
|
You can test this PR using the following package version. |
… the AT-SPI selection handler
|
You can test this PR using the following package version. |
|
You can test this PR using the following package version. |
…not the shared peer Present a SelectingItemsControl's realized item containers as its direct AT-SPI children inside AtSpiNode so SelectChild-by-index and a selectable item's parent lookup resolve to the Selection container. Doing this in the FreeDesktop AT-SPI layer keeps the macOS AX and Windows UIA peer trees intact, avoiding the item-frame and tree-collapse regressions the shared ItemsControlAutomationPeer override caused.
|
You can test this PR using the following package version. |
…I#21605) * AT-SPI: add to the selection in Selection.SelectChild instead of replacing it * AT-SPI: expose list item containers as accessible children Index selectable items directly under the selection container so the Selection interface's SelectChild/DeselectChild address them by index. * Expose ListBox selection to accessibility via a selection peer ListBox used ItemsControlAutomationPeer, which is not an ISelectionProvider, so it never exposed the Selection interface (AT-SPI) for multi-select. * Address review: expose item containers from the base ItemsControl peer Move the GetChildrenCore container override down to ItemsControlAutomationPeer so every ItemsControl returns its containers, and return null directly when there are no items instead of calling the base algorithm. * Use file-scoped namespace in ListBoxAutomationPeer * Fix cross-platform regression: move child flattening from the peer to the AT-SPI selection handler * Trigger rebuild * AT-SPI: flatten selection container item children in the node layer, not the shared peer Present a SelectingItemsControl's realized item containers as its direct AT-SPI children inside AtSpiNode so SelectChild-by-index and a selectable item's parent lookup resolve to the Selection container. Doing this in the FreeDesktop AT-SPI layer keeps the macOS AX and Windows UIA peer trees intact, avoiding the item-frame and tree-collapse regressions the shared ItemsControlAutomationPeer override caused.
List automation peers exposed the items panel/scrollviewer as their accessible children, so the items were not direct children of the selection container. AT-SPI addresses selectable children by index on the container (SelectChild/DeselectChild), so item selection over AT-SPI could not reach the items.
Expose the realized item containers as the accessible children of SelectingItemsControl peers (ListBox, TreeView, ComboBox), matching how the selection model already resolves items via ContainerFromIndex.
Builds on #21602 (additive SelectChild). The first commit here is that change; it will drop out once #21602 merges.