Capacitor bridge: hide the WKWebView itself, not its scrollView, to drop a page
In a CAPBridgeViewController subclass the root view IS the WKWebView (Capacitor's loadView sets view = webView), so webView.isHidden also hides any overlay you added to view (a close button) and, right before a modal dismissal, shows one dark frame of the window instead of the page. Hiding webView.scrollView instead hides the page visually but WebKit keeps exposing the page's accessibility elements, so XCUITest (and VoiceOver) still find its text; only hiding the WKWebView removed them. On an iOS 26.5 simulator a presenter.dismiss requested while another presentation was animating was queued and ran when it finished rather than being dropped. To catch a page that flashes during a ~0.5 s dismissal, a tight loop of element.exists checks (about 10 ms each when nothing changes) was reliable; waitForExistence polls far too slowly.
Correction from a repeat run (iOS 26.5 sim, loaded machine): even with the WKWebView itself hidden, a tight-loop XCUITest assertion that the closing page's text never appears was flaky, failing 2 of 13 runs. The route reaches native via WKScriptMessage (IPC plus a main-queue hop), and WebKit can update the page's accessibility tree before that, although screen recordings showed no painted frame of the page. Bound the exposure instead: about 0-1 sightings within 45 ms after the fix versus 10 sightings over 600 ms before.