dotnet / dotnet/wpf

HierarchicalDataTemplates creates TreeViewItems with bad default AutomationProperties.Name

Open
#2,552 0 comments 0 reactions 0 assignees View on GitHub
.NET Framework Accessibility accessibility mas
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

HierarchicalDataTemplates create TreeViewItems with bad default AutomationProperties.Name

Need a bad workaround to properly set AutomationProperties.Name.
(use a converter to set AutomationProperties.Name or TreeViewItem.Header)

To Repro:
1. Open .sln or .csproj in attached Zip
2. run app
3. use accessibility insights or narrator to read the 2nd level treeviewitems in the right tree view.

Expected:
Accessibility name is read as what is displayed in the treeviewitem.. ("net461", etc...)

Actual:
4. accessibility name is read as . of datacontext in that treeviewitem.

[WPFTreeViewAutomationNameTest.zip](https://github.com/dotnet/wpf/files/4188383/WPFTreeViewAutomationNameTest.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.