Skip to content

Fix seven false positives, add scripts off and look timeouts (0.1.2) - #3

Merged
0thernet merged 4 commits into
mainfrom
fixes-0.1.2
Nov 18, 2026
Merged

0thernet merged 4 commits into
mainfrom
fixes-0.1.2

Conversation

@0thernet

@0thernet 0thernet commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Release notes for 0.1.2. Rolling 0.1.1 out turned up seven false positives and two gaps. Each fix has a clean planted case in tricky.html or a new fixture state, plus a browser test. After review, each exemption is narrowed so that it leaves alone only what it must: broken.html now plants a real defect beside every one of them.

Fixes

  • covered and contrast under an open popup. An open menu, listbox, dialog, popover, or the panel an aria-expanded="true" control opened was judged like any overlay.
    • A menu, listbox, dialog or alertdialog counts as open only when it is an open <dialog>, has aria-modal="true", is an open popover, is positioned absolute or fixed, or is what an aria-expanded="true" control opens. A menu bar or a list that is part of the page is judged like anything else, and so is a panel that holds its own expanded control, such as a sidebar with the button that hides it.
    • covered leaves alone controls under such a popup.
    • contrast skips text under a popup only where the popup paints a surface, and text under another box only when that box is nearly opaque (background alpha times opacity of 0.9 or more). A drawing, a frame, a shadow or a faint veil over text lets the text show, so its contrast is still measured. The alpha is read in every syntax Chromium computes a color in: rgb(), oklch(), oklab(), color() and what color-mix() resolves to. Anything else is painted on a canvas and read back.
    • Planted clean: an open dark menu over links and text. Planted defects in broken.html: pale text under a decorative SVG, inside a border frame, under a 65% veil written as rgb(), as oklch() and as color-mix(), and beside a clear role="dialog" wrapper; a link under an in-flow role="menu" bar; a button under an in-flow role="listbox"; a link under a sidebar that holds its own aria-expanded="true" button.
  • Skip links clipped to nothing. Screen-reader text needed a box of 2px or less. A full-size skip link clipped with clip: rect(0 0 0 0) therefore counted as visible.
    • A zero-area clip, or a clip-path (inset, circle, ellipse) that leaves nothing, now hides text at any size.
    • Planted: two such skip links under a sticky header.
  • Touch views and the full picture. While Chromium captures beyond the viewport, Playwright turns touch emulation off. Hover and pointer media then matched a mouse, so the full picture showed a different layout from the one ra measured.
    • On touch views, ra now holds the media rules and sheets that ask about hover or pointer to their current match while both pictures are taken.
    • Planted: rows sized for touch above a dark button. The test checks pixels in the full picture.
  • no-name on a control inside aria-hidden. The name check now leaves out a control inside aria-hidden="true" that is out of the tab order (tabindex="-1"). One that Tab still reaches is reported, since a screen reader lands on it with nothing to say. Planted defect: an unnamed button inside aria-hidden that Tab reaches.
  • Text inside role="img". contrast, cut-off, spill and overlap now skip text that belongs to a picture, which is read by its label, unless the picture holds a link, a button or anything else that Tab reaches. A disabled control, anything inert and a link without href are not reached. Planted defect: a role="img" card holding a cut-off link and pale text. Planted clean in tricky.html: an inert mockup with a button, and a mockup with a disabled button and a bare <a>.
  • cut-off inside a scaled box. The clip was measured in the box's own CSS pixels and the text in screen pixels. Both are now measured as drawn.
  • contrast on text a scroller clips away. The sample is now limited to what every clipping box shows, scrollers included. A line scrolled out of its frame is skipped. A clip-path is measured against the element's own size, so a scaled line that the clip shows in part is still measured. Planted defect: pale text at scale(0.5) with clip-path: inset(0 120px 0 0).

