Updated on August 1, 2023
Applies to v23.2.1+.
This change applies to the BaseListBoxControl
class (and its descendants).
What Changed
Previously, multiple WinForms Editors had their UseTextForAccessibility styles enabled. The second parameter for methods that enabled this style is now "false".
C#// Prior to v22.1
editor.SetStyle(ControlStyles.UseTextForAccessibility, true);
// v22.1
editor.SetStyle(ControlStyles.UseTextForAccessibility, false);
This change applies to the following classes (and their descendants):
- TextEdit
- ProgressBarBaseControl
- ToggleSwitch
- RichEditControl
Reasons for Change
If the UseTextForAccessibility style is enabled and the control's Active Accessibility name is not set, this name equals the editor's value (text). This should not be the case for controls whose values change frequently.
Impact on Existing Apps
The accessible name of affected controls no longer equals these controls' text values. If you had no accessibility tests that retrieved controls by their names, these tests can fail for editors whose accessible names were not set.
How to Revert to the Previous Behavior
It is not recommended to revert to the previous behavior and set the Active Accessibility name for affected editors manually.
If you cannot follow this recommendation, set the DefaultSettingsCompatibilityMode property to "v21_2". Alternatively, you can enable the static WindowsFormsSettings.UseEditorTextAsAccessibleName
property.