Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11412] iOS: Accessibility: Ti.App.Event_Accessibility_Changed returns incorrect enabled state of Accessibility

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-10-15T20:14:04.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sRelease 3.0.0, Release 3.1.0, 2012 Sprint 21 Core, 2012 Sprint 21
ComponentsiOS
Labelsaccessibility_module, core, qe-ios100112, qe-nfc, qe-testadded
ReporterSatyam Sekhri
AssigneeMax Stepanov
Created2012-10-12T11:23:12.000+0000
Updated2012-12-04T19:39:23.000+0000

Description

The event Ti.App.Event_Accessibility_Changed returns incorrect enabled state of Accessibility. This works fine on Android Steps to Reproduce: 1. Run the application below with Voice Over enabled. 2. Background the app and go to setting to switch off voice over 3. Open the app again 4. Again Background the app and go to setting to switch on voice over 5. Open the app again Actual Result: After Step 3: The label gets added at the end "Accessibility State Changed: it is now disabled" (This is correct) After Step 5: The label gets added at the end "Accessibility State Changed: it is now disabled" Expected Result: After Step 3: The label gets added at the end "Accessibility State Changed: it is now disabled" After Step 5: The label gets added at the end "Accessibility State Changed: it is now enabled"
var tabGroup = Ti.UI.createTabGroup({orientationModes: [Ti.UI.PORTRAIT]});

winEvents = Ti.UI.createWindow({
	title: "Events",
	layout: "vertical",
	backgroundColor: "#fff"
}),
tabEvents = Ti.UI.createTab({
	window: winEvents,
	title: 'tab1'
}),

eventLog = Ti.UI.createLabel({
	top: 16, left: 32, right: 32,
	//height: 48 * 5,
	verticalAlign: Ti.UI.TEXT_VERTICAL_ALIGNMENT_TOP,
	accessibilityHidden: true,
	accessibilityLabel: "My special label.",
    accessibilityValue: "No value.",
    accessibilityHint: "No action",
}),


Ti.App.addEventListener(Ti.App.EVENT_ACCESSIBILITY_CHANGED, function(e) {
	eventLog.text += "\nAccessibility state changed: " + (e.enabled ? "it is now enabled." : "it is now disabled.");
});

eventLog.text = "The Accessibility state change would reflect below. ";

eventLog.text += "\n\n";

winEvents.add(eventLog);

tabGroup.addTab(tabEvents);
tabGroup.open();

Comments

  1. Max Stepanov 2012-10-12

    Cannot reproduce Actual result "after step 5". When an app is running and VoiceOver is turned on while backgrounded, iOS kills/restarts the application, so the text is the same as at the step 1.
  2. Satyam Sekhri 2012-10-13

    Ensure to start the test with Voice Over already ON, then it does append text to the existing label in Step 1. If the voice Over is OFF when the application is launched the first time i.e. started, then nothing appends to the text in step1
  3. Max Stepanov 2012-10-13

    e.enabled property was missing on iOS. PR submitted https://github.com/appcelerator/titanium_mobile/pull/3213
  4. Satyam Sekhri 2012-11-08

    The issue is fixed, however there is difference in behaviour on iOS6 as compared to previous versions. On older versions of iOS the application restarts when voice over is turned ON and hence after step 5 the text at step 1 is shown whereas on iOS6 the application continues the application instance (i.e. does not restart) when voice over is turned ON and application shows the state change to enabled.
  5. Olga Romero 2012-12-04

    Closing as fixed. Tested and verified: Titanium Studio, build: 3.0.0.201211301903 Titanium SDK, build: 3.0.0.v20121130200208 Device: iPhone5 iOS 6.0

JSON Source