简体   繁体   English

屏幕阅读器的可访问性:我的按钮应该有多“说话”?

[英]Screen reader accessibility: How “talky” should my button be?

I'm trying to improve screen reader support on our webapp, but I'm struggling a bit with what the best practice is for our buttons. 我正在尝试改善对Web应用程序的屏幕阅读器的支持,但是我在为按钮的最佳做法方面有些挣扎。 Our current pattern looks something like this 我们当前的模式看起来像这样

If I focus on the button, should the screen reader say... 如果我专注于按钮,屏幕阅读器应该说...

...Choose file, required? ...选择文件,需要吗?

...Upload personal letter: choose file? ...上传个人信件:选择文件?

...Upload personal letter: choose file. ...上传个人信件:选择文件。 Allowed filetypes: doc, docx. 允许的文件类型:doc,docx。 Required? 需要?

We're currently going for the more talky version, but our team has limited experience with screen reader users and how they're used, so a push in the right direction would be very helpful. 目前,我们正在寻求更健谈的版本,但是我们的团队在屏幕阅读器用户及其使用方面的经验有限,因此朝正确的方向发展将非常有帮助。 Thank you. 谢谢。 :) :)

There is no real rule. 没有真正的规则。 It should be fine as long as indications are clear enough for the user. 只要指示对用户足够清楚,就可以了。

In fact, it depends a lot on how you are used to your screen reader, Internet and your device in general: 实际上,这很大程度上取决于您对屏幕阅读器,Internet和设备的习惯:

  • Advanced users tend to prefer shorter labels and may be annoyed by longer ones. 高级用户往往更喜欢较短的标签,而较长的标签可能会惹恼他们。
  • Beginners may not understand if the label is too concise 初学者可能不明白标签是否过于简洁
  • Beginners may also be overflowed if the label gives too much extra information, or don't understand if the vocabulary is too technical 如果标签提供了过多的额外信息,或者对于词汇表来说技术性太强,初学者也可能会感到无所适从

Screen readers have many options allowing you to decide what to say and what not to say. 屏幕阅读器有许多选项,使您可以决定说什么和不说什么。 For example, Jaws calls that verbosity and there are 3 general levels that are further customizable. 例如,Jaws称谓冗长,可以进一步自定义3个一般级别。 Sadly, on the web, you can't determine the selected level, nor adapt the markup knowing that this element is only spoken in advanced or intermediate mode (this can be further highly customized anyway) So the best is probably the middle option: be not too concise, but not too verbose either. 可悲的是,在Web上,您无法确定所选级别,也无法修改标记,因为您知道此元素仅在高级或中间模式下使用(无论如何都可以进一步高度自定义),因此最好的选择可能是中间选项:不太简洁,但也不太冗长。

I'm a screen reader user myself; 我本人是屏幕阅读器用户; as an advanced user, regarding your propositions; 作为高级用户,关于您的主张; I would say: 我会说:

The second gives more confidence on what you expect exactly than the first one. 与第一个相比,第二个使您对自己的期望更有信心。 If there are several files to upload, for example a cover letter + a CV + a photo, it's very important to have the information, so that there is less risk to mess up, ie upload the photo in the CV field. 如果要上传多个文件(例如,求职信+简历+照片),那么获取信息非常重要,这样就可以减少混乱的风险,即在“简历”字段中上传照片。 If there are several fields with the same label that are labelled the same, it's hard to know which is which. 如果有多个具有相同标签的字段被标记为相同,则很难知道哪个是哪个。

Indicating the allowed file types and other requirements of that kind is very good, but it is probably better placed outside the label. 指示允许的文件类型和此类要求非常好,但是最好放在标签之外。 Remember that the entire label is spoken again each time you tab into the field. 请记住,每次您进入该字段时,都会再次说出整个标签。 If there are 5 fields with the same information, or if the form is complicated and you must go back and forth several times, it's annoying to hear many times the same. 如果有5个字段具有相同的信息,或者表单很复杂并且您必须来回多次,那么听到很多相同的消息很烦人。

So, I would go for a variation on the second one: "upload personal letter, required". 因此,我将对第二个进行修改:“上传个人信件,必填”。 And indicate somewhere else in the page technical constraints like file type, size, etc. because it's still a very good idea. 并在页面上的其他地方指出技术限制,例如文件类型,大小等,因为这仍然是一个好主意。

Note that the "required" information can be left out from the label if you put the required and aria-required attributes on the field. 请注意,如果您在字段中输入了必填和aria必填属性,则可以从标签中忽略“必填”信息。 It's the recommanded way to indicate that a field is required. 这是指示必填字段的建议方式。

Tl;DR: Keep it concise. Tl; DR:请保持简洁。

If you want to convey some additional info like allowed file types, sizes, "no viruses please" etc., do not put this on the button itself. 如果您想传达一些其他信息,例如允许的文件类型,大小,“请没有病毒”等, 请不要将其放在按钮本身上。 Prefer, for example, aria-describedby and make a separate control describing all those things, visually connected to the button (say, to the right of it). 例如,最好使用aria-describedby并通过单独的控件描述所有这些内容,这些控件在视觉上连接到按钮(例如,按钮的右侧)。
We, I mean screen reader users, often navigate by items and do other weird stuff like invoking list of all buttons on the page (even Narrator nowadays started supporting such things), so if the button label is too long, it would be irritating too shortly. 我们,我的意思是屏幕阅读器用户经常浏览项目并进行其他奇怪的操作,例如调用页面上所有按钮的列表(即使是如今的讲述人也开始支持此类操作),因此,如果按钮标签过长,也将很烦人不久。

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

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