From 03b4a0b2776102041a2d48580046fbf03b5e3446 Mon Sep 17 00:00:00 2001 From: leaf-agent <318509791+leaf-agent@users.noreply.github.com> Date: Sun, 30 Aug 2026 20:39:37 +0000 Subject: [PATCH] Stop the render gate reporting a hidden note as words out of reach MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `unreachableWords` walks every text node under a widget's `.lf-ui` and reports the ones no declaration claims. It excused `.lf-quiet` and nothing else, so the external-link note 26dbf42 added — a `[hidden]` aria-describedby target carrying "opens in a new tab" — was reported as a word the reader is shown and cannot select. `test_example_renders[corpus]` has failed on it in both schemes since that commit, and so would any authored page with a cross-origin link inside a widget, at `version check --render`. The note cannot use `.lf-quiet`: it is placed beside its link inside whatever root the link stands in, shadow trees included, and the clip is a document rule that no shadow tree adopts. `[hidden]` is the silence available in every root, and it is safe for this reading to trust because the browser drops the attribute when it reveals `hidden="until-found"` content — a word the reader finds is a word the check sees again. The two sibling gate readings that ask what a box shows already spell the same pair. --- .../leaf/render-checks/reachability.js | 13 +++++- tests/test_render_commands.py | 43 ++++++++++++++++++- 2 files changed, 53 insertions(+), 3 deletions(-) diff --git a/skills/leaf/scripts/leaf/render-checks/reachability.js b/skills/leaf/scripts/leaf/render-checks/reachability.js index 71d6694cc..1a6f58da7 100644 --- a/skills/leaf/scripts/leaf/render-checks/reachability.js +++ b/skills/leaf/scripts/leaf/render-checks/reachability.js @@ -255,8 +255,17 @@ export function unreachableWords() { if (el.closest(".lf-work-line")) continue; // .lf-quiet is words for a reader listening, clipped to nothing: not on // screen, so there is nothing here the eye can see and the pointer can't - // reach — the failure this check exists for. - if (el.closest(".lf-quiet")) continue; + // reach — the failure this check exists for. [hidden] is the other half of + // that same silence and the one the runtime reaches for where a clip cannot + // go: the external-link note is an aria-describedby target inside whatever + // root its link stands in, shadow roots included, and .lf-quiet's rule is a + // document stylesheet that no shadow tree adopts. The attribute is safe to + // read as "not shown" because the browser drops it on the reveal — a + // hidden="until-found" word the reader finds is a word this check sees + // again, at the moment it is on screen. The two sibling checks that ask what + // a box shows (render-checks/widgets.js, render-checks/standalone.js) spell + // the same pair. + if (el.closest(".lf-quiet, [hidden]")) continue; found.push( `${at(widget(el))} puts ${JSON.stringify(n.data.trim().slice(0, 40))} ` + `under .lf-ui, where no comment can reach it`, diff --git a/tests/test_render_commands.py b/tests/test_render_commands.py index bad525eab..043594665 100644 --- a/tests/test_render_commands.py +++ b/tests/test_render_commands.py @@ -515,7 +515,14 @@ def test_render_reports_words_a_widget_puts_out_of_reach(browser, serve): The second one no marker can fix, which is why it reads differently: a word inside a form control is unselectable in every engine, so a widget that reaches for