iOS 可访问性:标签与提示

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3673550/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 17:42:07  来源:igfitidea点击:

iOS accessibility: label vs hint

iphoneaccessibilityios

提问by Anne Nonimus

What is the difference between the "label" and "hint" property if I'm trying to make a control accessible? Moreover, what do the "traits" do? Are all of these properties spoken by VoiceOver if I fill them in?

如果我试图使控件可访问,“标签”和“提示”属性之间有什么区别?此外,“特质”有什么作用?如果我填写这些属性,VoiceOver 是否会说出所有这些属性?

回答by hotpaw2

This is all described in Apple's Accessibility Programming Guide.

这在 Apple 的无障碍编程指南中都有描述。

But here's my random take on your question:

但这是我对你的问题的随机看法:

I would try to think of the accessibility properties in terms of how a sighted person would use your app.

我会尝试根据视力正常的人如何使用您的应用程序来考虑可访问性属性。

They would look at the display and see stuff.

他们会看显示器,看看东西。

A button might have a short title, such as "Stop". A slider might have a nearby label saying "Volume". That's the type of stuff that a sight impaired person might like to find in the control's label property.

按钮可能有一个简短的标题,例如“停止”。滑块附近可能有一个标签,上面写着“音量”。这是视障人士可能希望在控件的标签属性中找到的内容类型。

A sighted person would recognize a standard button or slider by it's shape and decoration. But a vision impaired person might have no clue about that shape. So that's the type of information that should go in the traits property for someone who can't see whether something looks like a button. "button".

一个有视力的人会通过它的形状和装饰来识别标准按钮或滑块。但是视力受损的人可能对这种形状一无所知。因此,对于无法看到某物是否看起来像按钮的人来说,这就是应该放入 traits 属性中的信息类型。“按钮”。

If you had a short help document for your app, it might show a picture of your app, with arrows pointing at the elements, and a small bubble caption on each of those arrows saying stuff like "Stops playing annoying fart sounds" and "Changes fart loudness from silent to ear shatteringly gross". These would be your helpful "hints".

如果您的应用程序有一个简短的帮助文档,它可能会显示您的应用程序图片,箭头指向元素,每个箭头上都有一个小气泡标题,上面写着“停止播放烦人的放屁声”和“更改放屁的响度从沉默到令人耳目一新”。这些将是您有用的“提示”。

Traits and hints are optional, just as some apps in the App store have no help documentation, and weird unrecognizably shaped buttons. But every visible or active control element should have a label.

特性和提示是可选的,就像 App Store 中的一些应用程序没有帮助文档,以及形状难以辨认的奇怪按钮一样。但是每个可见的或活动的控件元素都应该有一个标签。

'zat help?

'zat 帮助?