Add litho accessibility rendering to Flipper accessibility mode

Summary: This is a re-do of D9720987.  Now that the Litho version has been bumped to 20 in D12838684, this diff can land safely.

Reviewed By: danielbuechele

Differential Revision: D12969979

fbshipit-source-id: b12d14e3b292d8cd110967f84f770f3725a800de
This commit is contained in:
Brett Lavalla
2018-11-10 00:03:55 -08:00
committed by Facebook Github Bot
parent 0bb0d69115
commit 4954d018d0
2 changed files with 8 additions and 10 deletions

View File

@@ -75,8 +75,7 @@ public final class GenerateLithoAccessibilityRenderExtensionCommand
while (!lithoViewSearchStack.isEmpty()) { while (!lithoViewSearchStack.isEmpty()) {
ViewGroup v = lithoViewSearchStack.pop(); ViewGroup v = lithoViewSearchStack.pop();
if (v instanceof LithoView) { if (v instanceof LithoView) {
// TODO: uncomment once Litho open source updates ((LithoView) v).rerenderForAccessibility(forceLithoAXRender);
// ((LithoView) v).rerenderForAccessibility(forceLithoAXRender);
} else { } else {
for (int i = 0; i < v.getChildCount(); i++) { for (int i = 0; i < v.getChildCount(); i++) {
View child = v.getChildAt(i); View child = v.getChildAt(i);

View File

@@ -548,14 +548,13 @@ export default class Layout extends FlipperPlugin<InspectorState> {
} }
initAX() { initAX() {
// TODO: uncomment once Litho open source updates this.client
// this.client .call('shouldShowLithoAccessibilitySettings')
// .call('shouldShowLithoAccessibilitySettings') .then((showLithoAccessibilitySettings: boolean) => {
// .then((showLithoAccessibilitySettings: boolean) => { this.setState({
// this.setState({ showLithoAccessibilitySettings,
// showLithoAccessibilitySettings, });
// }); });
// });
performance.mark('InitAXRoot'); performance.mark('InitAXRoot');
this.client.call('getAXRoot').then((element: Element) => { this.client.call('getAXRoot').then((element: Element) => {