Closed shcummin closed 4 years ago
There was a change made for (I believe .NET 4.7.1) that fixes this. The target framework of the application determines the state of several accessibility feature AppContext flags that guard many of the accessibility fixes.
In this case, you need to ensure that Switch.UseLegacyAccessibilityFeatures
is set to false
in your application. If you are targeting 4.7.1+ you get this for free, but if your target framework is lower, you will need to set this manually. See this page for a rundown of these switches and their use.
It's worth noting that if you target 4.6 (setting the correct flags) you still won't see this behavior until you run on a machine where the installed framework version is 4.7.1+. If you're running on an installed version of 4.6, the code simply doesn't exist so there is nothing for the flag to enable.
By the way, the line you're specifically interested in from the webpage is probably:
"In .NET Framework 4.7 and earlier versions, PasswordBox controls were announced as “no item in view” or had otherwise incorrect behavior. This issue is fixed starting with .NET Framework 4.7.1."
You can see the fixed code here.
Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? No
Problem description: Tab/narrator behavior for PasswordBox in .NET 4.6 seems to be incorrect and inconsistent with .NET 4.7.2/.NET 4.8
Actual behavior:
Narrator will not read PasswordBox - "foo" - unless the project is built with .NET 4.7+
Expected behavior:
Same behavior as .NET 4.8 - tabbing through the three items reads each automation name.
Minimal repro:
See above