Implementing support UIA Provider for TreeView control#6432
Implementing support UIA Provider for TreeView control#6432Tanya-Solyanik merged 2 commits intodotnet:mainfrom
Conversation
17e4d73 to
0a57be8
Compare
vladimir-krestov
left a comment
There was a problem hiding this comment.
Great work!
Awesome description!
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Outdated
Show resolved
Hide resolved
WPMGPRoSToTeMa
left a comment
There was a problem hiding this comment.
Thank you, you've done an amazing work!
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeView.TreeViewAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeView.TreeViewAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeView.TreeViewAccessibleObject.cs
Show resolved
Hide resolved
...Windows.Forms/tests/UnitTests/System/Windows/Forms/TreeView.TreeViewAccessibleObjectTests.cs
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeView.TreeViewAccessibleObject.cs
Outdated
Show resolved
Hide resolved
0a57be8 to
7b5902b
Compare
b51e9c5 to
6d9dfff
Compare
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Outdated
Show resolved
Hide resolved
6d9dfff to
944d0f3
Compare
Tanya-Solyanik
left a comment
There was a problem hiding this comment.
Looks good, please send to testing!
|
I've sent it for testing. |
|
One regression and one not regression have been found. So still WIP status, I am working on this. |
<!-- Please read CONTRIBUTING.md before submitting a pull request --> Resolve comment from pr #6432 ## Proposed changes - Remove call empty ctor of Accessible Object class in inherited classes. <!-- We are in TELL-MODE the following section must be completed --> ## Customer Impact - No ## Regression? - No ## Risk - No
Tanya-Solyanik
left a comment
There was a problem hiding this comment.
Please see my questions, otherwise looks good.
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeView.TreeViewAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeView.TreeViewAccessibleObject.cs
Outdated
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Outdated
Show resolved
Hide resolved
| { | ||
| get | ||
| { | ||
| AccessibleStates state = AccessibleStates.Selectable | AccessibleStates.Focusable; |
There was a problem hiding this comment.
Please check, if a node really selectable and focusable if its TreeView control is disabled. If no, please add a condition
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Show resolved
Hide resolved
src/System.Windows.Forms/src/System/Windows/Forms/TreeNode.TreeNodeAccessibleObject.cs
Outdated
Show resolved
Hide resolved
| { | ||
| get | ||
| { | ||
| AccessibleStates state = AccessibleStates.Focusable; |
There was a problem hiding this comment.
Please add Enabled check for it
|
|
||
| #region Selection Pattern | ||
|
|
||
| internal override bool IsSelectionRequired => true; |
There was a problem hiding this comment.
I'm not sure. If a TreeView can have noone selected item, it's may not be true. Please check it.
...Windows.Forms/tests/UnitTests/System/Windows/Forms/TreeNode.TreeNodeAccessibleObjectTests.cs
Outdated
Show resolved
Hide resolved
194bf71
c1a0760 to
194bf71
Compare
Tanya-Solyanik
left a comment
There was a problem hiding this comment.
Looks good.
@DmitryGorokhov - please investigate if providers are disconnected properly on containing window close. @ArtemTatarinov might be able to help with this investigation.
@vladimir-krestov - looks like all you comments were addressed, please take another look.
Implemented accessible objects for TreeView and TreeNode. Added needed automation events. Added unit tests.
194bf71 to
9966523
Compare








Implemented accessible objects for TreeView and TreeNode. Added needed automation events and unit tests.
Implements part of #3421
Proposed changes
SupportsUiaProvidersproperty ofTreeViewclass.TreeViewandTreeNodeclasses.Customer Impact
TreeViewcontrol accessibility.Regression?
Risk
Screenshots
Inspect
TreeViewbefore and afterDefault
TreeNodebefore and afterExpanded
TreeNodebefore and afterLeaf
TreeNodebefore and afterCheckBox
TreeNodebefore and afterInvisible
TreeNodebefore and afterEditable
TreeNodebefore and afterAccessibility Insights
There is no specific errors. You can see errors on next image, but they are not about accessibility changes were created in this PR.
Narrator
Expand and collapse default node before and after
Check and uncheck node before and after
Edit default node before and after
ScrollIntoViewmethod comparisonScrollIntoViewmethod beforeScrollIntoViewmethod afterThis realization sets calling node as
TopNodeofTreeViewif the node is invisible. Looks like it works the same.Focus on
TreeViewissueBy default, when we focus on a
TreeViewcontrol, Inspect and Narrator highlight theSelectedNodeofthis control. As I know it takes raise an events for a selected node accessible object to notify it was focused. But calling AccessibilityObject forces creation the object. It takes accessible object of the tree, so forces creating the object if it doesn't exist yet.
To avoid force creation if this is not needed should use check
IsAccessibilityObjectCreated. But I found next problem when I try to add this check. Highlight after focus doesn't work for the first time if the control has firstTabIndexon form. You can see this issue behavior below.Focus on the control with check
IsAccessibilityObjectCreatedIt works incorrect.
Focus on the control without check
IsAccessibilityObjectCreatedIt works great, but not safety due to forcing the object creating.
It was not so easy for me to resolve it in the fix. So I skipped this problem and took implementation without the check. I guess this problem needs to be investigated and resolved in out of scope issue.
Additional note
I take it if node is check box it has
DefaultActionequalsCheckorUncheckbut before the fixDoDefaultActiondoes nothing in this case. I configured this method, so it performsTogglemethod ofTreeNodeAccessibleObjectin this case.Test methodology
Accessibility testing
Test environment(s)
Microsoft Reviewers: Open in CodeFlow