Skip to content

macOS engine: a fresh Chromium/Electron app's first observation misses the page when SonomaAccessibilityActivationRefinements is on #246

Open

Description

@SSFSKIM

Gap

cua's macOS engine sees the page in its first observation of a freshly launched Electron or Chromium app because it reads the application element's role before switching accessibility on (#244). Chromium's -[BrowserCrApplication accessibilityRole], and Electron's copy in shell/browser/mac/electron_application.mm, then give the process kAXModeBasic, which exposes the web contents at once. When the Chromium feature kSonomaAccessibilityActivationRefinements is on, the same role read gives only kNativeAPIs. The page then appears only once the attribute's complete mode lands, which Electron schedules 2 s after the write, longer than the engine's 100 ms + 1 s web-area wait. So the first observation has no page.

Evidence

The #244 live check (2026-11-01, build ed8521553753, evidence under docs/evidence/2026-10-30-macos-agent-cursor/item-244/ once #244's PR lands) ran the Electron fixture (Electron 44.9.0) with --enable-features=SonomaAccessibilityActivationRefinements:

  • first observation: 14 lines, no AXWebArea, webAreaFound false after a 1118 ms wait;
  • the same build without the flag: the page with its button (27 lines, index 13) in the first observation, web area found after 116 ms.

Why it is not built now

The feature is disabled by default in Chromium main (content/public/common/content_features.cc, BASE_FEATURE(kSonomaAccessibilityActivationRefinements, base::FEATURE_DISABLED_BY_DEFAULT), checked 2026-11-01). It has no entry in the public testing/variations/fieldtrial_testing_config.json, and Electron apps get no field trials. No app is known to turn it on.

Candidate fix (C in #244's phase 1)

After a write the engine owns, on the first observation of that process, when no web area has appeared within the existing wait, keep waiting up to about 2.5 s in all for one to appear. That covers Electron's 2 s countdown to complete mode.

Pick it up when

Any of these holds:

  • Chromium's default flips (re-check the line above);
  • a field trial or an Electron release turns the feature on;
  • an app is seen with an incomplete first observation and the feature on.

Spawned by #244.

Activity

  1. added
    enhancement
    status:ready-for-implementer
    priority:P3
    on Nov 1, 2026
  2. added 3 commits that reference this issue on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpriority:P3status:ready-for-implementer

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions