I'm adding some accessibility custom actions for VoiceOver users in my app but by default it says "activate item, default action".
By using rotor, VoiceOver users change rotor item to actions then they perform registered custom actions (like delete or share item). But they have their default action which says "activate item". Is there a way to change this text? I would want it to say "play this item". Or it will also work for me if I can disable default action.
UIAccessibilityCustomAction *action1 = [[UIAccessibilityCustomAction alloc] initWithName:@"double tap to share" target:self selector:@selector(voiceOverActionShare)];
UIAccessibilityCustomAction *action2 = [[UIAccessibilityCustomAction alloc] initWithName:@"double tap to view more info" target:self selector:@selector(voiceOverActionMoreInfo)];
UIAccessibilityCustomAction *action3 = [[UIAccessibilityCustomAction alloc] initWithName:@"double tap to add to my list" target:self selector:@selector(voiceOverActionAdd)];
UIAccessibilityCustomAction *action4 = [[UIAccessibilityCustomAction alloc] initWithName:@"double tap to play" target:self selector:@selector(voiceOverActionPlay)];
This is how I add accessibility custom actions. But I get five actions as they have default action which says "activate item, default action". Can I change the way it speaks? I want it to say like "Play this item".
I cannot find any way to prevent the default action from being read (iOS 10.2). You might consider filing an enhancement request at bugreport.apple.com.
Side note: Your question may have illuminated a bug in VoiceOver. Setting
UIAccessibilityTraitNotEnabled
, which is equivalent to disabling and dimming the control, preventsacccessibilityActivate()
from being called, but still allows you trigger other custom actions. I've filed a bug report (rdar://29941588).