[TIMOB-26313] iOS: accessibilityLabel doesn't get properly set on Ti.UI.TableView
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2018-08-21T13:08:26.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 7.5.0 |
| Components | iOS |
| Labels | n/a |
| Reporter | Christopher Williams |
| Assignee | Hans Knöchel |
| Created | 2018-08-17T12:30:32.000+0000 |
| Updated | 2018-09-13T21:38:14.000+0000 |
Description
While working through our Appium suite, I noticed that tests that relied on using the accessibility id/label for a table view ere failing. Using the Appium Desktop inspector, I see that the table view has no accessibility id assigned, though the code has set an accessibilityLabel.
I assume this is because the view gets attached async, so the code here does not attempt to set it: https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiViewProxy.m#L2856-L2863
It looks like the method should be overwritten, because the native underlaying UITableView manages the accessibility label, not the wrapper view (a UIView instance). I will try something out next week.
Test-Case (TableView):
var win = Ti.UI.createWindow({ backgroundColor: '#fff' }); var nav = Ti.UI.iOS.createNavigationWindow({ window: win }) var table = Ti.UI.createTableView({ data: [ { title: 'Test' } ], accessibilityLabel: 'My Table' }); win.add(table); nav.open();Actually did a CR and FR. Both passed. Merged to master (7.5.0 target)
Verified the fix on 7.5.0.v20180912144403. Works fine. Closing.
Operating System Name = Mac OS X Version = 10.13.6 Node.js Node.js Version = 8.9.1 npm Version = 5.5.1 Titanium CLI CLI Version = 5.1.1 Titanium SDK SDK Version = 7.5.0.v20180912144403 iPhone 6s =ios 11.4.1