[iOS] Force Voiceover focus to UIMenuController after showing manually

Bug: 938239
Change-Id: I8224e85f8c29d9610975fad88ae1cd7488c9d650
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1503316
Commit-Queue: Robbie Gibson <rkgibson@google.com>
Reviewed-by: Stepan Khapugin <stkhapugin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638061}
diff --git a/ios/chrome/browser/ui/location_bar/location_bar_view_controller.mm b/ios/chrome/browser/ui/location_bar/location_bar_view_controller.mm
index 7aaf050..d178525 100644
--- a/ios/chrome/browser/ui/location_bar/location_bar_view_controller.mm
+++ b/ios/chrome/browser/ui/location_bar/location_bar_view_controller.mm
@@ -476,6 +476,10 @@
 
       [menu setTargetRect:self.locationBarSteadyView.frame inView:self.view];
       [menu setMenuVisible:YES animated:YES];
+      // When we present the menu manually, it doesn't get focused by Voiceover.
+      // This notification forces voiceover to select the presented menu.
+      UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification,
+                                      menu);
     });
   }
 }