如何让JAWS读取一个简单的标签?

发布于 2024-12-17 05:35:23 字数 527 浏览 3 评论 0原文

它应该很简单,但显然没有人知道:如果我将 Label 控件添加到基于 Windows 窗体的对话框,并且我希望 JAWS 读取该标签,我将如何实现这一目标?

对于按钮等其他控件使用 AccessibleDescription 效果很好,但它不适用于标签。即使 MS 似乎也不太像知道。我也问过 FreedomScientific,但他们只是给了我某种默认答案,例如

  • 检查 www.microsoft.com/enable
  • 阅读 JAWS 帮助文件
  • 使用 JAWS 脚本(尽管我不想直接控制 JAWS)
  • 公司的地址提供应用程序定制服务

都不是很有帮助。

It should be simple, but apparently no one knows: If I add a Label control to my Windows Forms based dialog, and I want this label to be read by JAWS, how would I achieve that?

It works fine using the AccessibleDescription for other controls like buttons, but it doesn't work with labels. Even MS does not quite seem to know. I also asked FreedomScientific, but they just gave me some kind of default answer like

  • Check www.microsoft.com/enable
  • Read the JAWS help file
  • Make use of JAWS scripting (I don't want to directly control JAWS though)
  • Addresses of companies who provide services for app customisation

All not very helpful.

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

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

发布评论

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

评论(5

青衫负雪 2024-12-24 05:35:23

我的 Windows 窗体应用程序遇到了这个问题。

JAWS 似乎不会自动读取静态屏幕文本。

按键盘上的“INSERT”+“B”会触发“读取当前窗口”JAWS 操作 - JAWS 然后读取 Label.AccessibleDescription 属性(以及其他屏幕详细信息)。

因此,您需要设置辅助功能属性,并且据我所知,用户必须执行 JAWS 击键才能读取标签。

I had this issue for my Windows Forms app.

It seems JAWS does not read static screen text automatically.

Pressing "INSERT" + "B" on the keyboard triggered the "Read Current Window" JAWS action - JAWS then read the Label.AccessibleDescription property (as well as other screen details).

So you need to set accessibility properties and the user has to perform JAWS keystrokes to read the labels so far as I can tell.

忘羡 2024-12-24 05:35:23

JAWS 不一定使用开发人员术语进行记录:如果您想要做的是 HTML,那么请查看 适用于 HTML 的导航快捷键或适用于您正在使用的元素类型的 JAWS 按键

尝试使用“F”表示 FORM,使用“H”表示 HEADING 或 INSERT+F5 以查看表单字段列表是否显示在列表中。 TITLE 没有什么特别之处,可以作为使用 JAWS 的最终用户的导航辅助工具(尽管对 JAWS 如何“呈现”它们进行逆向工程是一个简单的试验和错误)。

JAWS doesn't necessarily document using developer terminology: if what you are trying to do is HTML then look at the Navigation Quick Keys for HTML or the JAWS Keystroke for the type of element you are using.

Try using "F" for FORM or "H" for HEADING or INSERT+F5 to see if the list of form fields shows up in the list. There is nothing specific to TITLE as a navigation aid for end-users using JAWS (although reverse engineering how they are 'rendered' by JAWS is a simple trial and error).

一场信仰旅途 2024-12-24 05:35:23

我使用 AccessibleName 属性,并使用可以在该属性中读取的名称设置 TextBox、Button 和 ComboBox。这似乎适用于大多数事情。我还无法让它读取标签。如果标签显示动态数据,我建议将标签的动态部分(整体或部分)更改为文本框(可编辑或不可编辑),并设置其辅助功能名称。当它被切换到或获得焦点时,它应该准备好 AccessibleName,然后准备好值。因此 tbAmoundOwed 听起来应该像“欠款文本框 125.78 美元”(或类似的内容,具体取决于使用 Jaws 或其他阅读器。) **** 这仍然是一项正在进行的工作。我还没有找到如何读取 ListView 中的列标题。如果您将焦点设置到 ListView 中的一行,您通常还需要将焦点设置到 ListView 中。

I use the AccessibleName property and set the TextBox, Button and ComboBox with a name it can read in that property. That seems to work for most things. I cannot get it to read labels yet. If a label displays dynamic data I would suggest changing the dynamic portion of the label, whole or part, to a TextBox, editable or not, and setting its Accessibility name. When it gets tabbed to or gets focus it should ready the AccessibleName and then the value. So tbAmoundOwed should sound like "Amount Owed Text Box 125.78 dollars" (or something similar depending on using Jaws or another reader.) **** This is still a work in progress. I have not found how to read column headers in a ListView. If you set focus to a row in the ListView you will often need to also follow up by setting the focus to the ListView as well.

烟凡古楼 2024-12-24 05:35:23

默认情况下,如果标签的文本值单独位于整个表单上,JAWS 永远不会读取该文本值。但总的来说,这不是常见的情况。因此,如果表单上还有其他控件,如复选框、选项按钮、文本框等(以及标签),可以从属性窗口设置 tabStop 属性,那么此解决方案将起作用。在窗体上添加一个组框,并将标签和任何其他可聚焦控件放入组框内。将可聚焦控件的制表位属性设置为 True。现在,当应用程序启动并且由于 tabStop 属性设置为 true 的选项卡可停止控件而焦点到达组框内部时,JAWS 将读取标签的文本。

JAWS 中还有另一个虚拟化窗口的概念,需要编写一些脚本,但很少使用,而且它不是最终用户可以轻松使用的事实上的标准方法。

编辑 1:其他选项是使用文本框而不是标签。文本框是可聚焦的控件。现在显而易见的问题是文本框看起来如何像标签。设置以下两个属性以实现此目的:

  1. ReadOnly = True
  2. BorderStyle = None

编辑 2:您还可以考虑工具提示。可以启用 JAWS 中的设置来读取控件的工具提示。因此,如果有一对代表某个字段的标签和文本框控件,那么您可以将工具提示添加到文本框中,JAWS 可以读取该工具提示。

By default JAWS never reads label's text value if it is lying all alone on the whole form. But in general it is not that of a common scenario. So if you have other controls as well on the form like checkbox, option button, text box etc (along with the label) for which tabStop property can be set from properties window then this solution will work. Add a group box on the form and place the label and any other control focus-able control inside the group box. Set the tab stop property of the focus-able control to True. Now when application starts and the moment focus reaches inside the group box because of the tab stoppable control whose tabStop property is set to true, JAWS will read the text of the label.

There is another concept of virtualizing a window in JAWS for which some scripting is required but it is seldom used and it is not the defacto and standard way which can be easily used by end users.

Edit 1: Other option is to use a text box instead of a label. A text box is focus-able control. Now obvious ask would be that how would a text box look like a label. Set following two properties to make that happen :

  1. ReadOnly = True
  2. BorderStyle = None

Edit 2: You can also think of a tool tip. Settings in JAWS can be enabled to read tool tip of a control. So if there is a pair of label and text box control representing some field then you can add tool-tip to your text box which can be read by JAWS.

谁对谁错谁最难过 2024-12-24 05:35:23

我发现的最简单的方法是将样式设置为可选择并将制表位设置为 true。

/// <summary>
/// Label which can receive focus on tab. Used to communicate text to a screen reader.
/// </summary>
public class AccessibleLabel : Label
{
    public AccessibleLabel()
    {
        SetStyle(ControlStyles.Selectable, true);
        TabStop = true;
    }
}

The easiest way I've found is to set the style to selectable and set tab stop to true.

/// <summary>
/// Label which can receive focus on tab. Used to communicate text to a screen reader.
/// </summary>
public class AccessibleLabel : Label
{
    public AccessibleLabel()
    {
        SetStyle(ControlStyles.Selectable, true);
        TabStop = true;
    }
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文