Skip to content

0.1.4: dialogs that shut the page out, kept spaces, and the tab icon - #5

Merged
0thernet merged 1 commit into
mainfrom
fix/inert-modals-hanging-spaces-favicon
Nov 18, 2026
Merged

0thernet merged 1 commit into
mainfrom
fix/inert-modals-hanging-spaces-favicon

Conversation

@0thernet

Copy link
Copy Markdown
Member

Three false alarms, each found on a real page. Each one is now planted in the fixtures, and each reproduced on the 0.1.3 code before the fix.

1. Text behind a dialog that shuts the page out without aria-modal

Some component libraries leave aria-modal off for Safari's sake. React Aria is one. Instead they make the rest of the page inert; others use aria-hidden="true". ra only recognised showModal() and aria-modal, so it judged the page under the scrim and reported the dimmed text's contrast.

Now, while a visible dialog is open, ra checks the siblings of the dialog and of each of its ancestors. If one of them is shut out (inert or aria-hidden) and covers at least a quarter of the screen, what is shut out is left alone. What stays open, such as a toast, is still judged.

  • Fixture: inert-dialog.html. 0.1.3 gave 7 contrast findings at desktop; there are none now, at every view.
  • Counter-cases:
    • The same page with the page left live is judged again. A new browser test covers this.
    • Pale aria-hidden text beside the cookie dialog in broken.html is still reported. It is too small to be the page that the dialog shuts out.

2. Kept spaces that hang past a wrapped line

With white-space: pre-wrap, the spaces at the end of a wrapped line hang past it. They take room in the line's boxes but draw nothing, and ra counted them as spill and cut-off. That was 38px in the fixture, and 3.4px on the page where it was found.

Where text keeps its spaces and a line crosses an edge, ra now measures the line from its first letter to its last.

  • Fixture: two notes in tricky.html, one in a box with a surface and one in a box that hides its overflow.
  • Counter-case: in broken.html, a word too long for a kept-space box still spills and is still cut off.

3. The tab icon counted as the page loading

The browser fetches a page's icon for itself, at low priority, once the page has loaded. A slow answer held up the settle wait and was reported as busy. CI showed The page was still loading after 5s: GET /favicon.svg at a view with live motion.

ra no longer waits for a request whose address is the document's <link rel="icon">, or /favicon.ico when the page names no icon. Whatever the request answers is still judged, so a missing icon is still reported.

  • Fixture: icon.html, with a reply that never comes. 0.1.3 reported busy after 13s; the look is clean in 1s now.

Also

  • docs/findings.md says what is left alone for each of the three.
  • The version is 0.1.4. The README's install line points at it.

Checks

  • bun run check: 42 unit tests and the build pass, and ra --version prints 0.1.4.
  • bun run test:browser: 38 of 38 pass on Chromium 158.0.8127.18 with playwright-core 1.65.0.

🤖 Generated with Claude Code

Three false alarms found on real pages, each now planted in the fixtures:

- A dialog without aria-modal, over a page its library made inert (or
  aria-hidden) under a scrim: the dimmed page was judged for contrast.
  What such a dialog shuts out is now left alone; a toast is still judged.
- Spaces kept as typed (pre-wrap) that hang past a wrapped line counted
  as spill and cut-off. Past an edge, only a line's letters count now.
- The browser's own fetch of the tab's icon held the settle wait and was
  reported as busy. ra no longer waits for it; its answer is still judged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@0thernet
0thernet enabled auto-merge (squash) November 18, 2026 19:59
@0thernet
0thernet merged commit a59c91c into main Nov 18, 2026
9 checks passed
@0thernet
0thernet deleted the fix/inert-modals-hanging-spaces-favicon branch November 18, 2026 20:02
0thernet added a commit to hraness/stripe-history that referenced this pull request Nov 19, 2026
Moves ra from 0.1.3 to
[0.1.6](https://github.com/hraness/ra/releases/tag/v0.1.6), the latest
release. Between them:

- 0.1.4 ([ra #5](hraness/ra#5)) leaves alone
text behind a dialog that makes the rest of the page `inert` or
`aria-hidden`, measures a wrapped line that keeps its spaces from its
first letter to its last, and no longer waits for the tab icon.
- 0.1.5 ([ra #6](hraness/ra#6)) gives a request
that starts late as long to finish as the first ones had.
- 0.1.6 ([ra #11](hraness/ra#11)) prints the
first ten texts of a colour used in many places and counts the rest. The
release's other changes are to ra's README.

- `package.json` points at the v0.1.6 release asset. `bun.lock` holds
its sha512, which matches the asset `gh release verify-asset v0.1.6
hraness-ra-0.1.6.tgz -R hraness/ra` verified.
- ra declares the same peer dependency as 0.1.3 (playwright-core ≥ 1.58)
and has no dependencies of its own, so nothing else in the lockfile
changed.

Local checks on this head:
- `bun run check` passed (the cost surfaces, the typecheck, lint and 402
tests), and so did `bun run build`.
- `bun run ra check` passed: 15 states, 72 looks in 92 s, with 21 notes;
Chromium 151.0.7922.34 (Chrome for Testing, playwright-core 1.62.0).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
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