Repository navigation
Fix seven false positives, add scripts off and look timeouts (0.1.2) - #3
Merged
Merged
Conversation
- 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]>
- 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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.htmlor a new fixture state, plus a browser test. After review, each exemption is narrowed so that it leaves alone only what it must:broken.htmlnow plants a real defect beside every one of them.Fixes
coveredandcontrastunder an open popup. An open menu, listbox, dialog, popover, or the panel anaria-expanded="true"control opened was judged like any overlay.<dialog>, hasaria-modal="true", is an open popover, is positioned absolute or fixed, or is what anaria-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.coveredleaves alone controls under such a popup.contrastskips 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 whatcolor-mix()resolves to. Anything else is painted on a canvas and read back.broken.html: pale text under a decorative SVG, inside a border frame, under a 65% veil written asrgb(), asoklch()and ascolor-mix(), and beside a clearrole="dialog"wrapper; a link under an in-flowrole="menu"bar; a button under an in-flowrole="listbox"; a link under a sidebar that holds its ownaria-expanded="true"button.clip: rect(0 0 0 0)therefore counted as visible.clip, or aclip-path(inset,circle,ellipse) that leaves nothing, now hides text at any size.no-nameon a control insidearia-hidden. The name check now leaves out a control insidearia-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 insidearia-hiddenthat Tab reaches.role="img".contrast,cut-off,spillandoverlapnow 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 withouthrefare not reached. Planted defect: arole="img"card holding a cut-off link and pale text. Planted clean intricky.html: an inert mockup with a button, and a mockup with a disabled button and a bare<a>.cut-offinside 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.contraston 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. Aclip-pathis measured against the element's own size, so a scaled line that the clip shows in part is still measured. Planted defect: pale text atscale(0.5)withclip-path: inset(0 120px 0 0).New
javascript: falseon a state. The look's browser context runs with JavaScript disabled, and every check still runs.<noscript>content is read as text.live.noscript.--thencode,expectand ra's own in-page work are bounded by the project'stimeout(30 s by default). When the time runs out:--thenreport astepsfinding,expectreports anexpectfinding, and the page or ra's checks report abusyfinding. Each names the part and the time, andbusysays what ra was doing;busyfinding. 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").--thencode are now timed as a whole bytimeout, so a long flow may need a largertimeout.timeout: 2000: a step and anexpectthat 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 itsno-namefinding 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 onebusyfinding while the run goes on, on every playwright-core leg. A second test runs a look attimeout: 2147483647: it is clean, with noTimeoutOverflowWarning.timeoutmust be a number above 0 and at most 2147483647. Anything else is a config error (exit 2).timeout: 0used to end every look at once. Config messages show a wrong string, number or boolean as written, such asset 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
covered: the menu covers 3 linkscoveredby the headercontrast3.3:1, measured on the backdropcontrast1:1 (the picture was in the mouse layout)aria-hidden="true" tabindex="-1"no-namecoveredby the headerrole="img"product mockupcontrast1.9:1cut-off72px right, 33px bottomrole="img"mockupcut-off5pxThe planted cases fire on 0.1.1 too: 12 findings on
trickyand 1 ondialog. 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)
contrast1.9:1; this PR the same (it was clean before review).contrast1.9:1; this PR the same (was clean).contrast2.1:1 (#ffffff on #b2b2b2); this PR the same (was clean).role="dialog"wrapper round a small bar: maincontrast1.9:1 at desktop and phone; this PR the same (was clean).role="menu"bar fills it (two probes): maincoveredby the header at desktop and phone; this PR the same (was clean).role="listbox"that spills over it: maincoveredby the option "Business"; this PR the same (was clean).aria-hidden="true"that Tab reaches: mainno-name; this PR the same (was clean).role="img"card with cut-off and pale text and nothing Tab reaches: maincut-off47px andcontrast1.9:1; this PR clean, by design. The planted card inbroken.htmlholds a link and is reported.clip-path, plain and atscale(0.5): maincontrast1.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 wasbusyon every look).timeout: 2000with 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 wasbusy) and astepsfinding, 6 s, exit 1 (it was 22 s).timeout: 4000with a page whose script spins from 300 ms after load: main reports it clean and then never exits (stopped after 60 s); this PRbusy"stopped answering for 6.5s while ra waited for it to settle", the sameloadfinding as main for a page that spins before load, and exits in 8 s.oklch()veil and under acolor-mix(…, transparent)veil: maincontrast2.1:1 (#ffffff on #b2b2b2) at desktop and phone; this PR the same (it was clean at c7e22b4).aria-expanded="true"button: maincoveredby the aside; this PR the same (it was clean at c7e22b4).role="img"mockups with pale text that Tab cannot enter (inert; a disabled button; an<a>withouthref): maincontrast1.9:1 on each; this PR clean, as pictures.timeout: 2147483647: main clean; this PR clean, with noTimeoutOverflowWarning(it wasbusyand exit 1 at c7e22b4).no-namefinding. 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 checkpasses.bun run test:browserpasses locally, 27 of 27, and the unit tests 41 of 41.broken.htmltest finds none of its 10 expected findings, and the timeout test's run takes 61 s, getsbusyon the changing page and loses the late page'sno-name. Without the second review's fixes,trickygets twocontrastfindings from the mockups Tab cannot enter,brokenmisses the oklch, mixed and sidebar findings, and the look at the largest timeout isbusywith aTimeoutOverflowWarning. 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.Known limits and not in this release
matchMedialisteners,<picture>sources chosen by media and sheets inside iframes are not held yet (also true in 0.1.1). Planned for 0.1.3.app.static, so that a policy kept in a host's config could apply locally.🤖 Generated with Claude Code