I am looking into adding accessibility support to a WPF application. This article describes guidelines for introducing accessibility support into an application:
WPF Accessibility for Developers
In this article it describes setting the Name property on controls, as follows:
The Name for an automation element is assigned by the developer. The Name property should always be consistent with the label text on screen. For example, the Name must be “Browse…” for the button element with “Browse…” as the label. Do not include the control role or type information such as “button” or “list” in the Name. This will cause conflict with the text from LocalizedControlType property. The control type and control patterns are responsible for describing the functionality, not the Name, of an element.
The application additionally needs to support localization and different languages. My question is on the above mentioned Name property: Does it it need to be localized or is setting it with English text in XAML sufficient?
Update:
The answer is yes! Here is an additional article I found: Using UI Automation for Automated Testing, which states:
NameProperty
This is a text string that identifies or explains a control. NameProperty should be used with caution since it can be localized.
I don’t have any experience with WPF but believe it does need to be localized. Screen readers often support multiple languages, and it would be confusing for a button name property to be read in English when the rest of the application is read in Spanish.