Skip to content

macOS engine: a screenshot's image and its accessibility record are not tied to one layout, so a list that changes during the observation can turn a click into a press of a different row #478

Open

Description

@SSFSKIM

Problem

A screenshot's image and its accessibility record are not tied to one layout. Skyshot.swift (main 5580ac2, around line 317) runs the window capture on its own thread beside the tree walk, for speed. If the content at a point changes between the moment the image is captured and the moment the walk reads that part of the tree, the image shows A while the record holds B. A later click at that point is checked against the record. B's handle, label and frame are unchanged from the record, so every stale-point check passes, and the click lands on B although the caller clicked what it saw, A.

This holds for every coordinate click on main (a page that re-renders a list during the observation). With #453's AXPress route on overlays (ruling 1071), it also reaches Chromium's omnibox and autocomplete lists, which refresh far more often than a page.

Found

#453's review of c8858c2 (reviewer-high, P1-1). Ruled a declared limit under ruling 891 by ruling 1072: main has the same race for every click, so it's not a regression of the #453 branch. #453's PR carries a limits line. One condition: if the #453 qual's omnibox-while-typing cell shows any wrong row, a two-read stability check goes into #453 before ship.

What a fix would need

Tie the record to the image's layout. One option: re-read, after the capture, the labels and frames of the nodes the image could show at changing places, and mark the record unstable where they moved. Another: capture after the walk, and refuse a point whose region changed between two cheap reads. Either way, measure the latency cost per observation and how often real pages change during one. #453's parked branch had a stability re-read for overlays (fix/453-overlay-click, the walk-before-capture order), and it drew review findings of its own. Start from the measurement, not from that code.

Acceptance

  • A measured rate of record-vs-image disagreement on a changing list (page and omnibox), on main.
  • Either a guard that refuses or re-observes when the record can't be tied to the image, with its latency cost; or a decision to keep the limit declared, with the measured rate.

Activity

  1. added
    bug
    status:ready-for-architect
    priority:P2
    on Nov 22, 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

    bugpriority:P2status:ready-for-architect

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions