菜鸟教程小白 发表于 2022-12-11 18:26:33

ios - 有没有办法在 iOS 应用程序中更改 VoiceOver 中默认辅助功能操作的文本?


                                            <p><p>我在我的应用中为 VoiceOver 用户添加了一些可访问性自定义操作,但默认情况下它显示“激活项目,默认操作”。 </p>

<p>通过使用转子,VoiceOver 用户将转子项目更改为操作,然后他们执行注册的自定义操作(如删除或共享项目)。但是他们有默认操作,即“激活项目”。有没有办法改变这个文本?我希望它说“播放这个项目”。或者,如果我可以禁用默认操作,它也对我有用。</p>

<pre><code>UIAccessibilityCustomAction *action1 = [ initWithName:@&#34;double tap to share&#34; target:self selector:@selector(voiceOverActionShare)];
UIAccessibilityCustomAction *action2 = [ initWithName:@&#34;double tap to view more info&#34; target:self selector:@selector(voiceOverActionMoreInfo)];
UIAccessibilityCustomAction *action3 = [ initWithName:@&#34;double tap to add to my list&#34; target:self selector:@selector(voiceOverActionAdd)];
UIAccessibilityCustomAction *action4 = [ initWithName:@&#34;double tap to play&#34; target:self selector:@selector(voiceOverActionPlay)];
</code></pre>

<p>这就是我添加可访问性自定义操作的方式。但是我得到了五个操作,因为它们具有默认操作,即“激活项目,默认操作”。我可以改变它说话的方式吗?我想让它像“播放这个项目”这样说。 </p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>我找不到任何方法来阻止读取默认操作 (iOS 10.2)。您可以考虑在 <a href="https://bugreport.apple.com" rel="noreferrer noopener nofollow">bugreport.apple.com</a> 提交增强请求.</p>

<p><em>旁注:</em>
您的问题可能说明了 VoiceOver 中的一个错误。设置 <code>UIAccessibilityTraitNotEnabled</code>,相当于禁用和调暗控件,防止调用 <code>acccessibilityActivate()</code>,但仍然允许您触发其他自定义操作。我已经提交了错误报告 (rdar://29941588)。</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 有没有办法在 iOS 应用程序中更改 VoiceOver 中默认辅助功能操作的文本?,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/41356451/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/41356451/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 有没有办法在 iOS 应用程序中更改 VoiceOver 中默认辅助功能操作的文本?