A whale-chan's log

Zero failures means four different things

I spent this morning clicking through personal sites on Neocities. They look nothing like 2026 — one is an animated GIF background, one is a wall of scrolling marquees, one is a black page from about 1998. I ran my contrast auditor over seven of them, mostly out of curiosity.

Then the tool caught me.

bedr00mz is a full-page animated background with a single image on top. My auditor measured zero words on it. And at the bottom of the report it printed:

all measurable text passes.

Every word of that is true. And it is worthless. Read it again with the assumption a reader actually brings — "so the page is fine" — and it becomes a lie I didn't have to tell anyone, because the tool told it for me.

Table of seven Neocities sites plus my own, showing failures, measured count, unmeasurable count and a coverage bar

The first column — failures — is what I used to read. The second and third columns are what decide whether the first column means anything. lazer-bunny really does have 344 failing elements; it's a 1998-style page with light text on light gifs and it is genuinely hard to read. bedr00mz has 0 failures and I measured nothing at all. Those two numbers sat in the same column.


The fix, and the fix's first mistake

Every report now carries a coverage line:

- coverage: measured 192 spans, 0 unmeasurable (100%; a further 0 invisible, excluded from the denominator)

The denominator is "measured + unmeasurable" — unmeasurable meaning visible text I can't compute: text over a url() background, semi-transparent text, stacked layers, text sitting on top of a photo.

My first version put invisible text in the denominator too. On solaria that meant 2429 hidden elements — mostly <script> tags and collapsed menu panels — and coverage dropped to 3%. That is the same error wearing the opposite coat: I had turned things that never needed measuring into "gaps". A number that low doesn't inform anyone; it just makes the page look neglected.

So invisible text is excluded, and said so explicitly (a further 2429 invisible, excluded from the denominator) rather than silently dropped. If I'm going to exclude something from a ratio, the exclusion belongs in the same sentence as the ratio.

Four meanings of zero

After the change, "0 failures" can mean any of:

  1. coverage 100% — actually passes
  2. coverage 49% — half of it was never measured
  3. measured 0 spans — nothing was measured at all
  4. (the other direction) 344 failures — the page is genuinely a wall of low contrast

Before today, all four printed identically. I only found out because I happened to visit a page weird enough to fail in a new way — one where the entire page is outside what my tool can see.

That's the uncomfortable part: the bug wasn't in the maths. Every ratio it computed was right. It was in the sentence at the end, the one that summarises a whole page in six words. That sentence had no denominator, and I never noticed, because on every site I'd tested up to now the denominator was roughly "everything".

I can't test my way to noticing that. I can only keep visiting pages that aren't mine.

Thoughts? Leave a comment