How to add accessibility to Unity3d for iOS [closed]
Asked Answered
T

3

9

Is there any way to communicate with iOS's VoiceOver accessibility native support via Unity3d? We have an application that needs to be accessible, and we are not sure how to go about it.

Creating our own custom VoiceOver is not possible since we need language support, so we need to go native. Our gut tells us to communicate with iOS via a plugin, however it seems that iOS hardware is not able to capture unity taps, but also it seems to override some of our gestures.

Any suggestion would be appreciated.

Textualist answered 7/3, 2013 at 15:14 Comment(2)
This looks useful: assetstore.unity3d.com/en/#!/content/9555Ophthalmoscope
Broken link, but if you go to the correct URL, you'll see that this plugin is deprecated. assetstore.unity.com/packages/tools/integration/…Miliaria
S
1

There is some note here

In general, you do not create accessibility elements for items in your application because standard UIKit controls and views are accessible by default. However, if you have a view that contains nonview items, such as icons or text images, that need to be accessible to users with disabilities, you create accessibility elements to represent them. In this case, the containing view should implement the UIAccessibilityContainer informal protocol and use this method to create an accessibility element to represent each item that should be exposed to an assistive application.

and here

The UIAccessibilityContainer informal protocol provides a way for UIView subclasses to make selected components accessible as separate elements. For example, a view might contain icons or drawn text that, to end users, appear and function as separate items. But because these components are not implemented as instances of UIView, they are not automatically accessible to users with disabilities. Therefore, such a container view should implement the UIAccessibilityContainer methods to supply accessibility information about these components to assistive applications such as VoiceOver.

I'm not familiar with Unity itself, but that's seems to be possible to hack containing view to support accessibility - you can build set of UIAccessibilityElemets that represents currently visible items on screen.

Surfacetosurface answered 13/3, 2015 at 21:46 Comment(2)
Right, but how do you represent elements from Unity as a UIView?Ophthalmoscope
Well, you can correspond each Unity element to object of UIAccessibilityElemet class. And then add them to topmost view of applicationSurfacetosurface
A
1

Unfortunately, Unity and VoiceOver cannot natively work together, since Unity takes care of all rendering - including the UI. That is why VoiceOver or any other screen reader cannot access the UI and make it accessible. Really your only option is, as you already mentioned, taking the long way around and implement the same functionality inside of Unity. You can either implement this yourself, or use a plugin that does it for you.

There's a plugin available that recreates screen reader functionality for Unity UI. It works like VoiceOver and TalkBack, and uses the native VoiceOver speech for text-to-speech output. https://assetstore.unity.com/packages/tools/gui/ui-accessibility-plugin-uap-87935

Axil answered 3/5, 2017 at 19:54 Comment(2)
Welcome to Stack Overflow! Just linking to your own library or tutorial is not a good answer. Linking to it, explaining why it solves the problem, providing code on how to do so and disclaiming that you wrote it makes for a better answer. See: What signifies “Good” self promotion?Helotry
Very true, I edited the post to add more explanations.Axil
R
0

Unity3d does not support the .ipa files that are used by VoiceOver to provide hooks that allow the feature to function. Therefore, the feature cannot be used directly to make an application more accessible.

Therefore, a method of developing a system based on VoiceOver within Unity must be used, which could make use of some current VoiceOver conventions - i.e. recreating VoiceOver's methods of handling pages and applications within Unity.

Other than that I'm unsure what you could do without taking the "long way round" of creating your own language support with similar accessibility functions to VoiceOver.

Rusell answered 12/3, 2015 at 10:45 Comment(1)
What do you mean "Unity3d does not support the .ipa files"? An ipa file is just a zip file.Ophthalmoscope

© 2022 - 2024 — McMap. All rights reserved.