delphi 编写ios_编写出色的ios可访问性标签

delphi 编写ios

A good accessibility label lets your customer know exactly what a control does in as few words as possible, without having to rely on implied context.

良好的可访问性标签可让您的客户以尽可能少的字眼准确知道控件的功能,而不必依赖隐含的上下文。

不要添加元素类型 (Don’t Add the Element Type)

iOS already knows your button is a button and your image is an image, it does this using an accessibility trait. If you label your button as ‘Play button’ your VoiceOver customers will hear ‘Play button. Button.’

iOS已经知道您的按钮是按钮,并且您的图像是图像,它使用可访问性特征来做到这一点。 如果将按钮标记为“播放按钮”,则VoiceOver客户将听到“播放按钮”。 按钮。

保持简洁 (Keep it Succinct)

Don’t frustrate your customer by adding too much information to your labels. There’s no need to describe photos in detail for example, just let people know what the subject of the photo is. Take another look at the Spotify example from the post on when to use accessibility labels. Here our customer knows they’re on the player screen for Beyoncé’s ‘Pray You Catch Me’, so none of the labels include the name of the track. The pause button doesn’t say ‘Pause Pray You Catch Me by Beyoncé’, but simply ‘pause’. Use a single word wherever you can.

不要通过在标签上添加太多信息来挫败客户。 例如,无需详细描述照片,只需让人们知道照片的主题即可。 从何时使用辅助功能标签帖子中再看一下Spotify示例。 在这里,我们的客户知道他们在碧昂斯的“ Pray You Catch Me”的播放器屏幕上,因此所有标签都不包含曲目的名称。 暂停按钮不是说“暂停祈祷你被碧昂斯抓住我”,而只是“暂停”。 尽可能使用一个单词。

大写第一个字符 (Capitalise the First Character)

This allows VoiceOver to read the label with the correct inflection.

这使VoiceOver可以读取带有正确变形的标签。

不要以句号结尾 (Don’t End with a Period)

Your control’s label is a label, not a sentence, so there is no need to end it with a period. This rule excludes blocks of text.

控件的标签是标签,而不是句子,因此无需以句号结尾。 此规则排除文本块。

本地化 (Localise it)

Ideally, you’ll localise your app into as many languages as practical. This will help you sell in different markets, but more than that, it allows your customers to use your app in the language they are most comfortable with. If you do localise your app, remember to localise your accessibility labels too.

理想情况下,将应用本地化为尽可能多的语言。 这将帮助您在不同的市场上销售,但不仅如此,它还可以使客户以他们最熟悉的语言来使用您的应用。 如果您将应用程序本地化,请记住也要本地化可访问性标签。

保持最新 (Keep it Current)

Sometimes our on-screen elements will change their behaviours throughout the life of the screen. Perhaps you have a button that acts as a toggle, or a shopping cart’s payment button might include the total value of the cart. It’s important that if your element does change state such as this that you update the accessibility label at the same time. Otherwise, you’ll be lying to your users.

有时,我们的屏幕元素会在整个屏幕生命周期内改变其行为。 也许您有一个按钮可以用作切换按钮,或者购物车的付款按钮可能包括购物车的总价值。 重要的是,如果您的元素确实改变了这样的状态,则必须同时更新可访问性标签。 否则,您将对用户撒谎。

不仅仅适用于VoiceOver (Not Just for VoiceOver)

It can be a common trap to fall into, thinking that accessibility labels are just for VoiceOver, but they’re also used for Voice Control and Braille displays too. This gives us a few other requirements.

认为辅助功能标签仅适用于VoiceOver,这可能是一个常见陷阱,但是它们也用于语音控制和盲文显示器。 这给了我们其他一些要求。

语音控制 (Voice Control)

For anything your customer interacts with, the accessibility label should be short enough they can easily say it, repeatedly if needed. And intuitive enough they can figure out what to say without having to ask iOS to tell them by saying ‘show names’. But you can specify alternatives for Voice Control using the accessibilityUserInputLabels property. This property takes an array of localised strings that Voice Control will listen for to toggle this control. Your label, the one displayed by Voice Control should be first, followed by any alternatives. Unfortunately, this functionality is not currently available in SwiftUI.

对于您的客户与之互动的任何内容,可访问性标签应足够短,以使他们可以轻松地说出来,如果需要,可以重复多次。 而且他们足够直观,他们可以弄清楚该说些什么,而不必要求iOS通过说“显示名称”来告诉他们。 但是您可以使用accessibilityUserInputLabels属性指定语音控制的替代方法。 此属性采用本地化字符串数组,Voice Control将侦听该本地化字符串以切换此控件。 您的标签(由语音控制显示的标签)应该放在第一位,然后是其他选择。 不幸的是,SwiftUI当前不提供此功能。

// Giving alternative utterances for Voice Control to listen to for this button in UIKit.
buyButton.accessibilityUserInputLabels = ["Buy", "Pay", "Purchase"]

盲文 (Braille)

For your users who have a Braille display, the accessibility label is the text that is presented to them. This can be a problem if you have forced your accessibility label into a format that means VoiceOver reads it better but will look weird if displayed. I’ve seen this as an issue for reference numbers for example.

