[TIMOB-26816] [iOS] AccessibilityLabel isn't available in app
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | n/a |
| Labels | accessibility, accessibilityLabel, appium, engSchedule, ios, simulator |
| Reporter | josh.mocek |
| Assignee | Abir Mukherjee |
| Created | 2019-01-03T16:21:26.000+0000 |
| Updated | 2020-11-23T18:08:12.000+0000 |
Description
Here is the titanium app: [https://github.com/joshmocekMovista/accessLabelBug](http://example.com)
Once you build the app you will click on the elements. If you do this in Android the "Access Label" will change depending on what you click. In iOS it never changes and stays at "Nothing". Here is the 'doClick' function that is a click event on certain elements in the XML:
function doClick(e) {
// This doesn't give us Accessibility Label not sure if this is a problem
console.info('JSON.stringify(e):\n' + JSON.stringify(e));
changeIndicatorLabel(String(e.source.accessibilityLabel));
changeIDLabel(String(e.source.id));
if (e.source.id == 'view2' || e.source.id == 'heyLabel') alert('You clicked view2 or heyLabel');
}
You will also notice when you build the app that the console in the function returns the object 'e', but it is missing the 'accessibilityLabel' property.
Attachments
| File | Date | Size |
|---|---|---|
| index.js | 2019-01-03T16:17:16.000+0000 | 796 |
| index.tss | 2019-01-03T16:17:16.000+0000 | 212 |
| index.xml | 2019-01-03T16:17:16.000+0000 | 1324 |
| Screen Shot 2019-01-21 at 1.15.46 PM.png | 2019-01-21T19:17:45.000+0000 | 113656 |
| Screen Shot 2019-01-28 at 2.06.19 PM.png | 2019-01-28T11:15:50.000+0000 | 39157 |
| tiapp.xml | 2019-01-03T16:17:16.000+0000 | 4230 |
Hello, Thanks for sharing with us. What's your Xcode version? It would be helpful if you can share the console logs here for better investigation.
I have 9 and 10 ImageView:
Hello, World:{ "x":35.5, "y":24.5, "bubbles":true, "type":"click", "source":{ "animating":false, "paused":false, "reverse":false, "stopped":true, "autorotate":true, "duration":200, "horizontalWrap":true, "visible":true, "touchEnabled":true, "width":50, "height":50, "image":"/images/myimage.png", "id":"scrollimage", "top":0 }, "cancelBubble":false }Hey{ "x":60.5, "y":24.5, "bubbles":true, "type":"click", "source":{ "horizontalWrap":true, "visible":true, "touchEnabled":true, "height":50, "color":"#000", "id":"label1", "width":200, "text":"Hello, World", "top":10 }, "cancelBubble":false }{"x":61.5,"y":12.5,"bubbles":true,"type":"click","source":{"horizontalWrap":true,"visible":true,"touchEnabled":true,"color":"#000","id":"labelInView","width":"SIZE","height":"SIZE","text":"Label in View"},"cancelBubble":false}Thanks for providing this. We are working on this. For testing purpose, can you please run the following code and let us know how it goes. Double-press on the label to see the output.
var window = Ti.UI.createWindow({ backgroundColor: 'white' }); var scroll1 = Ti.UI.createScrollView({ backgroundColor : 'red', accessibilityLabel : 'This is ScrollView1', accessibilityValue : 'Value1', accessibilityHint : 'hint 1', height : 200, top : 0 }); var label1 = Ti.UI.createLabel({ text : 'Label Text', accessibilityLabel : 'Label on first Scrollview' }); scroll1.add(label1); window.add(scroll1); window.open();There is no click event in the code you gave me so I don't get anything. If I add it to the code I get this:
Here is the code I used:{ "x":1.5, "y":15, "bubbles":true, "type":"click", "source":{ "horizontalWrap":true, "visible":true, "touchEnabled":true, "text":"Label Text" }, "cancelBubble":false }var window = Ti.UI.createWindow({ backgroundColor: 'white' }); var scroll1 = Ti.UI.createScrollView({ backgroundColor: 'red', accessibilityLabel: 'This is ScrollView1', accessibilityValue: 'Value1', accessibilityHint: 'hint 1', height: 200, top: 0 }); var label1 = Ti.UI.createLabel({ text: 'Label Text', accessibilityLabel: 'Label on first Scrollview', }); label1.addEventListener('click', function(e) { console.info('JSON.stringify(e):\n' + JSON.stringify(e)); }); scroll1.add(label1); window.add(scroll1); window.open();Can you please try the following: To enable Accessibility Inspector on iOS simulator: Open Settings on the simulator. Click General, then Accessibility. Switch Accessibility Inspector to on. Please test again and let us know how it goes, For details please visit this [link](https://docs.axway.com/bundle/Titanium_SDK_allOS_en/page/accessibility.html).
No, it did not show anything. !Screen Shot 2019-01-21 at 1.15.46 PM.png|thumbnail!
Thanks for your feedback. Did you apply all the steps accordingly from [here](https://docs.axway.com/bundle/Titanium_SDK_allOS_en/page/accessibility.html?)?
Yes