IOS - Is it possible to disable access to cell.textLabel.text?

I have an application that contains a view with a cell that uses the built-in cell.textLabel element and a custom UITextField in cell.contentView.

I work with Voiceover and accessibility, and the desired behavior will be that whenever I click anywhere in the cell, the accessibility element for the UITextField is selected.

The behavior that I actually see is that the accessibility labels of cell.textLabel are capturing. When I don't have cell.textLabel for anything, everything works as expected. I also tried setting the isAccessibilityElement property with no luck:

[cell.textLabel.text setIsAccessibilityElement:NO]; 

Does anyone know how to make this work the way I want?

+1
source share
1 answer

I was able to figure this out using this: cell.textLabel.accessibilityElementsHidden = YES;

+1
source

All Articles