Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to stop VoiceOver announcement for UISegmentedControl?

My app has a UISegmentedControl that contains two buttons. I'm able to access each button's accessibility fields; the problem I'm having is that for subviews of a segmented control, VoiceOver reads out the subview's accessibility properties and then announces the view's position within the segmented control, so the VoiceOver announcement for the first button is "Previous message. Button. One of two." and for the second button it's "Next message. Button. Two of two."

How can I prevent the last part of these announcements (the "one of two" and "two of two" parts), which have no real meaning to VoiceOver users?

like image 942
MusiGenesis Avatar asked Mar 14 '13 16:03

MusiGenesis


People also ask

How do I Turn on/off voiceover?

When you hear "VoiceOver off," you’ll know that VoiceOver is disabled. To turn VoiceOver back on, triple-click the Home button once more. If you have multiple options assigned to triple-click (such as Voice Over, Assistive Touch, etc.), you'll need to select which one you want to turn off.

Why do I hear voice narration when I change the volume?

If you are hearing voice narration while preforming an activity on the TV, such as changing the volume, an accessibility function has been turned on. Use the following steps to review and turn off your accessibility settings: Press the HOME button.

How do I Turn Off voice narration on my Samsung TV?

Turn off voice narration when changing volume, channels or browsing the menu. Press the HOME button. Select Settings and press the Enter button. Press the Down arrow button to select Accessibility, and press the Enter button. Press the Down arrow button to scroll through the available settings. ...

How do I Turn on voice control on my iPhone?

Using the Settings App Tap your iPhone's Settings once to select it and twice more to open it. Tap General once to select it and then twice more to open it. Tap Accessibility once to select it and then twice more to open it. Tap VoiceOver once to select it and then twice more to open it.


1 Answers

You can set accessibilityTraits property of UISegmentedControl's subviews to UIAccessibilityTraitNone to disable "Tab X of Y" part of the VoiceOver:

    for (UIView *thisView in self.segmentedControl.subviews) {
        [thisView setAccessibilityTraits:UIAccessibilityTraitNone];
    }
like image 132
proxi Avatar answered Oct 17 '22 00:10

proxi