Small sidebar update

Summary: Added some props to sidebar for ax mode.

Differential Revision: D8983386

fbshipit-source-id: eaf414dc8ae5386744c66f1d43b6b9068b9593c1
This commit is contained in:
Sara Valderrama
2018-07-26 15:18:30 -07:00
committed by Facebook Github Bot
parent 4fd89f6402
commit ffe53d1345
2 changed files with 14 additions and 6 deletions

View File

@@ -408,14 +408,14 @@ public class ViewDescriptor extends NodeDescriptor<View> {
case "content-description":
node.setContentDescription(value.asString());
break;
case "label-for":
node.setLabelFor(value.asInt());
case "long-clickable":
node.setLongClickable(value.asBoolean());
break;
case "traversal-after":
node.setAccessibilityTraversalAfter(value.asInt());
case "clickable":
node.setClickable(value.asBoolean());
break;
case "traversal-before":
node.setAccessibilityTraversalBefore(value.asInt());
case "selected":
node.setSelected(value.asBoolean());
break;
}
invalidate(node);

View File

@@ -448,6 +448,14 @@ public final class AccessibilityUtil {
view.getContentDescription() != null ? view.getContentDescription() : "";
props.put("content-description", InspectorValue.mutable(contentDescription));
props.put("focusable", InspectorValue.mutable(view.isFocusable()));
props.put("selected", InspectorValue.mutable(view.isSelected()));
props.put("long-clickable", InspectorValue.mutable(view.isLongClickable()));
props.put("clickable", InspectorValue.mutable(view.isClickable()));
props.put("focused", view.isFocused());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
props.put("accessibility-focused", view.isAccessibilityFocused());
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
props.put(