【问题标题】:accessibilityUserInputLabel in UIBarButtonUIBarButton 中的可访问性用户输入标签
【发布时间】:2021-03-15 10:31:29
【问题描述】:

我正在尝试将 accessibilityUserInputLabels 分配给 UIBarButtonItem 以进行语音控制以显示特定名称;请参阅下面的代码。

     /// Button 
  lazy var groupButton: UIBarButtonItem = {
    var button = UIBarButtonItem(imageName: "FunctionGroup1", target: self, action: #selector(barButtonHandler))
    button.accessibilityLabel = "Goodbye!"
    button.accessibilityUserInputLabels = ["Hello!"]
    return button
  }()

但是按钮只显示按钮的accessibilityLabel,而不是accessibilityUserInputLabels。

我使用的是 iOS 14 和 Xcode 12.4。

我错过了什么?

2021 年 5 月 11 日编辑:问题已报告给 Apple;见this

【问题讨论】:

    标签: accessibility uibarbuttonitem


    【解决方案1】:

    我有一个 similar issueUIBarButtonItems 不尊重 VoiceOver 中的可访问性属性。我向 Apple 报告了这个错误,它在 iOS 14.5 中得到了修复。如果这种行为是他们错过的另一个错误,我不会感到惊讶(我在 14.5 中复制了您的示例)。你应该报告这个:)

    【讨论】:

    • 好的。我编辑了我的问题并添加了一个指向向 Apple 报告的问题的链接。谢谢。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-04-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-07-24
    相关资源
    最近更新 更多