Merged
Conversation
This was referenced Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Summary: Dock Avalonia Accessibility and UI Automation
Branch
feature/accessibility-automation-peersmasterGoal
Implement a full UI automation/accessibility layer for Dock Avalonia controls, including dedicated automation peers, provider contracts, runtime state/event exposure, keyboard selector validation, leak safety, and end-user documentation.
Commit Breakdown
1)
20edc83b8feat(avalonia): add UI automation peers for dock controlsAdded automation peer layer
Created dedicated peers under
src/Dock.Avalonia/Automation/Peers/for Dock surfaces, including:DockControl,RootDockControl,DockCommandBarHostDockTarget/GlobalDockTargetDocumentControl,ToolControl,MdiDocumentControlDocumentTabStrip,ToolTabStrip,DocumentTabStripItem,ToolTabStripItemToolChromeControl,PinnedDockControl,ToolPinnedControl,ToolPinItemControlHostWindow,HostWindowTitleBar,PinnedDockWindow,MdiDocumentWindowDragPreviewControl,DragPreviewWindow,DockAdornerWindow,DockSelectorOverlayDockAutomationPeerHelperfor name/id/state/activation behaviorControl wiring and provider behavior
Added
OnCreateAutomationPeer()overrides in all relevant controls so each control returns a dedicated Dock peer.Implemented and exposed patterns where applicable:
IInvokeProviderISelectionProviderISelectionItemProviderIExpandCollapseProviderIScrollProviderIValueProvider(read-only where appropriate)Runtime event propagation
Hooked control property changes to peer notifications for:
IsSelectedIsOpen,SelectedItem,Items,ModeStatusThis ensures automation clients receive state-change events when interactive state updates.
Overlay template automation support
Updated fluent selector template (
src/Dock.Avalonia.Themes.Fluent/Controls/DockSelectorOverlay.axaml) to include:PART_ItemsListThis enables automation delegation for overlay selection and scrolling.
Reliability/leak-related cleanup in controls
Included lifecycle safety fixes in touched controls to prevent duplicate handlers/subscriptions and improve detach behavior:
DocumentTabStripwindow-drag attach/detach consistencyToolTabStriptemplate/container observable cleanupToolChromeControltemplate/handler detachment correctnessToolControlpointer handler detach on visual-tree removalRootDockControltemplate handler cleanup across re-apply/detachDragPreviewControlproperty owner registration fix forContentTemplateProperty2)
50b86eaactest(avalonia): cover automation peers, reader flows, and leaksAdded comprehensive automated coverage:
tests/Dock.Avalonia.HeadlessTests/AutomationPeersTests.cstests/Dock.Avalonia.HeadlessTests/AutomationReaderCompatibilityTests.cstests/Dock.Avalonia.HeadlessTests/DockSelectorKeyboardNavigationTests.csCtrl+Tab,Ctrl+Alt+Tab, arrows/tab, Enter, Esc, modifier release)tests/Dock.Avalonia.LeakTests/AutomationPeerLeakTests.cs3)
df23ead75docs(docfx): document dock accessibility automation modelDocumentation updates in
docfx/articles:Added new article:
dock-accessibility.mdAutomationPropertiesPART_ItemsList)Updated
dock-controls-reference.mdUpdated
dock-selector-overlay.mdUpdated
toc.ymlValidation Performed
Headless automation tests
dotnet test tests/Dock.Avalonia.HeadlessTests/Dock.Avalonia.HeadlessTests.csproj503passed,0failed)Release leak test for automation peers
dotnet test tests/Dock.Avalonia.LeakTests/Dock.Avalonia.LeakTests.csproj -c Release --filter "AutomationPeerLeakTests"1passed,0failed)Compatibility / Behavior Notes
PART_ItemsListin control templates.ISelectionItemProvider.Selectfor tab items now follows the same activation path as invoke behavior.AutomationProperties.NameandAutomationProperties.AutomationId.Files Changed (high-level)
src/Dock.Avalonia/Automation/Peers/*and related control wiring insrc/Dock.Avalonia/Controls/*src/Dock.Avalonia.Themes.Fluent/Controls/DockSelectorOverlay.axamltests/Dock.Avalonia.HeadlessTests/*,tests/Dock.Avalonia.LeakTests/AutomationPeerLeakTests.csdocfx/articles/dock-accessibility.md,docfx/articles/dock-controls-reference.md,docfx/articles/dock-selector-overlay.md,docfx/articles/toc.yml