New

  • javascript: false on a state. The look's browser context runs with JavaScript disabled, and every check still runs.
    • <noscript> content is read as text.
    • It does not make a state local, so a run against a deployment may use it without live.
    • Documented in the README and the skill.
    • Fixture state: noscript.
  • A look never hangs ra. Steps, --then code, expect and ra's own in-page work are bounded by the project's timeout (30 s by default). When the time runs out:
    • steps and --then report a steps finding, expect reports an expect finding, and the page or ra's checks report a busy finding. Each names the part and the time, and busy says what ra was doing;
    • what the checks found before then is still reported;
    • the context closes, and the run goes on to the next look with exit code 1;
    • ra exits once its output is written, even when a step that ran out of time left a timer behind.
    • ra's own waits come on top of the timeout: up to 2.5 s for the page to settle and 3 s for its images. A page that never stops changing gets its usual note, not a busy finding. Each wait is held to the longest timer Node can set, so the largest timeout works too. Pictures are held to Playwright's limit for them plus 2 s: on playwright-core 1.58.2 a picture of a page that froze while it was taken never gave up, and the run hung ("The page stopped answering for 4s while ra took a picture of it").
    • Steps and --then code are now timed as a whole by timeout, so a long flow may need a larger timeout.
    • Browser test, at timeout: 2000: a step and an expect that never resolve; a step that waits 60 s, with the whole run under 30 s; a page that keeps changing, which gets the note; and a page whose script stops answering once ra has scrolled it, which keeps its no-name finding and gets "The page stopped answering for 4.5s while ra waited for it to settle"; and a phone view of a page that freezes once ra holds its hover rule for the pictures, which ends with one busy finding while the run goes on, on every playwright-core leg. A second test runs a look at timeout: 2147483647: it is clean, with no TimeoutOverflowWarning.
  • timeout must be a number above 0 and at most 2147483647. Anything else is a config error (exit 2). timeout: 0 used to end every look at once. Config messages show a wrong string, number or boolean as written, such as set to "false", and anything else by its kind, such as "a function". A view's message can no longer throw.

Repros, rerun with the built CLI

Case 0.1.1 0.1.2
Links under an open appearance menu covered: the menu covers 3 links clean
Skip link clipped to an empty rect under a sticky header (docs site) covered by the header clean
Result text scrolled out of a modal search dialog's frame contrast 3.3:1, measured on the backdrop clean
Heading above a dark download button, phone view contrast 1:1 (the picture was in the mouse layout) clean
Big decorative button with aria-hidden="true" tabindex="-1" no-name clean
Skip link clipped to an empty rect under a sticky header (marketing site) covered by the header clean
Faint word inside a role="img" product mockup contrast 1.9:1 clean
Word inside a line drawn at twice its size cut-off 72px right, 33px bottom clean
Chip label inside a role="img" mockup cut-off 5px clean

The planted cases fire on 0.1.1 too: 12 findings on tricky and 1 on dialog. On 0.1.2 both are clean. All nine repros are still clean on the reviewed build.

