IronHide
IronHide

Reputation: 376

Is there a way to turn off narrator for specific xaml element but still provide automation name?

Accessibility Insights for Windows tool reports that "Name" attribute is missing for some elements e.g TreeView, this basically forces me to provide this attribute but in some cases it's not actually necessary for narrator to read this. So I am wondering if there is a way to make my application pass the tests in this tool but also skip narrator reading an AutomatinProperty.Name ?

Upvotes: 0

Views: 867

Answers (1)

Kelsey Pownell
Kelsey Pownell

Reputation: 46

I'm an engineer on the Accessibility Insights team. No, Accessibility Insights for Windows does not provide a way to turn off certain requirements.

Could you explain why you believe the TreeView does not require an accessible name, or give an example of a case where a name is not required? Screen readers typically do announce the name of a TreeView, which gives the user additional context about the tree (more information about TreeView and accessible names here).

Edit: It seems you were actually asking whether an element can be hidden from a screen reader without hiding all its children. While I'm not aware of a way to do that, it sounds like in the case you describe the text box is a label for the element that you want narrator to skip over. In this case, you can associate the label with the element by setting AutomationProperties.LabeledBy, which will serve the same purpose as the Name property (the first code example here shows how to do this). Does that help in your scenario?

Upvotes: 2

Related Questions