Skip to content

fix(a11y): resolve Lighthouse accessibility failures on /pricing#30

Merged
projectamazonph merged 2 commits into
mainfrom
claude/whats-next-4hf0yp
Jul 16, 2026
Merged

fix(a11y): resolve Lighthouse accessibility failures on /pricing#30
projectamazonph merged 2 commits into
mainfrom
claude/whats-next-4hf0yp

Conversation

@projectamazonph

@projectamazonph projectamazonph commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Follow-up to the pre-existing Lighthouse CI failure flagged when PR fix(content): version curriculum source in the repo, drop Android path #26 merged: /pricing scored 0.92 accessibility against a 0.95 threshold.
  • PR ⚡ Bolt: optimize grading engine nested lookups via O(1) Map search #23 already fixed the color-contrast portion of this (.tierEyebrow / .bulletLive switched from low-contrast var(--accent) to var(--ink-700)/var(--ink-900)), but two more axe findings on the same page were still unaddressed:
    • skip-link / target-size: the skip link's target #main-content didn't exist anywhere on /pricing, so keyboard users' "Skip to main content" link had nothing to focus.
    • heading-order: the page's <h1> was followed directly by the tier cards' <h3> (via the shared CardTitle component), skipping <h2>.
  • Fixes: add id="main-content" to the page's <main> (matches the pattern already used on every other route), and insert a visually-hidden <h2> before the tier grid so heading levels stay sequential without a redundant on-page label. Added a reusable .visually-hidden utility to globals.css for this.

Test plan

  • pnpm install + prisma generate + tsc --noEmit — zero errors
  • eslint . — zero errors (pre-existing warnings unrelated to this change)
  • pnpm test:coverage — 200/200 tests, all coverage thresholds pass
  • lhci autorun against .lighthouserc.json (same tool/config CI uses, 3 runs × 4 URLs) — all assertions pass; /pricing accessibility is now 1.0 (was 0.92)

🤖 Generated with Claude Code

https://claude.ai/code/session_013kiWYYyCeGgYrKhD8prjqa


Generated by Claude Code

Summary by CodeRabbit

  • Accessibility Improvements
    • Improved navigation to the main pricing content by adding a clear main-content target.
    • Added a screen-reader-friendly “Compare tiers” heading to improve structure.
    • Introduced a new visually-hidden utility style so assistive technologies can access hidden content appropriately.

Three of four axe findings weren't addressed by the earlier color-
contrast fix (PR #23): the skip link's target (#main-content) didn't
exist on this page, and the tier cards' h3 titles followed the page h1
directly with no h2 in between. Add the missing id and an accessible
(visually-hidden) h2 so heading order stays sequential without a
redundant on-page label.

Verified with the same tool CI uses (lhci autorun against
.lighthouserc.json, 3 runs x 4 URLs): all assertions pass, including
a perfect 1.0 accessibility score on /pricing (up from 0.92).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013kiWYYyCeGgYrKhD8prjqa
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 76ddabdd-20d9-40b0-8ff8-0b44676c5382

📥 Commits

Reviewing files that changed from the base of the PR and between e548ff8 and 7da9ad0.

📒 Files selected for processing (1)
  • src/styles/globals.css
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/styles/globals.css

📝 Walkthrough

Walkthrough

The Pricing page now has an explicit main-content target and a visually hidden “Compare tiers” heading. Global styles add the .visually-hidden utility to preserve screen-reader access while hiding content visually.

Changes

Pricing accessibility

Layer / File(s) Summary
Add Pricing landmarks and hidden heading
src/app/(public)/pricing/page.tsx, src/styles/globals.css
The Pricing page adds the main-content identifier and “Compare tiers” heading, supported by a global visually hidden CSS utility.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: fixing accessibility issues on the /pricing page.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/whats-next-4hf0yp

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

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/styles/globals.css`:
- Around line 286-298: Update the .visually-hidden rule by replacing the
deprecated clip declaration with clip-path: inset(50%), preserving the existing
visually hidden and screen-reader-accessible behavior while satisfying
Stylelint.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6ea569ed-9c99-457b-8303-057d993fba1b

📥 Commits

Reviewing files that changed from the base of the PR and between e906bff and e548ff8.

📒 Files selected for processing (2)
  • src/app/(public)/pricing/page.tsx
  • src/styles/globals.css

Comment thread src/styles/globals.css
Stylelint flags clip: rect() as deprecated (property-no-deprecated).
clip-path: inset(50%) is the modern equivalent — same visual/screen-
reader behavior, no lint warning.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013kiWYYyCeGgYrKhD8prjqa
@projectamazonph
projectamazonph merged commit fed0a31 into main Jul 16, 2026
5 checks passed
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.

2 participants