Repository navigation
Description
Problem & intent
#282 makes a shared-desktop left click into a background Chromium web area take the element route (the hit's AXPick or AXPress, route 1, no mouse event) when the hit advertises an action. Otherwise the click is refused with backgroundClickRefused and nothing is posted.
The most common refused case will be a click into a background Chrome text field or text area: an AXTextField or AXTextArea, or a contenteditable element (AXGroup or AXTextArea with AXEditableAncestor). These advertise no press action. The model usually clicks there to focus the field before typing. Today that click is refused, so a "click the field, then type" sequence into a background Chrome page fails at its first step.
Intent. Add a second element route for a plain single left click whose hit is an editable text element inside a web area: set AXFocused true on the hit, with no mouse event and no window ordering, so the field takes keyboard focus.
The difference has to be said. A click places the caret at the point. Setting AXFocused does not: Chromium puts the caret wherever its focus logic decides (usually where the field's last selection was, or at the start or end). The result must state this:
- the meta's
elementClick.reasongets a new value, for examplefocusedNotPlaced; - the result says the field was focused, not clicked, and that the caret may not be at the point;
- the model can then place the caret itself if it matters (a key such as ⌘→, or
select_text, orset_value).
Constraints
- Keep macOS engine: a left click into a background Chrome page is swallowed as the window's activating click, and cua reports success #282's rules: in shared mode, no mouse event goes into a background web area; the element route comes before the refusal; and nothing is posted before a refusal.
- This applies only to a plain single left click, and only to editable text hits. A double click, a drag and focusField's fallback stay refused as macOS engine: a left click into a background Chrome page is swallowed as the window's activating click, and cua reports success #282 built them.
- Setting AXFocused must not raise Chrome's window or make Chrome frontmost. Measure it, don't assume it.
- The vendor runtime stays unmodified. Live proof runs on harness fixtures (Chrome for Testing).
- Spawned by macOS engine: a left click into a background Chrome page is swallowed as the window's activating click, and cua reports success #282. No parent (consciously N/A). Nothing blocks it in the code, but it builds on macOS engine: a left click into a background Chrome page is swallowed as the window's activating click, and cua reports success #282's code, so it lands after macOS engine: a left click into a background Chrome page is swallowed as the window's activating click, and cua reports success #282.
Measurement plan
Run it on background Chrome for Testing behind TextEdit, on the counters page plus a page with an input, a textarea and a contenteditable div, each holding known text. Run it on the hosted runner if #282's probe shows the grants there; otherwise in an attended MacBook slot. For each editable kind, 3 repetitions of the click at a point in the middle of the text. Read:
- whether the element took focus:
document.activeElement, the page's focus counters, and the AX focused element; - where the caret landed:
selectionStartandselectionEnd, or the Selection for contenteditable, against the offset under the point; - the order watcher and the frontmost app: no raise, TextEdit stays in front;
- the page's pointer and mouse counters: 0, since no mouse event was posted;
- a follow-up
type_textof a marker string: where it landed; - the time from post to focus.
Report the caret's landing rule per kind. If it is deterministic, say so in the result's sentence ("the caret is at the end of the field"). If not, keep the generic sentence.
Success criteria
- Unit tests: a web-area hit that is an editable text element is focused through AXFocused, with no mouse event, and the meta and result state "focused, not placed". A non-editable hit with no action is still refused.
- The measurement above, recorded under docs/evidence/, with the caret rule per kind.
- The first-call document's paragraph extends macOS engine: a left click into a background Chrome page is swallowed as the window's activating click, and cua reports success #282's with the focus route and the caret caveat.
Sources
- macOS engine: a left click into a background Chrome page is swallowed as the window's activating click, and cua reports success #282's body (Design, Acceptance) and its code:
pointer.elementRouteanddeliverPointer(native/engine/Sources/Engine/Input.swift), and the element route (ElementInput.swift,elementClick.reason webArea). - The design session's ruling, 1ea561bc d0aaf320 (2026-11-05).
Activity
SSFSKIM commentedon Nov 5, 2026
Data from #282's hosted probe (run 42131623237; probe/282-hosted; CfT 156 on macOS 26.6.2 and 26.7.2, two reps alike):
enablementPriorfalse), its page controls advertised only[AXShowMenu, AXScrollToVisible]until Chromium's complete accessibility mode arrived, 1.6–1.7 s later. From then on they also advertised AXPress.<textarea>focused it:document.activeElementwas the textarea, the textFocus count was 1, no pointer events fired, and TextEdit stayed frontmost.So for this ticket, AXPress may be an alternative to setting AXFocused, but only once complete mode is on. The caret-placement question is unchanged. #282 refuses text-entry roles in shared mode (the design session's allowlist), so this route stays #283's.
Sminos-Session: cursor235#b93055dd (cua on macbook)
SSFSKIM commentedon Nov 6, 2026
[board] in-progress: taken by cursor235 after #284 merged
Engine: a shared-mode click into a background web page's text field f…
Docs: the first-call paragraph, the surface inventory and the spec's …
Engine: #283's caret is placed only from a value read as text and a l…
Engine: #283's soft wrap is recognized only from a usable next box, n…
Engine: a contenteditable region's static-text hit places the caret, …
Engine: a focused field whose boxes are still empty in a fresh Chrome…
Engine: an unread role in a region's walk leaves the hit unmapped, an…
Engine: the caret scan covers the whole value, and a miss with boxes …
13 remaining items
Engine: cua owns and releases Chrome's AXEnhancedUserInterface (end_t…
Engine: a stale point is refused before #282's element route, which p…
Engine: a coordinate click whose screenshot target has moved, gone or…
Probe 287 wave 2: Firefox's zero-frame AXWebArea (run 42376953140: th…
Engine: an element click on a text field outside Chromium is focused by
Probe 313 x: which accessibility write focuses a page's field in back…
Engine: outside Chromium a text field's element click never writes AX…
Engine: a text field's element click outside Chromium answers success…
Engine: a shared-mode pointer into a background Firefox page is eleme…
Engine: a shared-mode pointer into a background Firefox page is eleme…
Engine: a right-to-left value past 5,000 characters keeps #283's refu…
Engine: the caret's offset searched by line, then x, with #283's line…
Engine: a Chromium click writes the caret before any focus, and answe…
gate #258: its disposition, the click.selection cell beside the vendo…
macOS engine: a click on a frontmost web text field places a caret, a…