Browse Source
* 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.pull/21634/head
committed by
GitHub
5 changed files with 78 additions and 35 deletions
@ -0,0 +1,11 @@ |
|||
using Avalonia.Controls; |
|||
|
|||
namespace Avalonia.Automation.Peers; |
|||
|
|||
public class ListBoxAutomationPeer : SelectingItemsControlAutomationPeer |
|||
{ |
|||
public ListBoxAutomationPeer(ListBox owner) |
|||
: base(owner) |
|||
{ |
|||
} |
|||
} |
|||
Loading…
Reference in new issue