对于具有盲文显示器的用户,可访问性标签是向其显示的文本。 如果您将可访问性标签强制转换为某种格式,这可能会是一个问题,这意味着VoiceOver可以更好地阅读它,但是如果显示的话看起来会很奇怪。 例如,我已经将其视为参考号的问题。

Let’s say you are building a shopping app, and when your customer makes an order, you present them with a reference number for that order. Your label displays ‘1234’. But VoiceOver reads ‘one thousand two hundred and thirty-four’. This is a bad experience for your VoiceOver customers, so the quick fix here is to add a space between each digit. This is a really bad option for Braille customers, as this then takes up a huge amount of space on their display. In Braille each number begins with a numerical indicator character. So ‘1234’ takes up 5 Braille characters. ‘1 2 3 4’ however, takes up 12. Many Braille displays can render around 14 characters.

假设您正在构建一个购物应用程序,并且当您的客户下订单时,您会向他们显示该订单的参考号。 您的标签显示为“ 1234”。 但是VoiceOver的读音是“ 1,234”。 对于您的VoiceOver客户而言,这是很糟糕的体验,因此此处的快速解决方案是在每个数字之间添加一个空格。 对于盲文客户来说,这是一个非常糟糕的选择,因为这会占用他们显示器上的大量空间。 在盲文中,每个数字都以数字指示符开头。 因此,“ 1234”占用5个盲文字符。 但是,“ 1 2 3 4”占12。许多盲文显示器可以渲染大约14个字符。

The best option to fix this would be to use an attributed accessibility label. We’ll cover those in the next post.

解决此问题的最佳方法是使用属性可访问性标签。 我们将在下一篇文章中介绍这些内容。

资料来源 (Sources)

往下 (Up Next)

The next blog in this series is iOS Attributed Accessibility LabelsThe previous article in this series is When to use Accessibility Labels

本系列的下一个博客是iOS属性的辅助功能标签 。本系列的上一篇文章是何时使用辅助功能标签

This post was originally published on mobilea11y.com. Visit Mobile A11y for more mobile accessibility tools and techniques.

该帖子最初发布在mobilea11y.com上 。 访问Mobile A11y,以获取更多的移动辅助工具和技术。

翻译自: https://medium.com/macoclock/writing-great-ios-accessibility-labels-6d903ba17f7f

delphi 编写ios

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Delphi for iOS开发指南 目录 Delphi XE4 For IOS真机调试配置教程 ........................................................................................................................... 3 Delphi for iOS开发指南(序):Delphi iOS应用程序开发 .............................................................................................. 63 Delphi for iOS开发指南(1):在Mac上配置你的开发环境 ............................................................................................ 70 Delphi for iOS开发指南(2):在Windows PC上配置你的开发环境 ............................................................................ 88 Delphi for iOS开发指南(3):创建一个FireMonkey iOS应用程序 ............................................................................ 100 Delphi for iOS开发指南(4):在iOS应用程序中使用不同风格的Button组件 .......................................................... 120 Delphi for iOS开发指南(5):在iOS应用程序中使用Calendar组件来选择日期 ...................................................... 129 Delphi for iOS开发指南(6):在iOS应用程序中使用ComboBox组件来从列表中选择某一项 ................................ 136 Delphi for iOS开发指南(7):在iOS应用程序中使用WebBrowser组件 .................................................................. 146 Delphi for iOS开发指南(8):在iOS应用程序中使用Tab组件来显示分页 ................................................................ 160 Delphi for iOS开发指南(9):在iOS应用程序中使用ListBox组件来显示TableView ............................................. 179 Delphi for iOS开发指南(10): 在iOS应用程序中使用Layout来调整窗体尺寸或排列方向 .................................... 205 Delphi for iOS开发指南(11):在iOS应用程序中拍照并共享照片 .............................................................................. 218 Delphi for iOS开发指南(12):在iOS Device中使用地理定位 ................................................................................... 230 Delphi for iOS开发指南(13):在iOS Device中使用通知中心 ................................................................................... 254 Delphi for iOS开发指南(14):在iOS应用程序中使用InterBase ToGo ................................................................... 283 Delphi for iOS开发指南(15):在iOS应用程序中使用SQLite ................................................................................... 311 Delphi for iOS开发指南(16):在iOS客户端应用程序中连接企业级数据库 ............................................................... 337 Delphi For iOS开发指南(17):让应用程序禁止竖屏(也就是只显示横屏) .................................................................... 360 Delphi For iOS开发指南(18):让Delphi XE4开发的iOS应用显示为中文名称 ....................................................... 365 Delphi XE8实现移动端的消息推送(个推) .................................................................................................................... 373 Delphi XE10实现移动端支付宝支付接口(含源码) ....................................................................................................... 379 Delphi XE10实现移动端微信支付接口(含源码) ........................................................................................................... 401 Delphi XE10调用百度地图和百度导航 ......................................................................................................................... 429 Delphi XE10支持IOS IPV6的处理 ............................................................................................................................. 440
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值