Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11409] iOS: Accessibility: LayoutChanged and ScreenChanged accessibility system events not working and show warning in console

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-10-15T19:42:35.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-12T10:10:06.000+0000
Updated2012-12-04T19:45:14.000+0000

Description

The device does not read aloud for system events for Ti.App.iOS.EVENT_ACCESSIBILITY_LAYOUT_CHANGED and Ti.App.iOS.EVENT_ACCESSIBILITY_SCREEN_CHANGED Also warning is shown in console Steps to Reproduce: 1. Open the application with code below 2. Click on Remove button. (Label gets hidden) 3. Click on Add button. (A view is created and shown) Actual: Device does not speak anything. A warning is shown in console for both the buttons. Refer the attachment for logs Expected: Device should speak for respective system event
var win=Ti.UI.createWindow({backgroundColor:'white'});
var btn1 = Ti.UI.createButton({
	title: 'Add',
	top: 20,
	right:10,
	width:100,
	height: 100,
	accessibilityHint: 'This will add view on screen'
	
});
var btn2 = Ti.UI.createButton({
	title: 'Remove',
	top: 20,
	left:10,
	width:100,
	height: 100,
	accessibilityHint: 'This will remove the label'
});

var lbl = Ti.UI.createLabel({
	text: 'This will be removed',
	top: 150
});
btn1.addEventListener('click', function(e){
	var view= Ti.UI.createView({
		top: 200,
		bottom: 0,
		backgroundColor: "red",
		left: 0,
		right : 50
	});

	view.addEventListener('postlayout',function(e){
		Ti.App.fireSystemEvent(Ti.App.iOS.EVENT_ACCESSIBILITY_SCREEN_CHANGED);
    });
		win.add(view);
});

win.add(lbl);
btn2.addEventListener('click', function(e){
	lbl.hide();
	Ti.App.fireSystemEvent(Ti.App.iOS.EVENT_ACCESSIBILITY_LAYOUT_CHANGED);
});

win.add(btn2);
win.add(btn1);
win.open();

Attachments

FileDateSize
log.txt2012-10-13T11:55:17.000+00001861

Comments

  1. Max Stepanov 2012-10-12

    Not seeing any issues with the events. No warnings in console. Please provide details/sample code.
  2. Satyam Sekhri 2012-10-13

    Description updated with the code being used to test. Also the logs are attached.
  3. Max Stepanov 2012-10-13

    Correct test case
        var win=Ti.UI.createWindow({backgroundColor:'white', layout:'vertical'});
        var view= Ti.UI.createView({
            top: 0,
            bottom: 0,
            backgroundColor: "red",
            width: 50,
            height : 50,
            accessibilityLabel: 'Red view'
        });
       
       var btn1 = Ti.UI.createButton({
           title: 'Add',
           width:100,
           height: 100,
           accessibilityHint: 'This will add view on screen'
       
       });
       var btn2 = Ti.UI.createButton({
           title: 'Update',
           width:100,
           height: 100,
           accessibilityHint: 'This will update the button title'
       });
       
       btn1.addEventListener('click', function(e){
       	view.show();
            Ti.App.fireSystemEvent(Ti.App.iOS.EVENT_ACCESSIBILITY_SCREEN_CHANGED);
       });
       
       btn2.addEventListener('click', function(e){
       	btn2.title = "Updated";
           btn2.accessibilityHint = "This button has been already pressed.";
           Ti.App.fireSystemEvent(Ti.App.iOS.EVENT_ACCESSIBILITY_LAYOUT_CHANGED);
       });
       
       win.add(view);
       win.add(btn2);
       win.add(btn1);
       view.hide();
       
       win.open();
       
  4. Max Stepanov 2012-10-13

    PR to move EVENT_ACCESSIBILITY_LAYOUT_CHANGED/EVENT_ACCESSIBILITY_SCREEN_CHANGED to Ti.App.iOS module is submitted https://github.com/appcelerator/titanium_mobile/pull/3216
  5. Max Stepanov 2012-10-14

    3_0_X PR https://github.com/appcelerator/titanium_mobile/pull/3228
  6. Olga Romero 2012-12-04

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

JSON Source