Windows Automation tree breaking change
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
### Description
Dotnet 8 renders the controls in the Windows automation tree differently compared to earlier dotnet versions.
Buttons in an itemscontrol can't be found anymore, breaking the existing automation.
Using the "Accessabilitiy Insights for Windows" shows a different graph compared to dotnet 6/7 (see below)
### Reproduction Steps
[WpfApp3.zip](https://github.com/dotnet/wpf/files/13917169/WpfApp3.zip)
### Expected behavior
With `net7.0-windows` , the automation tree looks like
pane "Desktop 1"
window "MainWindow"
title bar ''
button "TopButton"
button "ItemButton1"
### Actual behavior
With `net8.0-windows`, the automation tree looks like
pane "Desktop 1"
window "MainWindow"
title bar ''
button "TopButton"
list view #note that here was the "ItemButton1" - now it is not present anymore!
### Regression?
Yes
### Known Workarounds
_No response_
### Impact
The UI Tests for our applications breaks; need workarounds
### Configuration
Microsoft.WindowsDesktop.App 8.0.1
Microsoft.NETCore.App 8.0.1
windows 10.19045.3803
x64
Vs2022
### Other information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.