【问题标题】:VoiceOver ignores accessibilityHint in UIBarButtonVoiceOver 忽略 UIBarButton 中的可访问性提示
【发布时间】:2014-06-13 18:34:59
【问题描述】:

我的导航栏中有一个自定义按钮。

在界面生成器中无法使用条形按钮编辑辅助功能,所以我在代码中完成了:

self.addressBookButton.isAccessibilityElement = YES;
self.addressBookButton.accessibilityLabel = @"Contacts";
self.addressBookButton.accessibilityHint = @"Selects a phone number.";

在模拟器和设备中,VoiceOver 会忽略仅发音标签的提示:

“联系人,按钮。”

【问题讨论】:

  • 您确定提示也应该发音吗? (询问原因是我没有使用可访问性)。
  • 我不认为 UIBarButtonItems' accessibilityHint 属性被使用。我无法让它工作,而且标准的 Apple 应用程序都没有提示栏按钮项目。您可以尝试制作一个常规 UIButton,为其添加提示,然后使用 initWithCustomView:。 (我不确定它是否会起作用。)
  • @LordZsolt 提示应该在短暂的停顿后发音。
  • 另外:我建议使用NSLocalizedString。
  • @AaronBrager 感谢您的建议。我还没有开始本地化,但我会的。

标签: ios uibarbuttonitem voiceover


【解决方案1】:

我没有使用backBarButtonItem,而是使用leftBarButtonItem。

我建议您在 another question 的导航栏中为自定义后退按钮使用 VoiceOver 实现,您应该会感兴趣。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-11-26
    • 1970-01-01
    • 2020-05-09
    相关资源
    最近更新 更多