{ "id": "172807", "key": "TIMOB-26706", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "21201", "description": "", "name": "Release 10.1.0", "archived": false, "released": true, "releaseDate": "2021-09-28" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2021-08-19T10:51:09.000+0000", "created": "2019-01-03T15:56:43.000+0000", "priority": { "name": "Critical", "id": "1" }, "labels": [ "accessibility", "accessibilityLabel", "android", "appium", "emulator" ], "versions": [ { "id": "20238", "description": "", "name": "Release 7.5.0", "archived": false, "released": true, "releaseDate": "2018-11-15" } ], "issuelinks": [ { "id": "57267", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "172808", "key": "TIMOB-26816", "fields": { "summary": "[iOS] AccessibilityLabel isn't available in app", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-08-19T10:51:09.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [], "description": "Here is an appium project (it is not needed, but useful): [https://github.com/joshmocekMovista/AccessibiltyLabel_Bug]\r\nHere is the titanium app: [https://github.com/joshmocekMovista/accessLabelBug|http://example.com]\r\n\r\nUse the files that I had for the titanium app. You will notice that there are accessibilityLabels on multiple elements in the XML. So far the accessibilityLabels work somewhat on iOS. On Android they are currently showing up on Labels, but you will notice that they are on the wrong element on \"TextFields\" and \"ImageViews\". You can inspect the elements with appium or with the Android Tool UIAutomatorViewer.\r\n\r\nReference \"textInputLayout-editText.png\", \"editText.png\", \"appium-TextInputLayout.png\", and \"appium-editText.png\". \r\n\r\nHere is the titanium XML:\r\n{code:xml}\r\n\r\n{code}\r\n\r\nOn \"TextFields\" instead of being on the element it is on the parent and looks like (disclaimer Android add a '.' to the accessibilityLabels:\r\n\r\n{code:xml}\r\n\r\n \r\n \r\n \r\n\r\n{code}\r\n\r\nThis messes up automated testing since in selenium I want to run the same code for iOS and Android (it works on iOS currently). Here is they python code I run in selenium to add text to a in iOS this works on Android it can't send the keys because it is trying to send the keys to the element instead of element:\r\n\r\n{code:python}\r\ncontext.driver.find_element_by_accessibility_id('textField.').send_keys('text added by automated test')\r\n{code}\r\n\r\nI think the Android XML should look like this:\r\n\r\n{code:xml}\r\n\r\n \r\n \r\n \r\n\r\n{code}\r\n\r\nThis is also a problem with the element. Reference \"viewGroup-imageView.png\" and \"imageView.png\". You will notice that the accessibilityLabel is on the element instead of the element. The Android looks like this:\r\n\r\n{code:xml}\r\n\r\n \r\n\r\n{code}\r\n\r\nI think it should look like this:\r\n\r\n{code:xml}\r\n\r\n \r\n\r\n{code}\r\n\r\nOnce again this works on iOS and it doesn't on Android because it doesn't find the correct element because the \"accessibilityLabel\" is tied to the element instead of the element.", "attachment": [ { "id": "66043", "filename": "appium-editText.png", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-03T15:33:46.000+0000", "size": 575330, "mimeType": "image/png" }, { "id": "66042", "filename": "appium-TextInputLayout.png", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-03T15:33:46.000+0000", "size": 510108, "mimeType": "image/png" }, { "id": "66044", "filename": "edtiText.png", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-03T15:33:46.000+0000", "size": 545687, "mimeType": "image/png" }, { "id": "66045", "filename": "imageView.png", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-03T15:33:46.000+0000", "size": 505821, "mimeType": "image/png" }, { "id": "66047", "filename": "index.js", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-03T15:30:49.000+0000", "size": 796, "mimeType": "text/javascript" }, { "id": "66046", "filename": "index.tss", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-03T15:30:49.000+0000", "size": 212, "mimeType": "application/octet-stream" }, { "id": "66049", "filename": "index.xml", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-03T15:30:49.000+0000", "size": 1324, "mimeType": "text/xml" }, { "id": "66040", "filename": "textInputLayout-editText.png", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-03T15:34:18.000+0000", "size": 522468, "mimeType": "image/png" }, { "id": "66048", "filename": "tiapp.xml", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-03T15:30:49.000+0000", "size": 4230, "mimeType": "text/xml" }, { "id": "66041", "filename": "viewGroup-imageview.png", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-03T15:34:18.000+0000", "size": 499348, "mimeType": "image/png" } ], "flagged": false, "summary": "Android: AccessibilityLabel is on wrong element", "creator": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android 7.1.1 & 8.0\r\nAccessibilityLabel\r\nAndroid Emulator\r\nTitanium SDK 7.5.0 & 7.1.1 & 7.1.0", "closedSprints": [ { "id": 1219, "state": "closed", "name": "2021 Sprint 5", "startDate": "2021-03-01T19:02:00.000Z", "endDate": "2021-03-12T19:02:00.000Z", "completeDate": "2021-03-15T03:30:49.472Z", "originBoardId": 114 }, { "id": 1220, "state": "closed", "name": "2021 Sprint 6", "startDate": "2021-03-15T03:31:12.088Z", "endDate": "2021-03-27T03:31:00.000Z", "completeDate": "2021-03-26T19:18:15.760Z", "originBoardId": 114 }, { "id": 1221, "state": "closed", "name": "2021 Sprint 7", "startDate": "2021-03-29T19:18:00.000Z", "endDate": "2021-04-09T19:18:00.000Z", "completeDate": "2021-04-12T21:26:15.427Z", "originBoardId": 114 }, { "id": 1222, "state": "closed", "name": "2021 Sprint 8", "startDate": "2021-04-12T21:26:41.532Z", "endDate": "2021-04-23T21:26:00.000Z", "completeDate": "2021-04-28T15:13:56.824Z", "originBoardId": 114 }, { "id": 1223, "state": "closed", "name": "2021 Sprint 9", "startDate": "2021-04-26T15:14:42.215Z", "endDate": "2021-05-07T15:14:00.000Z", "completeDate": "2021-05-17T16:30:45.852Z", "originBoardId": 114 }, { "id": 1224, "state": "closed", "name": "2021 Sprint 10", "startDate": "2021-05-17T16:31:32.484Z", "endDate": "2021-05-28T16:31:00.000Z", "completeDate": "2021-05-28T22:15:02.543Z", "originBoardId": 114 }, { "id": 1225, "state": "closed", "name": "2021 Sprint 11", "startDate": "2021-05-28T22:19:23.792Z", "endDate": "2021-06-11T22:19:00.000Z", "completeDate": "2021-06-11T20:29:04.462Z", "originBoardId": 114 }, { "id": 1226, "state": "closed", "name": "2021 Sprint 14", "startDate": "2021-07-20T22:25:18.817Z", "endDate": "2021-08-13T22:25:00.000Z", "completeDate": "2021-09-22T21:41:17.520Z", "originBoardId": 114 }, { "id": 1227, "state": "closed", "name": "2021 Sprint 12", "startDate": "2021-06-11T20:29:43.936Z", "endDate": "2021-06-25T20:29:00.000Z", "completeDate": "2021-07-06T14:26:59.346Z", "originBoardId": 114 }, { "id": 1228, "state": "closed", "name": "2021 Sprint 13", "startDate": "2021-07-06T14:28:47.857Z", "endDate": "2021-07-20T14:28:00.000Z", "completeDate": "2021-07-20T22:24:46.215Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "444987", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Hello, What seems to be the issue here. Can you explain a little more? I tested the issue with the sample code provided and I got the behavior when clicked on the \"Label on view\" the \"ID\" and \"Access Label\" changed from \"nothing\" to \"labelInView\" and the below info on console\r\n{code}\r\n[INFO] JSON.stringify(e):\r\n[INFO] {\"type\":\"click\",\"source\":{\"shadowRadius\":1,\"wordWrap\":true,\"text\":\"Label\r\n in View\",\"ellipsize\":2,\"color\":\"#000\",\"hiddenBehavior\":4,\"enabled\":true,\"visibl\r\ne\":true,\"touchEnabled\":true,\"accessibilityLabel\":\"labelInView\",\"backgroundRepeat\r\n\":false,\"height\":\"size\",\"width\":\"size\",\"backgroundDisabledColor\":null,\"keepScree\r\nnOn\":false,\"children\":[],\"size\":{\"height\":21,\"y\":0,\"width\":88,\"x\":0},\"rect\":{\"he\r\night\":21,\"absoluteX\":148,\"y\":15,\"absoluteY\":256,\"x\":56,\"width\":88},\"apiName\":\"Ti\r\n.UI.Label\",\"bubbleParent\":true,\"id\":\"labelInView\",\"horizontalWrap\":true,\"soundEf\r\nfectsEnabled\":true,\"_events\":{\"click\":{}}},\"force\":0,\"y\":20.584716796875,\"size\":\r\n0,\"x\":95.490234375,\"bubbles\":true,\"cancelBubble\":false}\r\n{code}\r\n\r\nWhat seems to be the issue here? Thanks.", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2019-01-04T14:24:40.000+0000", "updated": "2019-01-04T14:24:40.000+0000" }, { "id": "444990", "author": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Yeah, technically that part works. If you go to the UIAutomatorViewer and inspect the app you can see the Android XML.\r\n\r\nRefer to the \"TextInputLayout-EditText.png\".\r\n\r\nThe accessibilityLabel is put on the element, but should be on the element. The reason this is a problem is because when you are using selenium or appium and running the following code to get the element by the accessibility id it gets the outer element so trying to 'send_keys' to that field results in an error.\r\n\r\n{code:python}\r\ncontext.driver.find_element_by_accessibility_id('textField.').send_keys('text added by automated test')\r\n{code}\r\n\r\nEdit:\r\nYou will notice that 'content-desc' is blank on and in the element you will see that 'content-desc' is the accessibility id. It is fine for it to be labeled 'content-desc', but that just needs to be on the element so we can actually interact with the field. The Android XML should look like:\r\n{code:xml}\r\n\r\n \r\n \r\n \r\n\r\n{code}", "updateAuthor": { "name": "josh.mocek", "key": "josh.mocek", "displayName": "josh.mocek", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2019-01-04T15:40:42.000+0000", "updated": "2019-01-04T16:01:09.000+0000" }, { "id": "448319", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "With setText() I'm able to write into a Textfield with {{accessibilityLabel}}:\r\n{{driver.elementById(\"email.\").setText(\"test@mail.com\");}}\r\nbut I'm not able to read text without using xpath. So it would be nice to have the content-desc on the right element.", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2019-05-12T15:05:28.000+0000", "updated": "2019-05-12T15:05:28.000+0000" }, { "id": "458377", "author": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master: https://github.com/appcelerator/titanium_mobile/pull/12538", "updateAuthor": { "name": "gmathews", "key": "gmathews", "displayName": "Gary Mathews", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-03-10T16:54:36.000+0000", "updated": "2021-03-10T16:54:36.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }