简体   繁体   English

防止 jaw 在密码类型输入字段中读取“密码”两次

[英]Prevent jaws from reading "password" twice in password-type input fields

I have a password field that is reading out "password: password" by JAWS screen reader.我有一个密码字段,由 JAWS 屏幕阅读器读出“密码:密码”。 I want to change that so it only reads out "password" once.我想改变它,让它只读出一次“密码”。 I tried various things such as using an aria-hidden tag or aria-label=" " but I still get the same results.我尝试了各种方法,例如使用aria-hidden标签或aria-label=" " ,但我仍然得到相同的结果。 There was an identical question asked 5 years ago, however there was never a perfect answer given as the one marked still had its issues. 5 年前有人问过一个相同的问题,但是从来没有给出完美的答案,因为标记的问题仍然存在。 Link to that here .链接到这里

Code example:代码示例:

<label for='password' id='login-password-label'>Password:</label>

<input type="password" name="password" required="required" tabindex="2" id="password" maxlength="20" />

What else can I try to prevent JAWS from reading out password twice in the password field?我还能尝试什么来阻止 JAWS 在密码字段中两次读出密码? I'm using Chrome browser.我正在使用 Chrome 浏览器。

The speech output I get from JAWS 2022 in Chrome 95 is: "Password: password edit Required invalid entry".我在 Chrome 95 中从 JAWS 2022 获得的语音 output 是:“密码:密码编辑所需的无效输入”。

The reason you're getting a second "password" there is not because JAWS is repeating the field label but because JAWS is announcing the <input> field type, which in this case is a password field.您获得第二个“密码”的原因不是因为 JAWS 重复字段 label,而是因为 JAWS 宣布了<input>字段类型,在本例中是密码字段。

Screen readers treat password fields differently from regular text fields because passwords contain sensitive information which is not read out in the same was as regular text fields.屏幕阅读器对待密码字段的方式与常规文本字段不同,因为密码包含敏感信息,这些信息不会像常规文本字段那样被读出。 So the screen reader has to announce to the user that the edit field is a password field, hence the second "password" announcement in your example.因此屏幕阅读器必须向用户宣布编辑字段是密码字段,因此您的示例中的第二个“密码”公告。

Back to your question, it's not advisable for you to circumvent JAWS announcing the field type (the second "password" bit in your announcement) because it's standard screen reader behaviour and would violate accessibility guidelines.回到你的问题,不建议你绕过 JAWS 宣布字段类型(你的宣布中的第二个“密码”位),因为它是标准的屏幕阅读器行为并且会违反可访问性指南。 In any case, many JAWS users would be familiar with this type of speech pattern when they encounter a standard password edit field on a web page.无论如何,当许多 JAWS 用户在 web 页面上遇到标准密码编辑字段时,他们会熟悉这种类型的语音模式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM