VoiceOver behavior for UIImageView in iOS 14

Hi,

I have an empty sample app with the following code in viewDidLoad in ViewController.m. The image blueSky.jpg is added directly in the project rather than in an asset catalogue to mimic some existing code I inherited recently.

With this code, if I turn on VoiceOver on device and start up the app, it will say "I am not a description", pause for a moment, say "image", then describe the image "blue sky, clouds", on iOS 14. On iOS 13 it will read the accessibilityLabel and that's it.

My question is - how do I turn off the image describing in iOS 14? It's redundant and for some of the other images I have in my project it is just outright incorrect. Been looking high and low for two days. Please advise. :(

Code Block
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"blueSky.jpg"]];
imageView.isAccessibilityElement = YES;
imageView.accessibilityLabel = @"I am not a description";
CGPoint origin = imageView.frame.origin;
origin.y = 50;
origin.x = 50;
CGRect imageFrame = imageView.frame;
imageFrame.origin = origin;
imageView.frame = imageFrame;
self.view.isAccessibilityElement = NO;
[self.view addSubview:imageView];

Answered by abushnaq-work in 659506022
Seems like I was missing the trait:
imageView.accessibilityTraits = UIAccessibilityTraitNone;

That tells the system not to consider it an image and that fixes it!
Accepted Answer
Seems like I was missing the trait:
imageView.accessibilityTraits = UIAccessibilityTraitNone;

That tells the system not to consider it an image and that fixes it!
I have this same problem with a button image whenever the button showsTouchWhenHighlighted is set to true.

Setting accessibilityTraits = .none on the imageView property or the imageView?.image property does not help, either.
VoiceOver behavior for UIImageView in iOS 14
 
 
Q