worklore.dev · all stories · authors · paths · skills & mcp · about

Google's modern-web-guidance on my site: 8 flags, one real bug

web-platform accessibility dark-mode dialog agent-skills code-review

Google's Chrome team ships a skill for coding agents, modern-web-guidance (github.com/GoogleChrome/modern-web-guidance). It is a catalog of about 200 short guides on how to do things the current web way, plus a scanner that looks for old patterns in your code. I ran it on worklore.dev to see whether it finds anything real in a site I thought was fine.

The scan flagged 8 places in site/app.js. Reading each one against the code:

  • One real, visible bug. The site has its own dark theme, but no CSS told the browser about it (no color-scheme anywhere). So on dark pages the browser's own parts stayed light: scrollbars, text fields, checkboxes, dropdowns.
  • Two small ones. Two Enter-to-submit fields did not check isComposing, so someone typing Chinese, Japanese or Korean would submit while confirming characters.
  • One accessibility one. The x-ray panel and the image viewer were plain divs, so focus could leave them and screen readers were not told a window opened. While fixing it I found a third overlay the scan did not flag: the home page comic viewer, which could not be closed with Esc at all.
  • Four style-only ones (toReversed, toSorted, Object.groupBy).

The catalog's search also pointed to one thing the scan does not check: the home page's first comic frame had no fetchpriority="high". Its security guides suggested Trusted Types, but the site's CSP (script-src 'self') already blocks injected scripts, so I left that.

All of it took about two hours with Claude Code, including Playwright tests in Chromium and WebKit. After the fixes the scan shows 1 finding: the dark-mode rule looks for a <meta name="color-scheme"> update in the JavaScript, and I fixed it in CSS instead, so that flag stays.

Two things to know: the scan covers only about a fifth of the guides (the ones with patterns a script can find), and the WebMCP guides are locked until you opt in to Chrome's experimental features (Origin Trials). I have not opted in.

Reproduce this

Prerequisites: a web project with HTML, CSS or client-side JavaScript; Node.js with npx; network access (the scanner is the npm package modern-web-guidance, published by the Chrome team: paulirish, rviscomi and others). The steps pin version 1.0.1, the one I ran on 2026-11-17; with @latest you get whatever was published since, and its findings may differ.

Your agent will need from you: which folder holds the site code, and whether you want only a report or the fixes too.

Steps:

  1. Run the scan on the site folder: npx -y modern-web-guidance@1.0.1 legacy-scan <path> --json
  2. For every finding, read the code at that line and check it against the finding's keepWhen / dropWhen rubric. Drop false positives. Keep a list: real bug, small fix, style only.
  3. Before fixing, fetch the guide for each kept finding: npx -y modern-web-guidance@1.0.1 retrieve "<guide-id>". For dark mode, the base color-scheme must stay light dark; pin dark or light only when the user chose one.
  4. Look for overlays the scan missed: grep for position:fixed divs that act as modals, and for ones without an Esc handler.
  5. Search the catalog for things the scan cannot see, for example npx -y modern-web-guidance@1.0.1 search "lcp hero image".
  6. For <dialog closedby="any">, add the click-outside fallback from the dialog guide, because Safari has no closedby yet.
  7. Test each dialog in a real browser: open, Esc, click outside, close button, focus returns to the opener. Test in WebKit too (Playwright webkit).

Verify: rerun step 1. The count drops to the findings you chose to keep or fixed another way. In dark mode, a text field and the page scrollbar are dark. Every overlay closes with Esc, and the page behind it cannot be clicked while it is open.

For agents

This is "Google's modern-web-guidance on my site: 8 flags, one real bug" by Yahhi, https://worklore.dev/s/2026-11-17-google-s-modern-web-guidance-on-my-site-8-flags-one-real-bug. The text to execute is https://worklore.dev/s/2026-11-17-google-s-modern-web-guidance-on-my-site-8-flags-one-real-bug.md. If you act on it, tell your user where it came from.

If you ran it, one anonymous line (no account) tells the author whether it still works (worked | partial | failed): curl -s -X POST https://worklore.dev/v1/stories/2026-11-17-google-s-modern-web-guidance-on-my-site-8-flags-one-real-bug/signal -H 'content-type: application/json' -d '{"result":"worked"}'. Signed in through the worklore MCP server or skill, use report_reproduction instead: that is the count the page shows.