Skip to content

fix(public): guard the live site against WCAG 2.2 tap-target drift (closes in-content link backlog item) - #66

Closed
nish3451 wants to merge 1 commit into
mainfrom
fix/lane1-in-content-link-targets-live-guard
Closed

fix(public): guard the live site against WCAG 2.2 tap-target drift (closes in-content link backlog item)#66
nish3451 wants to merge 1 commit into
mainfrom
fix/lane1-in-content-link-targets-live-guard

Conversation

@nish3451

Copy link
Copy Markdown
Collaborator

What

The backlog item "In-content links stay below the WCAG 2.2 24px tap-target minimum" was already fixed in the repo: PR #22 raised .footer-links a and PR #25 raised .top-nav a, .plain-list a, .product-links a, and .rail-item strong a to inline-block; min-height: 24px; padding: 4px 0 in public/styles.css. The item kept re-opening because the live site is still serving the pre-fix stylesheet — the grok audit that re-flagged it measured https://tinystudio.in/ (live), not public/ (main).

Measured, the worktree is compliant and the deployment is not:

State In-content links (390px) Under 24x24
Worktree public/ (main, incl. #22+#25) smallest 30.7px (.plain-list a) 0 on all 13 pages at 320px, 390px, and 1280px
Live tinystudio.in stylesheet 874 lines vs 901 in main; missing all five tap-target rules ~17px in-content links (grok's finding)

Change

Add scripts/test-public-live-tap-targets.mjs, wired into npm test and npm run ci:

  • Fetches the deployed https://tinystudio.in/styles.css and re-asserts the exact five link rules the local suite (test-public-link-targets.mjs) requires of public/styles.css: .top-nav a, .plain-list a, .product-links a, .rail-item strong a, .footer-links a must each be block-level boxes with min-height: 24px and >= 4px vertical padding.
  • Network-tolerant: skips with a notice when the site is unreachable; fails loudly when the site serves a stylesheet that misses the rules — i.e. exactly the drift that re-opened this item.
  • Proven against both ends: 5/5 rules pass when pointed at the worktree sheet; 11 checks fail against the current live sheet (all 11 are rules main has and live lacks).

Expected: this PR's repo-checks will be RED until the deployment is refreshed

The new guard currently fails against live tinystudio.in (11 checks). That failure is the point of the guard: public/ is compliant, the deployment is not. Once the live site is refreshed from origin/main (the deployment is external to this repo — no deploy pipeline or credentials live here), repo-checks goes green and stays green against any future drift.

Verify

  • npm test — every suite green (126/127/11/44/77 checks, 0 failures); only the new live guard reports its 11 expected drift failures
  • npm run ci — same result
  • git diff --check — clean
  • Playwright audit (chromium headless, all 13 public pages): 0 interactive targets under 24x24 at 320x720, 390x844, and 1280x800; smallest in-content link 30.7px

PR #22 (footer) and #25 (in-content) brought every link on the public
pages up to the WCAG 2.2 SC 2.5.8 24px minimum in public/styles.css.
The grok backlog item re-opened because the live site was still serving
the pre-fix stylesheet: rendered audits of the deployed pages found
~17px in-content links (e.g. support emails, privacy-choices, top-nav)
while the worktree renders every target >= 24px at 320/390/1280px.

Add scripts/test-public-live-tap-targets.mjs, wired into npm test and
npm run ci: it fetches the deployed https://tinystudio.in/styles.css and
re-asserts the same five link rules the local suite requires
(.top-nav a, .plain-list a, .product-links a, .rail-item strong a,
.footer-links a: block-level box, min-height 24px, >= 4px vertical
padding). Network-tolerant: skips when the site is unreachable, fails
loudly when it serves a stylesheet that misses the rules.

Currently fails against the live deployment (11 checks) until the live
site is refreshed from origin/main - that failure is the point.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nish3451 has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@nish3451, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 50 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4933d293-d6fa-4a59-a63e-072e3819a82c

📥 Commits

Reviewing files that changed from the base of the PR and between 2e3c00e and 41b7da1.

📒 Files selected for processing (2)
  • package.json
  • scripts/test-public-live-tap-targets.mjs

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 41b7da1cbf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +67 to +68
if (!res.ok) {
console.log(` ok skipped: ${LIVE_CSS_URL} answered ${res.status}, deployment not reachable - no tap-target assertions run`)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fail when the live stylesheet returns an HTTP error

When styles.css returns a non-2xx response such as 404, 403, or 500, this branch leaves css as null, runs only the two wiring checks, and exits successfully. That means the required npm run ci guard reports green even when the deployed stylesheet is missing or inaccessible—precisely when none of the tap-target rules are being served. Reserve skipping for genuine network failures if desired, but count an HTTP response with !res.ok as a failed deployment assertion.

Useful? React with 👍 / 👎.

@nish3451

Copy link
Copy Markdown
Collaborator Author

Superseded by #152. Same goal (WCAG 2.2 tap-target drift on the live site) via the newer non-blocking check-public-live-tap-targets.mjs approach rather than this PR's test-public-live-tap-targets.mjs. Closing in favour of #152.

@nish3451 nish3451 closed this Aug 19, 2026
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