I've got a set of UIImageViews contained inside of a UIScrollView. For some reason, when I go to have Voice Over read all the elements on the page, it does not read the ImageView like it should. I set up the UIImageView's accessibility info like so:
if (self.featuresModel.imageText) {
self.featureImage.isAccessibilityElement = YES;
self.featureImage.accessibilityLabel = self.featuresModel.imageText;
}
I've checked that the UIScrollView is not set to be accessible, so it's not intercepting the touches. It seems to show it will work in the simulator, when I click on the image it pops up the correct label and highlights the correct area, however, on a physical device, clicking or trying to read all elements on the page does nothing when it gets to the UIImageView.
Any ideas on how to remedy this issue?
Edit: The scrollView class is a custom subclass of UIScrollView that doesn't implement UIAccessiblity protocol directly, however, since it uses a UIScrollView as its underlying data structure, I don't think this should matter much, however, as I still don't know much about UIAccessibility I thought I should mention it.
Make sure you enabled the accessibility for your imageview on storyboard/nib.
IF you set the isAccessibilityElement to YES, the voice over highlights it and reads it. Again the accessibility for that element should be enalbled in nib.
IF you set the isAccessibilityElement to NO, the voice over doesnt highlights it and doesnt reads it, even the accessibility for that element is enalbled in nib.
Note: Voice over doesnt care about scrolview.It only care about the elements in the scroll view. You can change the order of the accessibility elements if you want.Or you can disable the accessibility for the elements in the scroll view.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With