Can we prevent Narrator from speaking UI control's name?
Hello,
I'm working on WinUI2 app with XAML island in purely C++ (no XAML code). I want to support Narrator screen reader for my app. I tried to set accessibility props (name and helpertext) for UI controls. While this props are being read by Narrator, it is also speaking UI controls' technical names (e.g., Button, ComboBox).
I want to know if we can control it to not speak technical names of UI controls. Because I think technical names are not relevant to the user.
ComboBox myComboBox;
myComboBox.PlaceholderText(L"Choose an option");
// Add items
myComboBox.Items().Append(winrt::box_value(L"Option 1"));
myComboBox.Items().Append(winrt::box_value(L"Option 2"));
// Accessibility
winrt::Windows::UI::Xaml::Automation::AutomationProperties::SetName(myComboBox, L"Options Dropdown");
winrt::Windows::UI::Xaml::Automation::AutomationProperties::SetHelpText(myComboBox, L"Select one of the available options from the dropdown.");
winrt::Windows::UI::Xaml::Automation::AutomationProperties::SetIsRequiredForForm(myComboBox, true);
In this code snippet, as shown, trying to set accessibility props for a ComboBox. Narrator is telling user that "it is a ComboBox" (in a way). I want to prevent Narrator speaking the word "ComboBox". I want Narrator to speak "Options Dropdown" when this is in focus.
Any suggestions/help is appreciated.