{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/litho/issues/443","repository_url":"https://api.github.com/repos/facebook/litho","labels_url":"https://api.github.com/repos/facebook/litho/issues/443/labels{/name}","comments_url":"https://api.github.com/repos/facebook/litho/issues/443/comments","events_url":"https://api.github.com/repos/facebook/litho/issues/443/events","html_url":"https://github.com/facebook/litho/issues/443","id":368031500,"node_id":"MDU6SXNzdWUzNjgwMzE1MDA=","number":443,"title":"Accessibility - aggregation of labels of children is not working.","user":{"login":"anushreeag","id":17777328,"node_id":"MDQ6VXNlcjE3Nzc3MzI4","avatar_url":"https://avatars2.githubusercontent.com/u/17777328?v=4","gravatar_id":"","url":"https://api.github.com/users/anushreeag","html_url":"https://github.com/anushreeag","followers_url":"https://api.github.com/users/anushreeag/followers","following_url":"https://api.github.com/users/anushreeag/following{/other_user}","gists_url":"https://api.github.com/users/anushreeag/gists{/gist_id}","starred_url":"https://api.github.com/users/anushreeag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anushreeag/subscriptions","organizations_url":"https://api.github.com/users/anushreeag/orgs","repos_url":"https://api.github.com/users/anushreeag/repos","events_url":"https://api.github.com/users/anushreeag/events{/privacy}","received_events_url":"https://api.github.com/users/anushreeag/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-10-09T03:56:30Z","updated_at":"2018-11-09T01:50:35Z","closed_at":null,"author_association":"NONE","body":"- [ YES] I have searched [existing issues](https://github.com/facebook/litho/issues) and this is not a duplicate\r\n\r\n## Version\r\n\r\n`  // Litho\r\n    implementation 'com.facebook.litho:litho-core:0.15.0'\r\n    implementation 'com.facebook.litho:litho-widget:0.15.0'\r\n    compileOnly 'com.facebook.litho:litho-annotations:0.15.0'\r\n\r\n    annotationProcessor 'com.facebook.litho:litho-processor:0.15.0'\r\n\r\n    // SoLoader\r\n    implementation 'com.facebook.soloader:soloader:0.2.0'`\r\n\r\n\r\n## Issues and Steps to Reproduce\r\n1. Enable talkback(accessibility) from settings.\r\n2. Go to the sample Litho application.(Check the code below) \r\n3. Column should be focusable and individual text views should not be focusable and also text of text views should be aggregated. \r\n\r\n## Expected Behavior\r\nIn case of pure Android, \r\nif focusable is set on a ViewGroup( Ex : a linear layout) and this view group has 2 Text views, then in case of accessibility, \r\n1. Only Linear layout is focusable and text views are not focusable\r\n2. The 2 text view's text is aggregated and talks back when linear layout is focused.\r\nIn case of accessibility Litho should behave same as Android.\r\n\r\n## Link to Code\r\n**_Android code_**\r\nMainActivity.java\r\n`public class MainActivity extends AppCompatActivity {\r\n  @Override\r\n  protected void onCreate(Bundle savedInstanceState) {\r\n      super.onCreate(savedInstanceState);\r\n       setContentView(R.layout.activity_new);\r\n  }\r\n\r\n}`\r\n\r\nactivity_new.xml\r\n![image](https://user-images.githubusercontent.com/17777328/46646094-132d9c80-cb3d-11e8-97d5-abaca85273bb.png)\r\n\r\n\r\n**_Litho Code_** \r\nMainActivity.java\r\n`public class MainActivity extends AppCompatActivity {\r\n\r\n    @Override\r\n    protected void onCreate(Bundle savedInstanceState) {\r\n        super.onCreate(savedInstanceState);\r\n        LithoView view = new LithoView(this);\r\n        ComponentContext context = view.getComponentContext();\r\n        Component component = MyColumnComponent.create(context).focusable(true).build();\r\n        setContentView(view.create(context, component));\r\n    }\r\n}`\r\n\r\nMyColumnComponentSpec.java\r\n`\r\n@LayoutSpec\r\npublic class MyColumnComponentSpec {\r\n\r\n  @OnCreateLayout\r\n  static Component onCreateLayout(ComponentContext c) {\r\n\r\n    return Column.create(c)\r\n        .child(Text.create(c).text(\"Text1\").textSizeDip(30).build())\r\n        .child(Text.create(c).text(\"Text2\").textSizeDip(30).build())\r\n        .focusable(true)\r\n        .build();\r\n  }\r\n\r\n}`\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/facebook/litho/issues/comments/437221952","html_url":"https://github.com/facebook/litho/issues/443#issuecomment-437221952","issue_url":"https://api.github.com/repos/facebook/litho/issues/443","id":437221952,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzIyMTk1Mg==","user":{"login":"blavalla","id":1518064,"node_id":"MDQ6VXNlcjE1MTgwNjQ=","avatar_url":"https://avatars0.githubusercontent.com/u/1518064?v=4","gravatar_id":"","url":"https://api.github.com/users/blavalla","html_url":"https://github.com/blavalla","followers_url":"https://api.github.com/users/blavalla/followers","following_url":"https://api.github.com/users/blavalla/following{/other_user}","gists_url":"https://api.github.com/users/blavalla/gists{/gist_id}","starred_url":"https://api.github.com/users/blavalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blavalla/subscriptions","organizations_url":"https://api.github.com/users/blavalla/orgs","repos_url":"https://api.github.com/users/blavalla/repos","events_url":"https://api.github.com/users/blavalla/events{/privacy}","received_events_url":"https://api.github.com/users/blavalla/received_events","type":"User","site_admin":false},"created_at":"2018-11-09T01:50:35Z","updated_at":"2018-11-09T01:50:35Z","author_association":"NONE","body":"@vinc3m1, yep it looks almost exactly like that, with the only difference being the isFocusable result is passed into the ComponentAccessibilityDelegate's constructor and it's handled there, as well as also passing in the result of `ViewCompat.getImportantForAccessibility(this)`.  It also does the same thing when going through the descendants and refreshing their delegates. \r\n\r\nGlad you found a workaround to unblock you for now, and sorry for the slow turnaround on this one!"}}
{"actor":{"display_login":"blavalla"}}