Include non-drawable litho components in AX tree + small sidebar edit

Summary:
Fixed issue with DebugComponentDescriptors being left out of accessibility tree so the AX tree now includes all Litho view nodes (not Litho accessibility nodes yet). Litho drawables have no accessibility properties so these are not included. Also changed default for getAXChildAt to do whatever the original view tree does for that node and added a getAXChildCount function to better customize the accessibility tree.

Segmented the ax sidebar into properties directly form the view and properties derived from the AccessibilityNodeInfo.

Differential Revision: D8861129

fbshipit-source-id: 987683ef45188aa9cb587cc0e5ffba8fbf40136d
This commit is contained in:
Sara Valderrama
2018-07-16 16:52:47 -07:00
committed by Facebook Github Bot
parent e83c8d31a2
commit 5ceb3e4ffe
5 changed files with 84 additions and 21 deletions

View File

@@ -502,7 +502,7 @@ public class InspectorSonarPlugin implements SonarPlugin {
new ErrorReportingRunnable(mConnection) {
@Override
protected void runOrThrow() throws Exception {
for (int i = 0, count = descriptor.getChildCount(obj); i < count; i++) {
for (int i = 0, count = descriptor.getAXChildCount(obj); i < count; i++) {
final Object child = assertNotNull(descriptor.getAXChildAt(obj, i));
children.put(trackObject(child));
}