Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11421] iOS: Accessibility: ButtonBar: Accessibility does not work on Button Bar

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionDuplicate
Resolution Date2012-10-15T07:54:09.000+0000
Affected Version/sRelease 3.0.0
Fix Version/sn/a
ComponentsiOS
Labelscore, qe-ios100112, qe-nfc
ReporterSatyam Sekhri
AssigneeMax Stepanov
Created2012-10-12T13:53:58.000+0000
Updated2014-07-17T10:53:06.000+0000

Description

The accessibility does not work for Button bar. The Label, Value or Hint are not voiced over. Though the Accessibility Hidden works as button bar with AccessibilityHidden as True does not voice over the default text as well. Steps To Reproduce: 1. Open the application below with voice over ON 2. Touch the first Button Bar 3. Touch the second Button Bar Actual: After Step 2: The default text is spoken but not the Label, Value and Hint defined After Step 3: Nothing is spoken, not even the default text Expected: After Step 2: The Label Value and Hint should be spoken by the device

win = Ti.UI.createWindow({
	title: "Events",
	layout: "vertical",
	backgroundColor: "#fff"
});
var Buttonbar1 = Titanium.UI.createButtonBar({
    		labels:['Red', 'Pink', 'blue'],
    		backgroundColor:'#336699',
   		    accessibilityLabel: "ButtonBar1.",
			accessibilityValue: "Value1.",
			accessibilityHint: "Hint1.",
    		top:50,
    		style:Titanium.UI.iPhone.SystemButtonStyle.BAR,
   			 height:25,
    		width:200
			});
		win.add(Buttonbar1);
		
		var Buttonbar3 = Ti.UI.createButtonBar({
			labels:['One', 'Two', 'Three'],
			backgroundColor:'#336699',
		    accessibilityHidden: true,
		    accessibilityLabel: "ButtonBar3.",
			accessibilityValue: "Value3.",
			accessibilityHint: "Hint3.",
		    style:Titanium.UI.iPhone.SystemButtonStyle.BAR,
   			 height:25,
    		width:200,
		    top:150,
		});
		win.add(Buttonbar3);
win.open();

Comments

  1. Max Stepanov 2012-10-14

    Button bar requires accessibility properties to be set per button. E.g labels:[{title:'Red' accessibilityLabel:"Red accessibility label"}, 'Pink', 'blue'],
  2. Satyam Sekhri 2012-10-15

    Defining accessibility properties per button (as in comment above), the accessibility label is still not spoken for Red button. Below is the code used:
       win = Ti.UI.createWindow({
           title: "Events",
           layout: "vertical",
           backgroundColor: "#fff"
       });
       var Buttonbar1 = Titanium.UI.createButtonBar({
                   labels:[{title:'Red', accessibilityLabel:"Red accessibility label"}, 'Pink', 'blue'],
                   backgroundColor:'#336699',
                   top:50,
                   style:Titanium.UI.iPhone.SystemButtonStyle.BAR,
                    height:25,
                   width:200
                   });
               win.add(Buttonbar1);
          
       win.open();
       
  3. Max Stepanov 2012-10-15

    This duplicates TIMOB-11454. Possible platform issue as the code below work in Simulator with Accessibility Inspector enabled, but does not work on a device.
       - (void)viewDidLoad
       {
           [super viewDidLoad];
       	NSString *title = @"First button";
       	title.accessibilityLabel = @"Accessibility label for First button";
       	NSString *title2 = @"2nd button";
       	title2.accessibilityLabel = @"Accessibility label for 2nd button";
       	self.segmentedControl = [[UISegmentedControl alloc]
       									  initWithItems:[NSArray arrayWithObjects:title, title2, nil]];
       	self.segmentedControl.frame = CGRectMake(50, 50, 200, 40);
       	[self.view addSubview:self.segmentedControl];
       }
       
  4. Paras Mishra 2014-07-17

    Closing the issue as the duplicate of TIMOB-11454

JSON Source