Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8657] Android: Support Accessibility (TalkBack, etc.)

GitHub Issuen/a
TypeNew Feature
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-09-17T17:20:58.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.0.0, Sprint 2012-19 Core, 2012 Sprint 19
ComponentsAndroid
LabelsSupportTeam, core, qe-port
ReporterStephen Tramer
AssigneeBill Dawson
Created2012-04-10T14:33:36.000+0000
Updated2012-10-16T20:07:00.000+0000

Description

Exactly what the ticket title says. We don't support (any???) accessibility right now, if additional support for it is necessary. Unlikely to be a candidate for a module.

Attachments

FileDateSize
timob8657.zip2012-09-17T04:24:51.000+00003129830

Comments

  1. Bill Dawson 2012-09-17

    Testing Notes

    *NOTE:* These instructions do not teach you how to use TalkBack and Explore-by-touch! Please learn how to use TalkBack _before_ running these tests. (Settings -> Accessibility -> TalkBack.) On Jelly Bean there is an explore-by-touch tutorial on the TalkBack settings screen. I'm not sure if it's there on ICS. If it's there, use it.

    Test for regressions when accessibility is OFF.

    * Turn off any accessibility services that may be turned on on your device. * Download the attached ZIP and unzip it -- it contains a Titanium project. * Import that project into Titanium Studio. * Run the app on an Android device. * Go through the two tabs in the app. Make sure nothing is broken (note: the buttons don't show anything when you click them -- just be sure nothing causes a crash.) * On the second tab, "Events", make sure the label says that accessibility is disabled. * Back out of the app.

    Test Accessibility

    Preferably start with a Jelly Bean device, but if that's not available then an ICS device. In the case of an ICS device, one of the tests won't be available. In the case of older devices, other tests won't be available. The availability (or lack thereof) is mentioned below on a per-test basis. * Turn on TalkBack and -- if available -- explore-by-touch. * Run the app again. * On the View Properties tab, select (without clicking) the Basic button. No accessibility properties are set on this button (thus "Basic"), so TalkBack will simply do whatever it does by default, which is likely to say "Basic. Button.". * Now select (without clicking) the "Different" button. This button has its accessibilityLabel property set so as to override the default text that would otherwise be read aloud by TalkBack. Instead of just saying "Different. Button." it should say "This has different text for accessibility. Button." * Now select the switch (which Android will call a "checkbox"). It has three accessibility properties set: accessibilityLabel, accessibilityValue and accessibilityHint. These will be combined, and TalkBack should say, "My special switch. Off. Double tap to turn on." (Android will then insist on tacking on, "Checkbox. Not checked.") * Now switch to the "Events" tab. * Select and click (in touch-by-explore this means double-tapping) the "Make announcement" button. You should hear an announcement, "Please stand by for an urgent message from the Department of Homeland Security." * Read the label field. Its text will be different depending on version. Make sure it includes the text "Accessibility is enabled." * If you are on Jelly Bean, try to select (with explore-by-touch) the label. It should not be possible, since the accessibilityHidden property is set to true. This property has no effect in earlier versions. * If you are on ICS or higher, now keep the app running (do not back out) and go back to Settings and disable all accessibility services (i.e., TalkBack). Be sure accessibility services beyond TalkBack -- such as QueryBack -- are also off. * Switch back to the app. The label should now include "Accessibility state changed: it is now disabled." (REMEMBER: this only occurs on ICS or higher.) * Switch back to accessibility settings and re-enable TalkBack. * Switch back to the app. The label should now include "Accessibility state changed: it is now enabled."

    Summary

    In these tests we've covered every new accessibility-related Titanium API point available in Android as follows: * View.accessibilityLabel - available on all Android versions. In the test app, it is used on the "Different" button and on the switch. * View.accessibilityValue - available on all Android versions. In the test app, it is used on the switch. * View.accessibilityHint - available on all Android versions. In the test app, it is used on the switch. * Ti.App.fireSystemEvent("accessibilityannouncement", "Please stand by...") - available on all Android versions. In the test app, fired when the "Make Announcement" button is clicked. * View.accessibilityHidden - available on Jelly Bean or higher. In the test app, it is used on the label on the Events tab. * Ti.App.addEventListener("accessibilitystatechanged", ...) - available on ICS or higher. In the test app, the event listener tacks on text to the label on the Events tab when accessibility state changes.

    Test Documents

    * Run python apidoc/validate.py -e -s simple and make sure there are no errors.
  2. Olga Romero 2012-10-16

    Verified fix with: Titanium Studio, build: 3.0.0.201210090117 Titanium SDK, build: 3.0.0.v20121015174610 Devices: Nexus7 4.1.2

JSON Source