Open NeverMorewd opened 3 weeks ago
You can test this PR using the following package version. 11.3.999-cibuild0053100-alpha
. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]
@NeverMorewd,
Please read the following Contributor License Agreement (CLA). If you agree with the CLA, please reply with the following:
@cla-avalonia agree
@NeverMorewd,
Please read the following Contributor License Agreement (CLA). If you agree with the CLA, please reply with the following:
@cla-avalonia agree
Contributor License Agreement
@cla-avalonia agree
While this solves the described issue, I believe we shouldn't expose panels to automation at all.
The automation documentation for Pane states:
The Pane control type is for potentially scrollable regions that have disparate content. It is used to represent an object within a frame or document window. Users can navigate between pane controls and within the contents of the current pane.
Panels don't fall into this category (ScrollViewer
does and is exposed as a Pane). In my opinion they shouldn't appear in the automation tree. That's what WPF and UWP do.
Pinging @grokys for further input.
Currently. Panel is included in automation tree as a node whose LocalizedControlType
is "none".
Personally, I also think Panel shouldn't be exposed to automation. It's just a layout/container control.
What does the pull request do?
In the UI Automation tool (Inspect.exe), several container controls have their LocalizedControlType set to none. While examining the AvaloniaUI codebase, I found that
AutomationControlType.Panel
is defined but not properly applied. This should be addressed by implementing a newPanelAutomationPeer
to provide the correct control type information.What is the current behavior?
The LocalizedControlType of
Panel
is noneWhat is the updated/expected behavior with this PR?
The LocalizedControlType property of a
Panel
can show descriptive textHow was the solution implemented (if it's not obvious)?
Checklist
Breaking changes
Obsoletions / Deprecations
Fixed issues