Home > front end >  How can I make VoiceOver in Xamarin not read out the type of view?
How can I make VoiceOver in Xamarin not read out the type of view?

Time:09-28

So - I have an Image that is used as a Button.

someKindOfButton = new Image
{
   Source = //...
   // stuff like height and width and stuff
};
TapGestureRecognizer tappedImage = new TapGestureRecognizer();
tappedImage.Tapped  = TappedTheImage; // a method to change the value the image is bound to

I am adding this Image to my accessibility tree

someKindOfButton.SetAutomationProperties("Page.Image.someKindOfButton", "click this nice button")

But when i focus on this nice button, it reads "Click this nice button - Image".

I am now not sure, why this is and how to not make it read "Image". This is also not a single issue, I also have it read some other widgets in other places I don't want it to, like "Page Title Name - Padding". Some places I want it to be like that, some I don't want it to be like that.

Have I provided enough information to produce a solution? I am relatively new to accessibility and xamarin and am working on an existing project - so if more details are needed please comment them so I can provide them.

CodePudding user response:

UPDATE: the best solution would be to use the button instead and assign the image to it. While it will pronounce the 'button' this won't be confusing.

VoiceOver needs to tell the type of the control so that user can be aware of the actions that he can perform. For example if you navigate to the table it is critical to know that it is the table as it has very specific commands that other controls don't support. In some way that is similar to what the person without eyesight problems experience - he knows that it is the table and there is no way you can hide that fact from him.

So as far as I know it is not possible and I think it is not possible for the good reason.

  • Related