Review probes, rerun with the built CLI (main against this PR)

  • Pale heading under an absolutely positioned decorative SVG: main contrast 1.9:1; this PR the same (it was clean before review).
  • Pale text inside an absolutely positioned border frame: main contrast 1.9:1; this PR the same (was clean).
  • White text under a 65% white veil: main contrast 2.1:1 (#ffffff on #b2b2b2); this PR the same (was clean).
  • Pale text beside a clear full-screen role="dialog" wrapper round a small bar: main contrast 1.9:1 at desktop and phone; this PR the same (was clean).
  • Link under a fixed header whose role="menu" bar fills it (two probes): main covered by the header at desktop and phone; this PR the same (was clean).
  • Button under an in-flow role="listbox" that spills over it: main covered by the option "Business"; this PR the same (was clean).
  • Unnamed icon button inside aria-hidden="true" that Tab reaches: main no-name; this PR the same (was clean).
  • role="img" card with cut-off and pale text and nothing Tab reaches: main cut-off 47px and contrast 1.9:1; this PR clean, by design. The planted card in broken.html holds a link and is reported.
  • Pale text clipped by clip-path, plain and at scale(0.5): main contrast 1.9:1 on both lines; this PR the same (the scaled line was dropped).
  • timeout: 0: main clean, exit 0 (0 meant no limit there); this PR the config error "The timeout is 0; it takes milliseconds above 0 and up to 2147483647, such as 30000.", exit 2 (it was busy on every look).
  • timeout: 2000 with a page that keeps changing and a step that waits 20 s: main the note and a clean step, 21 s, exit 0; this PR the note (it was busy) and a steps finding, 6 s, exit 1 (it was 22 s).
  • timeout: 4000 with a page whose script spins from 300 ms after load: main reports it clean and then never exits (stopped after 60 s); this PR busy "stopped answering for 6.5s while ra waited for it to settle", the same load finding as main for a page that spins before load, and exits in 8 s.
  • Second review: white text under an oklch() veil and under a color-mix(…, transparent) veil: main contrast 2.1:1 (#ffffff on #b2b2b2) at desktop and phone; this PR the same (it was clean at c7e22b4).
  • Second review: a fixed sidebar over a content link, holding its own aria-expanded="true" button: main covered by the aside; this PR the same (it was clean at c7e22b4).
  • Second review: role="img" mockups with pale text that Tab cannot enter (inert; a disabled button; an <a> without href): main contrast 1.9:1 on each; this PR clean, as pictures.
  • Second review: timeout: 2147483647: main clean; this PR clean, with no TimeoutOverflowWarning (it was busy and exit 1 at c7e22b4).
  • Second review: a page that spins once the viewport grows for the full picture: main and this PR both give only its no-name finding. The page is shorter than the screen, so the full picture never grows it. The phone-view fixture test above freezes a page while its touch layout is held, and the run goes on.

Checks

  • bun run check passes.
  • bun run test:browser passes locally, 27 of 27, and the unit tests 41 of 41.
  • Without the review's source fixes, the new broken.html test finds none of its 10 expected findings, and the timeout test's run takes 61 s, gets busy on the changing page and loses the late page's no-name. Without the second review's fixes, tricky gets two contrast findings from the mockups Tab cannot enter, broken misses the oklch, mixed and sidebar findings, and the look at the largest timeout is busy with a TimeoutOverflowWarning. Without the bound on pictures, the timeout test hung on playwright-core 1.58.2 until CI's 120 s limit, and 2 of 3 lone runs of the freezing page never ended; with it, 5 of 5 end in 7 to 11 s.
  • browser: Chromium 158.0.8127.18, playwright-core 1.65.0, Chrome for Testing from the Playwright cache

Known limits and not in this release

  • With scripts off, the scroll pass cannot wait between screens. Lazy images below the fold may not have loaded when the picture is taken.
  • Hit testing for covered text reaches only the first screen. Further down, only recognised popups count.
  • Touch views hold hover and pointer media in the page's own sheets only. matchMedia listeners, <picture> sources chosen by media and sheets inside iframes are not held yet (also true in 0.1.1). Planned for 0.1.3.
  • Not in this release: serving headers for app.static, so that a policy kept in a host's config could apply locally.

🤖 Generated with Claude Code

- covered and contrast leave alone what an open menu, listbox, dialog,
  popover or expanded panel lies over; broken.html's veil is still reported
- a skip link clipped to nothing by clip or clip-path is screen-reader text
  at any size
- touch views keep the measured layout in the full pictures, where Chromium
  would otherwise match a mouse while capturing beyond the viewport
- no-name leaves alone controls inside aria-hidden, as the outline does
- text inside role="img" skips the text checks
- cut-off measures a scaled box's clip in the text's coordinates
- contrast samples only the part of a line its scroller shows
- a state option javascript: false looks with scripts off; every check runs
- steps, --then, expect and ra's own checks are bounded by timeout; a part
  that runs out is reported, the context closes and the run goes on

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@0thernet 0thernet added the hold Held for the owner: agents and the PR sweep leave it alone label Nov 18, 2026
0thernet and others added 3 commits November 17, 2026 23:16
- contrast: a cover counts only when its background alpha times its
  opacity is 0.9 or more; a popup hides only where it paints a surface.
- A menu, listbox or dialog is open only when it is an open dialog,
  aria-modal, an open popover, positioned absolute or fixed, or the
  target of an expanded control.
- no-name: aria-hidden exempts only a control out of the tab order.
- role="img" text is exempt only when nothing in it is reachable by Tab.
- clip-path is measured against the element's own size.
- timeout must be above 0 and at most 2147483647 (a config error
  otherwise); config messages name a wrong value's type.
- The settle and image waits get their time on top of the timeout;
  findings are kept when the page stops answering later; busy says
  what ra was doing; ra exits once its output is written.
- broken.html plants a real defect beside every exemption.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- alphaOf reads the alpha after a slash in oklch(), oklab(), color() and
  what color-mix() resolves to, and paints anything else on a canvas, so
  a translucent veil in those syntaxes no longer counts as a cover.
- A panel that holds its own expanded control, such as a sidebar with
  the button that hides it, is not counted as opened over the page.
- A picture's text is read as text only when Tab reaches something in
  it: not a disabled control, an inert one, or a link without href.
- Every bounded wait is held to the longest timer Node can set, so the
  largest timeout works; handles are released without waiting.
- Config messages show a wrong string or number as written and anything
  else by its kind; a view's message can no longer throw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
On playwright-core 1.58.2 a picture of a page that froze while it was
taken never gave up after its timeout, so the look and the run hung. Each
picture is now held to Playwright's limit for it plus 2 s, and the frozen
page ends the look with a busy finding. The held test accepts either place
the freeze is caught, which depends on the playwright-core version.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@0thernet 0thernet removed the hold Held for the owner: agents and the PR sweep leave it alone label Nov 18, 2026
@0thernet
0thernet merged commit 07db636 into main Nov 18, 2026
9 checks passed
@0thernet
0thernet deleted the fixes-0.1.2 branch November 18, 2026 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant