ios VoiceOver support for visually impaired users

In fact, few users know,ios system is actually a complete set of easy access mechanism,Many blind or visually impaired users prefer to useiphone

So,As a developer,I think both in terms of product sales or as a side responsibility,We should do well to easily access support。

Fortunately, however,,Thanks to Apple's strict development standards,It is generally as long as your app can be added to already approved,So basically VoiceOver It has been able to identify most of your app in the,More generic,For example tabView,such as navigationController,These general frameworks have the automatic support of。Now,We take a look,How to make good use of your app VoiceOver All the advanced features,These features allow you to control to some extent VoiceOver,To make it more compatible with your app,Allowing users to experience better perfect。

main target

VoiceOver can read the contents of the screen in addition to outside,In fact, content can do more,For example, to interact with the interface,For example, the built-in magic pat,Magic Returns,We make customized content to support it,We need to rewrite their own corresponding methods,Let us also own custom buttons,The way you want to operate - after all use VoiceOver users is by listening,So sometimes we also need to add more buttons, etc. to explain,Even,After some action,Also have VoiceOver read specific content to tell the user what happened,These are standardized,So visually impaired users can easily use the app you developed。

VoiceOver running state

To be VoiceOver support,So too we must first be able to find its status - although in fact in most cases you do not need to do,Because you do more configuration for VoiceOver,If VoiceOver is not open, then,Would not have any effect,But if you want to detect what words,In UIKit has a corresponding global function:

of course,You can also do not like me in one package,I was to own the whole code look more consistent Bale。

Setting readable

For a custom control,You need to manually specify whether you want it as a control VoiceOver:

Control Role

ios for the controls provide some common characters can be configured,Such as a button,For example, the volume keys,Set the appropriate role for the proper control of your control,This helps you control VoiceOver provides additional functionality corresponding。

for example,For keyboard buttons,Necessary to remove the button button while using the keypad buttons character roles,Only in this way,Users can be achieved by sliding your finger on the keyboard,Then when you need to find the button,Release your finger pressed to perform the operation immediately。

of course,In fact, these roles can be more than,We can see this type of role is actually a large integer adoption of the final declaration: public typealias UIAccessibilityTraits = UInt64 So we can:

Here is the way I translate what we declared in the translation,Specific features we all need to try。

Magic pat

This is a very common gesture,Is double-click with two fingers on the screen。For example, in off grid input method,It is used to quickly return to the first candidate (when you turn back for a long time)。If you want to monitor this action,He was overridden in the corresponding Controller accessibilityPerformMagicTap

return true To tell the system,VoiceOver receiving operation,return false Skip to illustrate,Send content to other recipients。

Magic Returns

Magic returned the gesture a bit difficult,But a little practice should not be a difficult thing,In short,In places such as navigationController able to return in two fingers back and forth about what is to perform a magic returns。Or by falling input method, for example sub-grid,So magic is performed on the keyboard to return to hide keyboard:

Manually alert

Then,How can the initiative to send content to the user prompts it? For example, "the keyboard to enter the expression"? Then you can do:

So VO will read your content after you call it sends a notification,So,Remember to do localization。

The same time,It is worth mentioning that,If you send multiple notifications simultaneously,Then the notification back to the front of the notification will be overwritten! For example, this:

Then you get it is likely to be "keyboard to enter the expression" or "keyboard to enter Pinyin",The other two are lost。

For example, in Georgia there before falling input method version,There has been a bug,That's the word can not be read in VO deleted。For visually impaired users this is a very important issue,Because if you do not read it if they are not sure what is deleted,It is really terrible。And worse than this,My own local test is completely normal!

So,We must pay attention to this issue,Send notification does not necessarily have to be in the main thread (if you're like me, then common concurrent),But be sure to pay attention to spacing,After analysis,Eventually I came to understand,When you click delete on your keyboard,Then as a third-party keyboard,I must call to remove the built-api,But this will delete trigger UI changes (because the text has changed, right?) VoiceOver will go innocently report the cursor position,Obviously,Usually mistyped the last word is certainly the majority,So naturally bug it would read "text at the bottom."。

At this moment,Just notice slower than the system just fine,(Notification system than you want to slow down hair,So it is always covered my notice even if I put it deleted after the call),So,I like this deal:

In short,So slow 0.1 seconds for the user they can not find any difference,However, for the system,,That is, with enough time for VO receipt notification system,We had a chance to read your notification was given overwritten。

Manually change focus

When the user clicks the keyboard,After doing some operations or,We need to let the VO automatically move the focus to the top,A typical case is that you click on the button keyboard,Candidate column will update new candidate word,This time the focus is moved to speak first candidate will be very easy to use。Because in that case,Users can double-click on the screen to select it directly。So,I do it this way:

The second parameter is the actual control to get the focus of a reference,After this notification,VO will immediately move the focus to and read out its contents on this space。


Basically,For VoiceOver test,You can not be completed in xcode,Tool that comes with it can only support the easiest way to check,Want to test your complete support VO,You should install the app on your iphone,Then open VoiceOver,Close your eyes and go personally used some,If you are not good at VoiceOver can successfully use your app,That should be no big problem。

all above,I was made to drop the grid input ios platform VoiceOver support life experience the best of the Chinese input method。?

Original article written by Gerber drop-off:R0uter's Blog » ios VoiceOver support for visually impaired users

Reproduced Please keep the source and description link:

About the Author


The non-declaration,I have written articles are original,Reproduced, please indicate the link on this page and my name。


Leave a Reply

Your email address will not be published. Required fields are marked *