Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Accessibility and Voice Over with Corona?
Started by orangecyan Jan 08 2015 03:17 AM

6 replies to this topic
accessibility voice over text to speech
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

orangecyan

[GLOBAL: userInfoPane.html]
orangecyan
  • Observer

  • 24 posts
  • Corona SDK

Dear Corona team,

 

is there a possibility to create a Corona app that is usable with the accessible tools in Android and iOS (Voice Over) ? 

 

Accessibility is a feature that is more and more asked for, especially for business apps, and it is a must have in apps published by public authorities. In my case, I would need the feature of an audio description so that the app could be used / heared by visually disabled users. 

 

Thanks!



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,471 posts
  • Enterprise

It might be possible with either CoronaCards or Enterprise.

 

Rob



[TOPIC: post.html]
#3

orangecyan

[GLOBAL: userInfoPane.html]
orangecyan
  • Observer

  • 24 posts
  • Corona SDK

Hi Rob, 

 

thank you for your quick reply! I am familiar with the development of accessible websites, but rather not with accessible apps – as this is quite a new topic I think. 

Beside Corona Enterprise, what has to be done according to ui elements and text boxes in order to make them accessible and readable by a text-to-speech converter like Voice Over? Are native iOS apps accessible from the scratch? My first tests using an iPhone with some iOS apps showed that most of these apps where at least accessible with Voice Over = element-to-speech.

 

Thanks!



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,471 posts
  • Enterprise

I have very little knowledge how iOS voice over works.  But the text in Corona SDK's display objects which renders everything in the widget.* library actually create an image texture that we have in OpenGL.  Anything other than "native." items are all images.  There isn't any text to render that a traditional iOS UI would be made up of.

 

Rob



[TOPIC: post.html]
#5

Maciej C

[GLOBAL: userInfoPane.html]
Maciej C
  • Observer

  • 25 posts
  • Corona SDK

Hello,
I try to do the same what you talking about, but on Android. I activated the 'TalkBack' option and the problem seems to be the same. If all the objects in Corona are image textures, maybe there is a way to set some text-parameter of object in order to 'Talk Back' could know the text and read it.
 
I tried to resolve this by writing a plugin in Corona Enterprise, that let me use text-to-speech in Corona. But there is a problem: when TalkBack is active, you have to double tap on an object to touch event can be propagate in Corona, so Its impossible to recognize at first tap, which object was tapped. By the other side, you can disable TalkBack feature and write your own mechanism in Corona, which will work similary to TalkBack. But this would be very uncomfortable to user to switch TalkBack on/off every running of my app.
 
So, is it possible to enforce TalkBack working in Corona on Android? Do you have any other ideas?


[TOPIC: post.html]
#6

DavidRangel

[GLOBAL: userInfoPane.html]
DavidRangel
  • Moderator

  • 888 posts
  • Corona Staff

Maciej - One of our team members had this to say:

 

---

We think it can be done if he hooks up the touch events in lua and sends it back to the java side.  He can then use the guide(http://developer.android.com/guide/topics/ui/accessibility/apps.html#custom-views) to dispatch the accessibility events.

----



[TOPIC: post.html]
#7

Joshua Quick

[GLOBAL: userInfoPane.html]
Joshua Quick
  • Moderator

  • 3,397 posts
  • Corona Staff

You need to use something like Android's View.announceForAccessibility() method here...

   http://developer.android.com/reference/android/view/View.html#announceForAccessibility(java.lang.CharSequence)

 

*BUT* the above method is API Level 16, meaning that it'll only work on Android 4.1 and newer OS versions.  Lucky for you, Google's core Android code is open source, which allows you to see how to implement the above method yourself on older versions.  So, you need to implement the code shown here...

   https://github.com/android/platform_frameworks_base/blob/master/core/java/android/view/View.java#L5234

 

So, with the code linked above, it should look something like this in your code...

// *** The below must be ran on the main UI thread. ***

// The text you want to have spoken via the accessiblity manager.
String yourText = "Hello world.";

// Fetch the accessiblity manager.
android.content.Context context = com.ansca.corona.CoronaEnvironment.getApplicationContext();
android.view.accessibility.AccessibilityManager accessibilityManager;
string serviceName = android.content.Context.ACCESSIBILITY_SERVICE;
accessibilityManager = (android.view.accessibility.AccessibilityManager)context.getSystemService(serviceName);

// Do not continue if accessiblity is not available/enabled.
if ((accessibilityManager == null) || (accessibilityManager.isEnabled() == false)) {
	return;
}

// Have the accessibility system announce the given text.
android.view.accessibility.AccessibilityEvent event;
event = AccessibilityEvent.obtain(android.view.accessibility.AccessibilityEvent.TYPE_ANNOUNCEMENT);
event.getText().add(yourText);
event.setContentDescription(null);
accessibilityManager.sendAccessibilityEvent(event);

Note that I haven't tested the above, but it should help get you started.




[topic_controls]
[/topic_controls]