- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在 iOS 中使用 Voice Over 时,调用 UIAccessibility.post(notification:argument:)
宣布字段错误实际上并不宣布错误。
我有一个提交按钮,当聚焦按钮时,旁白会按照您的预期读取按钮标题。按下按钮时,画外音会再次朗读标题。当按下提交按钮时,我正在做一些验证,当出现字段错误时,我试图通过调用来宣布它:
if UIAccessibility.isVoiceOverRunning {
UIAccessibility.post(notification: .announcement, argument: "my field error")
}
NotificationCenter.default
,我假设它是在它发布的同一个线程上处理的。我试图将调用分派(dispatch)到主队列,即使它已经在主线程上,但这似乎也不起作用。
最佳答案
这是一个公认的 hacky 解决方案,但我能够通过稍微延迟调度到主线程来防止系统通知抢占我自己的通知:
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
UIAccessibility.post(notification: .announcement, argument: "<Your text>")
}
关于ios - 为什么是 UIAccessibility.post(notification : . 公告,参数 : "arg") not announced in voice over?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55522345/
我收到这个错误信息 Parse error: syntax error, unexpected $end in E:\xampp\htdocs\announcements\announcement.p
有人可以帮助我吗? 以下代码可以工作,但不幸的是需要调用 doSomething() 函数: function Startscreen() { this.doSo
先决条件:无障碍对讲开启。 问题:当从软键盘向编辑文本输入字符时,字符被读出两次。(我想一次是通过键盘,一次是通过编辑文本)。 最佳答案 问题:视力正常的用户不能很好地理解/理解盲人用户需要的信息类型
我想为我自己的应用程序实现“使用 Siri 发布消息”功能。除了来自 Apple 的消息,我还没有看到任何能够做到这一点的应用程序。所以我不知道它是否已经可用。 Apple 宣布它没有任何明确的限制,
我有一个有很多公告的网站。 我想为我的公告进行无限滚动加载。 实际上,这就是我的 twig.html 中的内容 {% extends 'base.html.twig' %} {% block body
我注意到在各种网络应用程序中,用户会收到初始公告的提示,以帮助他们首次使用该应用程序(并且用户可以选择单击“以后不再显示此消息”或其他内容类似) 有插件吗?或者,您是否会简单地编写用户和公告之间的多对
我有一个使用已知 URI 托管的托管发现服务。我有一个可发现的服务,当它启动时,它会使用添加到服务的 ServiceDiscoveryBehavior 的AnnouncementEndpoint 来宣
我正在尝试向 bittorrent 跟踪器服务器发出 HTTP 请求以获取对等列表。 #include #include #include #include // for gethostby
在 iOS 中使用 Voice Over 时,调用 UIAccessibility.post(notification:argument:)宣布字段错误实际上并不宣布错误。 我有一个提交按钮,当聚焦按
根据w3 documentation我们可以使用 aria-live属性告诉屏幕阅读器在 HTML 元素发生更改时读取其文本内容。但是,就我而言,我不会更新任何文本,只是希望屏幕阅读器能够宣布 的内
我在布局中有一个 ImageView,内容描述 = '关闭'。打开 Talkback 时,它会显示“关闭按钮,不在列表中”。为什么 Talkback 还会说“不在列表中”,我该如何避免? 附言布局中还
在包含数据库分片 gem octopus 后出现以下错误在我的申请中......任何人都可以帮助我吗?...... /usr/lib/ruby/gems/1.8/gems/activesupport-
我输入了 在我的 React js 文件上,保存文件后,我在 GitBash 上收到一条错误消息,说, Redundant alt attribute. Screen-readers already
我试过下面的代码: wprintf(L"1 %s\n","some string"); //Good wprintf(L"2 %s\n",L"some string"); //Not good ->
我想要一个可以监听所有接口(interface)并为每个接口(interface)发布发现公告的可发现服务。我希望最终能够使用 tcp://0.0.0.0:0/blah 作为服务端点在配置文件中配置它
我是一名优秀的程序员,十分优秀!