iOS Accessibility traits

Apple has made accessibility part of the iOS app SDK. With integrated screen magnification and the VoiceOver screen reader available on all recent iOS devices, it’s an ideal platform for great accessibility.

In iOS App Accessibility we touched on some of the basic features of the SDK. Standard UI controls are accessibility enabled by default, come with helpful labels and optional descriptions, as well as pre-defined accessibility traits.

A trait describes a characteristic of something. In this case, an accessibility characteristic of a UI control.

Standard UI controls have their accessibility traits pre-defined. If you’re developing your own controls though, you’ll need to assign the relevant accessibility traits yourself.

Control type

Accessibility traits are roughly divided into two groups. The first group relates to the type of control you’re using. There are four traits to choose from, but you should only choose one for your control.

  • Button: Means the control is a button or behaves like a button;
  • Link: Means the control is a link, particularly where it causes a URL to open;
  • Search field: Means a string can be entered (or chosen) and when submitted causes a set of search results to be produced;
  • Keyboard key: Means that the control is a key or behaves like a keyboard key.

Control behaviour

The second group relates to the way the control behaves. There are seven traits in this group, but you should only choose one for your control.

  • Static text: Indicates the control is static text that VoiceOver can read, but not interact with;
  • Image: Indicates the control is a graphic (so a helpful accessibility label is essential);
  • Play sound: Indicates the control will play a sound, enabling VoiceOver to moderate volume levels for other sound or speech in use at the time;
  • Selected: Indicates that the control is selected, enabling VoiceOver to know which is the currently active control in the UI;
  • Summary: Indicates the control provides a summary of the app, which is read automatically by VoiceOver when the app is opened;
  • Updates frequently: Indicates the control updates too frequently for Voiceover to keep pace, enabling VoiceOver to poll the control at appropriate time intervals instead;
  • Not enabled: Indicates the control is temporarily unavailable, and cannot be interacted with.

All of the above traits can be set through the Interface Developer. There are also a couple of traits that you can set programmatically as well.

  • Starts media session: Indicates that the element initiates a session when it’s activated that should cause VoiceOver to silence;
  • Adjustable: Indicates that the element can be moved through a range of positions (or values), enabling VoiceOver to notify the user that repeated interaction with the element causes its value to change accordingly.

With the appropriate accessibility traits defined, VoiceOver is able to treat the control in the right way, and make the right information available to the user.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值