Skip to content

Now playingFire PlaceHoliznaCC0 · CC0 1.0

Lighthouse is an analysis, not an autopilot

My projects used to fail CI on any Lighthouse or accessibility score below a threshold. Coding agents read a red check as a task and changed the design to fix it. Now the scores are an analysis I ask for, and fixes visitors would notice need my approval.

Published
Running time
3 min read
Category
Engineering
Tags
  • AI agents
  • Performance
  • Accessibility

When I started Orkide, the goal was 100 in all four Lighthouse categories on the home page, the blog index and a post, measured with the default mobile profile against the local build. Lighthouse CI asserted the budgets, and an axe-core suite checked every public page in both themes at four widths. The project rules asked for every change to be accessible and fast.

What went wrong

I build these projects with coding agents, and to an agent a failing check is a task. When a score dropped below its threshold, the agent optimised on its own, and some of those changes were ones visitors could see.

On AbanTCon'27 it broke the design. While the scores were being chased, the WebGL scene behind the congress figures stopped working and the pink heading colour was darkened. No check noticed: headless Chromium renders WebGL in software and the test runs kept the scenes off, so Lighthouse measured a page that could not show whether the scene looked right.

Some findings were not real problems at all:

  • A panel below the fold failed contrast at 1.01:1 because the scanner did not scroll and caught it mid-fade, still at opacity: 0.001.

  • content-visibility: auto made axe compare text against the wrong background.

And some lost points are deliberate. Orkide's SEO score sits at 92 because Lighthouse's robots-txt audit does not recognise the Content-Signal directive, which is where the site states its policy on AI use.

What changed

The decision is recorded in each project's decision log:

  • CI no longer runs Lighthouse, and the end-to-end suite skips axe. pnpm lighthouse and pnpm test:a11y run them on request.

  • After building a feature, the agent may offer an analysis, and runs it only when I agree.

  • Every run is saved to the project's docs/analysis.md with the date, the commit, the scores and the findings.

  • Fixes need my go-ahead. A fix that changes what visitors see (layout, colour, type, motion, copy or imagery) needs approval for that specific change.

  • lighthouserc.json keeps its thresholds as the reference an analysis reports against, and the size budgets for client JavaScript still run in CI.

The cost is written into the decision too: regressions in accessibility or speed are no longer caught automatically. They surface when an analysis runs.

What the analyses still find

They still find real problems. One axe run on Orkide reported 72 failures, and 64 of them were a single finding: a two-position switch made of two links, each with a 22 × 20 px hit area, under WCAG 2.2's 24 px minimum, repeated on every page at every width. Another run found the header overflowing at 768 px. That fix was made and logged in docs/analysis.md together with what it changes on screen, so it can be reverted if I disagree with it.

End of side A

See the whole rack