在 MaterialIO 填充的文本字段组件中不说前导和尾随视图的旁白

问题描述

这是我的代码。我添加了引导视图和信息按钮的可访问性,但画外音仍然不是说信息按钮。信息按钮和前导视图是可访问的元素。

let infoIconButton = UIButton.init(frame: CGRect.init(x: 0,y: 0,width: 15,height: 15))
infoIconButton.contentMode = .scaleAspectFill
infoIconButton.addTarget(self,action: #selector(infoButtonpressed(button:)),for: .touchUpInside)
infoIconButton.accessibilityLabel = "Icon button"
infoIconButton.setimage(UIImage.init(named: "iconu",in: nil,compatibleWith: nil),for: .normal)
            
textField.leadingviewmode = .always
textField.leadingView = infoIconButton
textField.leadingView?.isAccessibilityElement = true
textField.leadingView?.accessibilityTraits = .button
textField.leadingView?.accessibilityLabel = "Icon button"

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)