WPF:如何让屏幕阅读器忽略进度栏状态更新?
最近,我一直在尝试让内置的 Windows 7 旁白/屏幕阅读器与我的 WPF 应用程序兼容。关于此的信息很少,但我读到的是我可以设置附加属性(AutomationProperties.HelpText、AutomationProperties.AutomationID)。
我遇到的问题是 UI 包含一个进度条,当前进度值在发生变化时由屏幕阅读器定期读出。在这种情况下,读出进度是不可取的,但我找不到关闭此功能的方法。我想也许我可以通过访问与该元素关联的 AutomationPeer 来设置它,但情况似乎并非如此(我可以强制引发事件,但我不能让它忽略事件)。
有谁知道有什么方法可以做到这一点?
Recently, I have been trying to get the built-in Windows 7 narrator/screen reader to be compatible with my WPF app. There is very little info about this, but what I have read is that I can set an attached property (AutomationProperties.HelpText, AutomationProperties.AutomationID).
The problem I am having is that the UI contains a progress bar and the current progress value is periodically read out by the screen reader as it changes. In this case, reading out the progress is not desirable but I cannot find a way to turn this off. I thought maybe I could set this by accessing the AutomationPeer associated with the element, but this doesn't seem to be the case (I can force an event to be raised, but I cannot have it ignore an event).
Does anyone know of a way to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这通常是由屏幕阅读器本身通过用户设置/选项控制的,而不是您可以在应用程序级别执行的操作。 Windows 附带的“讲述人”是一个相当基本的屏幕阅读器。与 Jaws 或 NVDA 等屏幕阅读器(更像 Word)相比,它更像是记事本或写字板级别。 “讲述人”的选项很少,而其他两个可能有各种选项,用户可以在屏幕阅读器说出特定事件时使用这些选项进行自定义。
所以,长话短说;你在这里无能为力。确保发送事件,这样屏幕阅读器就可以按照用户的指示选择读取或不读取它们。
另外,请记住,“讲述人”是一个基本的屏幕阅读器,大多数用户实际上会使用 Jaws(售价 800 美元左右)或 NVDA(免费!)之类的东西,因此请考虑使用这些工具进行测试,以更近距离地感受真实的内容 -世界屏幕阅读器用户将体验到。
This is something that's typically controlled by the screenreader itself, via user settings/options, not something you can do at the application level. Narrator, which comes with Windows, is a fairly basic screenreader; think of it more like a notepad or wordpad level compared to a screenreader like Jaws or NVDA, which are more like Word. Narrator has minimal options, while the other two likely have all sorts of options that the user can use to customize when the screenreader speaks out specific events.
So, long story short; there's nothing you can do here. Ensure that the events are sent, that way a screenreader can chose to read them or not read them, as the user directs.
Also, keep in mind that Narrator is a basic screenreader, most users will actually be using something like Jaws (which costs $800 or so) or NVDA (free!), so consider testing with those to get a closer feel for what a real-world screenreader user would experience.