如何启用屏幕阅读器的“浏览模式”在自定义应用程序中?

发布于 2025-01-12 10:36:58 字数 688 浏览 0 评论 0 原文

NVDA 等屏幕阅读器实现两种操作模式: accessibility-developer-guide.com/knowledge/screen-readers/desktop/browse-focus-modes/" rel="nofollow noreferrer">浏览模式和焦点模式。

  • 浏览模式用于阅读网站/文档/应用程序。屏幕阅读器将读取所有可见内容。
  • 为了与网站/文档/应用程序进行交互,焦点模式提供了一些优势:仅读取交互内容部分。在网站中,这意味着可以读取链接、按钮、表单和导航,但不读取普通文本。

在 NVDA 中,您通常可以使用 Insert+Space 在浏览模式和焦点模式之间切换,然后通过声音进行确认。这适用于大多数应用程序:浏览器、Windows 资源管理器、Skype、VS Code。

但是,在我自己的 WPF 应用程序(例如具有辅助功能标签)中,当我按 Insert+Space 时,没有任何反应。 NVDA似乎始终处于焦点模式,并且没有浏览模式。

直观上这是有道理的,因为对于浏览模式,屏幕阅读器需要“知道”它应该读取哪些元素以及以什么顺序。

我不知道从哪里开始实施它。这是 WPF 的常见问题吗?这是 NVDA 的问题吗?它需要知道应用程序是否支持浏览模式?

Screen readers like NVDA implement two modes of operation: Browse Mode and Focus Mode.

  • Browse Mode is for reading a website/document/application. The screen reader will read all visible contents.
  • To interact with the website/document/application, Focus Mode offers some advantages: only the interactive content parts are read. In a website, this would mean that links, buttons, forms and navigation are read, but normal text is not read.

In NVDA, you can usually switch between Browse and Focus mode with Insert+Space, which is then confirmed by a sound. This works in most applications: Browsers, Windows Explorer, Skype, VS Code.

However, in my own WPF application (which e.g. has accessibility labels), when I press Insert+Space, nothing happens. NVDA seems to always be in Focus Mode, and there is no Browse Mode.

Intuitively this makes sense, because for Browse Mode, the screenreader needs to "know" what elements it should read, and in what order.

I have no clue where to begin implementing it. Is this a common WPF problem? Is it a problem of NVDA, which somehow needs to know that the application is capable of Browse Mode?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

无语# 2025-01-19 10:36:58

您是否可以在关闭辅助功能编译器选项的情况下构建应用程序?您可以检查以下内容:

如果您在 Windows 上运行内置计算器应用程序,它会遇到与您的应用程序相同的问题。您始终处于表单模式,并且 Ins+space 不会切换到浏览模式。然而,计算器应用程序中实际上没有任何“纯文本”可供阅读。每个元素都是一个交互元素。

但是,“设置”应用程序确实有一些纯文本,并且也存在同样的问题。我可以导航到所有交互元素,但无法访问“更多地利用 Windows”文本或其下方的文本。从视觉上看,它看起来像是一个标题后面跟着一个段落,但切换到 NVDA 浏览模式不起作用。

“设置应用程序的屏幕截图,右上角的文本突出显示”"

Is it possible you built your application with the accessibility compiler option turned off? Here are a few things you can check:

If you run the built-in calculator app on Windows, it has the same problem as your app. You're always in forms mode and Ins+space won't switch to browse mode. However, there isn't really any "plain text" to read in the calculator app. Every element is an interactive element.

However, the Settings app does have some plain text and it has the same problem too. I can navigate to all the interactive elements but I can't get to the "Get even more out of Windows" text or the text underneath it. Visually it looks like a heading followed by a paragraph but switching to NVDA browse mode doesn't work.

screenshot of settings app, text in upper right corner highlighted

草莓味的萝莉 2025-01-19 10:36:58

这似乎是 NVDA 检测应用程序可访问性的方式:

通常,NVDA 使用 IAccessible2 API 从 Chrome 获取辅助功能信息。使用此嵌入式版本的 Chrome,NVDA 似乎无法查询 IAccessible2 接口,并回退到普通的 IAccessible/MSAA。我也在 Qt 的嵌入式 Chrome 版本中看到了这一点。很确定这是 Chrome 嵌入式版本的问题。

来源:https://github.com/nvaccess/nvda/issues/13493

Seems this is the way NVDA detects accessibility of an application:

Normally, NVDA uses the IAccessible2 API to get accessibility information from Chrome. With this embedded version of Chrome, NVDA seems to be unable to query the IAccessible2 interfaces and falls back to plain IAccessible/MSAA. I've seen this in embeded Chrome versions in Qt as well. Pretty sure it is a problem in the embedded version of Chrome.

Source: https://github.com/nvaccess/nvda/issues/13493

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文