uitableviewuiaccessibilityaccessoryviewdisclosure

UITableViewCellAccessoryDisclosureIndicator is not accessible


I have a table view that its cell's accessory type has been set to UITableViewCellAccessoryDisclosureIndicator. But only the text is accessible when voice over is on and not the DisclosureIndicator. In the Settings app, cells are read like "General Button". I basically want to have this behaviour in my app too.

Any help would be appreciated.


Solution

  • If you want to inform the user that an element behaves like a button, you can add the "button" trait to it.

    yourElement.accessibilityTraits |= UIAccessibilityTraitButton;
    

    Doing this will have the system read a localized version of "Button" after reading the label of that accessibility element.