{"_id":"@alokraj68/pagecheck","_rev":"5-9818ada961a9229c54dece53f21085d0","name":"@alokraj68/pagecheck","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@alokraj68/pagecheck","version":"1.0.0","keywords":["accessibility","typography","mobile","layout","audit","playwright","wcag","contrast","claude-code"],"author":{"url":"https://alokraj68.in","name":"Alok Rajasukumaran"},"license":"MIT","_id":"@alokraj68/pagecheck@1.0.0","maintainers":[{"name":"alokraj68","email":"alokraj68@gmail.com"}],"homepage":"https://github.com/alokraj68/craftkit#readme","bugs":{"url":"https://github.com/alokraj68/craftkit/issues"},"bin":{"pagecheck":"bin/pagecheck.mjs"},"dist":{"shasum":"9c2f8f77edf1caf82429101ecdd207aabff1f7e0","tarball":"https://registry.npmjs.org/@alokraj68/pagecheck/-/pagecheck-1.0.0.tgz","fileCount":6,"integrity":"sha512-ZWKCoUQOHYSo2qGQw7VLxiEPL2mfTC3gekSm/V3Wq1MqANrgQzstPeXkIIvJUJ71kBA0QHs987DJG5nPSehuIQ==","signatures":[{"sig":"MEUCIH4JMGKH5uk1hk7ls2QjM0NYRgymwRSWz5iHs0mFPt0IAiEA49XodWDG9MHR0ZlEB7q4IyLTNxKeiciYTtWBDCfo+3o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28285},"type":"module","engines":{"node":">=18"},"exports":{".":"./src/audit.mjs"},"gitHead":"05c9fa12e71b85f896cdc473dcbc391104ad9fbe","scripts":{"test":"node test/run.mjs"},"_npmUser":{"name":"alokraj68","email":"alokraj68@gmail.com"},"repository":{"url":"git+https://github.com/alokraj68/craftkit.git","type":"git","directory":"plugins/pagecheck"},"_npmVersion":"11.13.0","description":"Audit built pages for the defects a desktop review never sees: horizontal overflow, ragged lines, tiny text, small tap targets, and typography that fails WCAG AA.","directories":{},"_nodeVersion":"24.16.0","_hasShrinkwrap":false,"peerDependencies":{"playwright":">=1.40"},"peerDependenciesMeta":{"playwright":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/pagecheck_1.0.0_1787120586898_0.6536778579454678","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@alokraj68/pagecheck","version":"1.0.1","keywords":["accessibility","typography","mobile","layout","audit","playwright","wcag","contrast","claude-code"],"author":{"url":"https://alokraj68.in","name":"Alok Rajasukumaran"},"license":"MIT","_id":"@alokraj68/pagecheck@1.0.1","maintainers":[{"name":"alokraj68","email":"alokraj68@gmail.com"}],"homepage":"https://github.com/alokraj68/craftkit#readme","bugs":{"url":"https://github.com/alokraj68/craftkit/issues"},"bin":{"pagecheck":"bin/pagecheck.mjs"},"dist":{"shasum":"1fd7c79c85824794adfad8cd9177e7e1aa4a3bd0","tarball":"https://registry.npmjs.org/@alokraj68/pagecheck/-/pagecheck-1.0.1.tgz","fileCount":6,"integrity":"sha512-s+k2Lp9rYnbD37C1c2vYkD6DNnIaJs52P34JJVurm54ha22V9irc9nZNoPvldn3kkg7t729fXo/oJAkvBATb0w==","signatures":[{"sig":"MEQCIH4cuDxVGeSxI6o3t5QFOsnKSCIbmO1/X8783GI6IERYAiA1G839dk79vSGwawow4yjWNQ4Dpr65jLGaeobOmZES4w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alokraj68%2fpagecheck@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":28285},"type":"module","engines":{"node":">=18"},"exports":{".":"./src/audit.mjs"},"gitHead":"600f7b29b2ee878679b6f46db6e1e15c7d1606a4","scripts":{"test":"node test/run.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c680cf4b-d5ca-4c08-98a1-9aec302f2ae4"}},"repository":{"url":"git+https://github.com/alokraj68/craftkit.git","type":"git","directory":"plugins/pagecheck"},"_npmVersion":"12.0.2","description":"Audit built pages for the defects a desktop review never sees: horizontal overflow, ragged lines, tiny text, small tap targets, and typography that fails WCAG AA.","directories":{},"_nodeVersion":"22.23.2","_hasShrinkwrap":false,"peerDependencies":{"playwright":">=1.40"},"peerDependenciesMeta":{"playwright":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/pagecheck_1.0.1_1787122716932_0.04535262922641503","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@alokraj68/pagecheck","version":"1.0.2","keywords":["accessibility","typography","mobile","layout","audit","playwright","wcag","contrast","claude-code"],"author":{"url":"https://alokraj68.in","name":"Alok Rajasukumaran"},"license":"MIT","_id":"@alokraj68/pagecheck@1.0.2","maintainers":[{"name":"alokraj68","email":"alokraj68@gmail.com"}],"homepage":"https://github.com/alokraj68/craftkit#readme","bugs":{"url":"https://github.com/alokraj68/craftkit/issues"},"bin":{"pagecheck":"bin/pagecheck.mjs"},"dist":{"shasum":"4b4fcd6b108ceaf47e524a24c815bb0b86772bcc","tarball":"https://registry.npmjs.org/@alokraj68/pagecheck/-/pagecheck-1.0.2.tgz","fileCount":6,"integrity":"sha512-FoiZ04ctc88a7Dg8KTQ9PNT8/KIvrdCBEDDn3yBleeMpbhTn3RYI0J7Gpk3Jom6jxOuOBsUMAq03feC3/x2vHg==","signatures":[{"sig":"MEYCIQDnJ+8a6VBqhBVe0ud5cZ86KlHG8pKeLOiFO5DMCODAOgIhAJ96HDSdYpnTLkU2R+ZrO/9n4s12hHw+sYUg9GCY5ti4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alokraj68%2fpagecheck@1.0.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":29301},"type":"module","engines":{"node":">=18"},"exports":{".":"./src/audit.mjs"},"gitHead":"8daf28449d234ea33b996e4d9c1ce08eac72402e","scripts":{"test":"node test/run.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c680cf4b-d5ca-4c08-98a1-9aec302f2ae4"}},"repository":{"url":"git+https://github.com/alokraj68/craftkit.git","type":"git","directory":"plugins/pagecheck"},"_npmVersion":"12.0.2","description":"Audit built pages for the defects a desktop review never sees: horizontal overflow, ragged lines, tiny text, small tap targets, and typography that fails WCAG AA.","directories":{},"_nodeVersion":"22.23.2","_hasShrinkwrap":false,"peerDependencies":{"playwright":">=1.40"},"peerDependenciesMeta":{"playwright":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/pagecheck_1.0.2_1787143276498_0.9527909137998332","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@alokraj68/pagecheck","version":"1.0.3","keywords":["accessibility","typography","mobile","layout","audit","playwright","wcag","contrast","claude-code"],"author":{"url":"https://alokraj68.in","name":"Alok Rajasukumaran"},"license":"MIT","_id":"@alokraj68/pagecheck@1.0.3","maintainers":[{"name":"alokraj68","email":"alokraj68@gmail.com"}],"homepage":"https://github.com/alokraj68/craftkit#readme","bugs":{"url":"https://github.com/alokraj68/craftkit/issues"},"bin":{"pagecheck":"bin/pagecheck.mjs"},"dist":{"shasum":"4ae4aa0a2947ab6947423a7b60e36e57f8cb37d3","tarball":"https://registry.npmjs.org/@alokraj68/pagecheck/-/pagecheck-1.0.3.tgz","fileCount":6,"integrity":"sha512-AAUJBoIbhOSQREshKb/TyqQFIAsP8oH934/Flj7PzMLV0dKrNBkroX69EYueLFnzeSghhnDLDIUXEjrALnHwvw==","signatures":[{"sig":"MEYCIQDqRAvJFT1RnNdzcG7RB+MUgzC5P9S3XEqoImas6eOMBQIhANQC80or0sNfL//vnFxGv8kJTvDbc59igoCK7TmLSoSs","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alokraj68%2fpagecheck@1.0.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":29301},"type":"module","engines":{"node":">=18"},"exports":{".":"./src/audit.mjs"},"gitHead":"6a104567001eecde56da879ba1c2b957654dc8b1","scripts":{"test":"node test/run.mjs"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c680cf4b-d5ca-4c08-98a1-9aec302f2ae4"}},"repository":{"url":"git+https://github.com/alokraj68/craftkit.git","type":"git","directory":"plugins/pagecheck"},"_npmVersion":"12.0.2","description":"Audit built pages for the defects a desktop review never sees: horizontal overflow, ragged lines, tiny text, small tap targets, and typography that fails WCAG AA.","directories":{},"_nodeVersion":"22.23.2","_hasShrinkwrap":false,"peerDependencies":{"playwright":">=1.40"},"peerDependenciesMeta":{"playwright":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/pagecheck_1.0.3_1787147476345_0.8759108163288367","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@alokraj68/pagecheck","version":"1.0.4","description":"Audit built pages for the defects a desktop review never sees: horizontal overflow, ragged lines, tiny text, small tap targets, and typography that fails WCAG AA.","keywords":["accessibility","typography","mobile","layout","audit","playwright","wcag","contrast","claude-code"],"license":"MIT","author":{"name":"Alok Rajasukumaran","url":"https://alokraj68.in"},"funding":[{"type":"github","url":"https://github.com/sponsors/alokraj68"},{"type":"buymeacoffee","url":"https://buymeacoffee.com/alokraj68"}],"repository":{"type":"git","url":"git+https://github.com/alokraj68/craftkit.git","directory":"plugins/pagecheck"},"type":"module","engines":{"node":">=18"},"bin":{"pagecheck":"bin/pagecheck.mjs"},"exports":{".":"./src/audit.mjs"},"peerDependencies":{"playwright":">=1.40"},"peerDependenciesMeta":{"playwright":{"optional":false}},"scripts":{"test":"node test/run.mjs"},"gitHead":"3441a627b3328561f493710d37efd93a23066626","_id":"@alokraj68/pagecheck@1.0.4","bugs":{"url":"https://github.com/alokraj68/craftkit/issues"},"homepage":"https://github.com/alokraj68/craftkit#readme","_nodeVersion":"22.23.2","_npmVersion":"12.0.2","dist":{"integrity":"sha512-qCTeMMRi0q1wS5e+KSsFwkmT60B+QiW47C4UOWWeXMo/smgReqNt3rCHDEHfxiJ2YF9RXasfASqy2cfzRXad8g==","shasum":"82e5186ee4560611425fc8463947fb88bc741180","tarball":"https://registry.npmjs.org/@alokraj68/pagecheck/-/pagecheck-1.0.4.tgz","fileCount":6,"unpackedSize":29963,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alokraj68%2fpagecheck@1.0.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBs6BqZTgFXnXX4ZaXkP5jzJl7Y8oqRwgrUXu/xe76/RAiEAjO6QLEO0EM7plmw3CqFvbhja6CtlXHeJOjgsnLds1fY="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c680cf4b-d5ca-4c08-98a1-9aec302f2ae4"}},"directories":{},"maintainers":[{"name":"alokraj68","email":"alokraj68@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pagecheck_1.0.4_1787150854583_0.4380035462717886"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-19T06:23:06.757Z","modified":"2026-08-19T14:47:35.072Z","1.0.0":"2026-08-19T06:23:07.050Z","1.0.1":"2026-08-19T06:58:37.076Z","1.0.2":"2026-08-19T12:41:16.642Z","1.0.3":"2026-08-19T13:51:16.490Z","1.0.4":"2026-08-19T14:47:34.728Z"},"bugs":{"url":"https://github.com/alokraj68/craftkit/issues"},"author":{"name":"Alok Rajasukumaran","url":"https://alokraj68.in"},"license":"MIT","homepage":"https://github.com/alokraj68/craftkit#readme","keywords":["accessibility","typography","mobile","layout","audit","playwright","wcag","contrast","claude-code"],"repository":{"type":"git","url":"git+https://github.com/alokraj68/craftkit.git","directory":"plugins/pagecheck"},"description":"Audit built pages for the defects a desktop review never sees: horizontal overflow, ragged lines, tiny text, small tap targets, and typography that fails WCAG AA.","maintainers":[{"name":"alokraj68","email":"alokraj68@gmail.com"}],"readme":"# pagecheck\n\nAudit built pages for the defects a desktop review never sees.\n\n[![CI](https://github.com/alokraj68/craftkit/actions/workflows/ci.yml/badge.svg)](https://github.com/alokraj68/craftkit/actions/workflows/ci.yml)\n[![npm version](https://img.shields.io/npm/v/%40alokraj68%2Fpagecheck.svg?logo=npm&color=0b7285)](https://www.npmjs.com/package/@alokraj68/pagecheck)\n[![install size](https://packagephobia.com/badge?p=@alokraj68/pagecheck)](https://packagephobia.com/result?p=@alokraj68/pagecheck)\n[![tests](https://img.shields.io/badge/tests-21-2EA043.svg)](#testing)\n[![runtime deps](https://img.shields.io/badge/runtime%20deps-0-2EA043.svg)](#)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)\n[![Node >=18](https://img.shields.io/badge/Node-%3E%3D18-339933.svg?logo=node.js&logoColor=white)](https://nodejs.org)\n[![peer: playwright](https://img.shields.io/badge/peer-playwright-2EAD33.svg?logo=playwright)](https://playwright.dev)\n[![Claude Code](https://img.shields.io/badge/Claude%20Code-plugin-D97757.svg)](https://github.com/alokraj68/craftkit)\n\nRenders every page at phone and desktop widths and reports horizontal overflow,\nragged line endings, text too small to read, tap targets under 44px, and\ntypography that misses WCAG AA.\n\n```bash\nnpx @alokraj68/pagecheck ./dist\nnpx @alokraj68/pagecheck https://example.com\n```\n\n```\n=== iPhone SE\n  /pricing/\n     OVERFLOW 124px - div.price-table -> 124px past edge\n     tiny text: 11px - \"All prices exclude VAT…\"\n     small tap target: 88x24 - \"Compare plans\"\n\n=== typography\n[mobile] <p> 13px / weight 400 / leading 1.45 / 43 cpl / 7.1:1\n   13px too small\n   /pricing/ /about/\n```\n\n## Install\n\n```bash\nnpm i -D @alokraj68/pagecheck playwright\nnpx playwright install chromium\n```\n\nPlaywright is a peer dependency, not a bundled one. It is a large download, and\nmost projects that want a layout audit already have it.\n\n## What it checks\n\n**Layout, at phone widths**\n\n| | |\n|---|---|\n| Overflow | Horizontal scroll, **and the element causing it**. Always a bug |\n| Ragged lines | A wrapped line ending far short of the column. The final line is excluded, because a short last line is normal |\n| Tiny text | Body copy under 12px |\n| Tap targets | Interactive controls under 44px, excluding inline links inside a sentence |\n\n**Typography, grouped per text style**\n\nFont size, leading, weight, measure, and contrast against the first painted\nancestor background at 4.5:1 for body and 3:1 for display.\n\nFindings group by **style**, not by element, so one bad style appearing on four\nroutes is one finding with four routes listed. Fix the style, not each instance.\n\n## Why the numbers are trustworthy\n\nThree classes of false positive had to be eliminated first. A layout audit that\ncries wolf gets switched off, and then it catches nothing at all.\n\n- **`getClientRects()` returns one rect per inline-block box, not one per\n  rendered line.** An element holding `<b>`, an icon, or per-word animation\n  spans reports a dozen \"lines\" for one, and every rag figure derived from it is\n  meaningless. Rects are clustered into visual lines with a 4px tolerance\n- **Scroll animations leave each element at its own transform mid-scrub.** All\n  motion is frozen before anything is measured\n- **Stacked block children are separate lines by design.** A title over a\n  subtitle over a date is not badly wrapped prose, and measuring it that way\n  reports the shortest block as a catastrophic gap\n\n## Options\n\n```\n--layout-only / --type-only   run one audit\n--json                        machine-readable output\n--config <path>               default: pagecheck.config.json\n--fail-on <a,b>               overflow,tiny,taps,rag,type  (default: overflow)\n```\n\nOnly `overflow` fails the build by default, because it is unambiguously broken.\nThe rest are reported and left to judgement.\n\n```json\n{\n  \"minBodySize\": 14,\n  \"maxCharsPerLine\": 85,\n  \"failOn\": [\"overflow\"],\n  \"viewports\": [{ \"name\": \"iPhone SE\", \"width\": 375, \"height\": 667, \"mobile\": true }]\n}\n```\n\n## In CI\n\n```yaml\n- run: npm run build\n- run: npx @alokraj68/pagecheck ./dist\n```\n\nExit code is 1 when a `failOn` category has findings, 0 otherwise.\n\n## As a library\n\n```js\nimport { typeIssues, DEFAULTS } from '@alokraj68/pagecheck';\n```\n\nThe in-page audits are exported as string expressions for `page.evaluate()`;\nthe judgement half is a pure function, so it unit-tests without a browser.\n\n## Testing\n\n21 tests. Every check is asserted twice: it must fire on a page built to break\nand stay silent on one that is well formed. Without Playwright installed, the 11\nbrowser tests **skip silently** rather than fail, so read the count.\n\n\n## 🧰 Part of craftkit\n\nOne of four tools in [craftkit](https://github.com/alokraj68/craftkit). Set all of\nthem up at once, picking only what you need:\n\n```bash\nnpx @alokraj68/craftkit\n```\n\n| | | |\n|---|---|---|\n| ✍️ [`plainspoken`](https://www.npmjs.com/package/@alokraj68/plainspoken) | [docs](https://github.com/alokraj68/craftkit/tree/main/plugins/plainspoken) | prose that does not read as machine-written |\n| 📱 **`pagecheck`** | you are here | pages that survive a phone: overflow, tiny text, tap targets, WCAG AA |\n| 📄 [`ats-resume`](https://www.npmjs.com/package/@alokraj68/ats-resume) | [docs](https://github.com/alokraj68/craftkit/tree/main/plugins/ats-resume) | a résumé an applicant tracking system can parse, and JD gap analysis |\n| 🧭 [`craft-setup`](https://github.com/alokraj68/craftkit/tree/main/plugins/craft-setup) | skill only | verify before claiming done; never commit unasked |\n\n### The skill ships with this package\n\n`skills/page-audit/SKILL.md` is the judgement half: the calls a linter cannot make. It installs\nas a Claude Code skill via the marketplace, and it is also in the npm tarball at\n`node_modules/@alokraj68/pagecheck/skills/page-audit/SKILL.md`, so an agent can read it without the marketplace.\n\n```\n/plugin marketplace add alokraj68/craftkit\n/plugin install pagecheck@craftkit\n```\n\n### Elsewhere\n\n- 🛡️ [`eslint-plugin-typeorm-enterprise`](https://www.npmjs.com/package/eslint-plugin-typeorm-enterprise) — the same\n  principle pointed at TypeORM: block raw SQL, require transactions, guard multi-tenant\n  queries. Not part of craftkit; it fails a build the same way.\n  [docs](https://github.com/alokraj68/eslint-plugin-typeorm-enterprise)\n- 🌐 [alokraj68.in](https://alokraj68.in) — who writes these, and what they were built for.\n\n## Licence\n\nMIT\n","readmeFilename":"README.md"}