Skip to content

improvement(landing): lighthouse performance and accessibility fixes#3837

Merged
waleedlatif1 merged 4 commits intostagingfrom
waleedlatif1/lighthouse-audit
Mar 30, 2026
Merged

improvement(landing): lighthouse performance and accessibility fixes#3837
waleedlatif1 merged 4 commits intostagingfrom
waleedlatif1/lighthouse-audit

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Summary

  • Replace force-dynamic with ISR (revalidate = 3600) on landing page to reduce TTFB
  • Remove priority from below-fold images (collaboration, features) to free bandwidth for LCP
  • Add aria-label to icon-only submit button in footer CTA
  • Add role="button", keyboard handlers, and ARIA attributes to access control panel toggles
  • Increase text contrast ratios across enterprise section to meet WCAG AA
  • Add DNS prefetch for analytics domain

Type of Change

  • Bug fix
  • Performance improvement

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Mar 30, 2026 5:15am

Request Review

@cursor
Copy link
Copy Markdown

cursor bot commented Mar 29, 2026

PR Summary

Low Risk
Low risk mostly limited to landing-page rendering hints (ISR, image loading) and small accessibility/contrast tweaks; main risk is unintended caching or visual regressions on the marketing site.

Overview
Improves landing-page Lighthouse scores by switching the root page.tsx from force-dynamic rendering to ISR (revalidate = 3600) and removing priority from below-the-fold next/image assets in the Collaboration and Features sections.

Accessibility and readability tweaks include adding ARIA/keyboard support to Access Control toggles (via a shared FeatureToggleItem), adding an aria-label to the footer icon-only submit button, and increasing enterprise-section text contrast.

Minor performance hint: adds dns-prefetch for the OneDollarStats analytics asset domain in layout.tsx.

Written by Cursor Bugbot for commit ba2ccdd. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 29, 2026

Greptile Summary

This PR improves Lighthouse performance and WCAG accessibility scores for the landing page. Changes include: switching from force-dynamic to ISR (revalidate = 3600) to reduce TTFB, removing priority from two below-fold images to free LCP bandwidth, adding aria-label to the icon-only footer submit button, extracting a shared FeatureToggleItem component with full ARIA attributes and keyboard support, increasing text contrast ratios across the enterprise section, and adding a DNS prefetch hint for the analytics domain.

Key changes:

  • page.tsx: force-dynamicrevalidate = 3600 — safe for this route since the page has only static metadata and a fully client-rendered Landing component
  • access-control-panel.tsx: the previous thread's refactoring suggestion has been implemented; a shared FeatureToggleItem centralises ARIA and keyboard logic — one leftover redundant key prop remains inside the component body (P2 style)
  • Contrast bumps (/30/55, /40/60, etc.) are applied consistently across access-control-panel, audit-log-preview, and enterprise to meet WCAG AA ratios

Confidence Score: 5/5

Safe to merge — all changes are targeted accessibility and performance improvements with no logic regressions.

The only finding is a P2 style issue (redundant key prop inside the extracted component body). All other changes are straightforward and well-scoped: ISR is safe for this static landing page, priority removals are correct for below-fold images, ARIA improvements are accurate, and contrast changes are consistent. No P0 or P1 issues found.

No files require special attention.

Important Files Changed

Filename Overview
apps/sim/app/page.tsx Switches landing page from force-dynamic to ISR with a 1-hour revalidation interval. The page contains only static metadata and renders a fully client-side Landing component, so ISR is safe here.
apps/sim/app/(home)/components/enterprise/components/access-control-panel.tsx Extracts a shared FeatureToggleItem component with correct ARIA attributes (role='button', aria-pressed, aria-label), keyboard handler, and contrast improvements; one redundant key prop remains inside the component body.
apps/sim/app/(home)/components/enterprise/enterprise.tsx Bumps multiple color-mix and raw-opacity values throughout the enterprise section (trust strip, marquee tags, paragraph text) from ~30–40% to 55–60%+ to improve text contrast; also increases hover states proportionally.
apps/sim/app/(home)/components/footer/footer-cta.tsx Adds aria-label='Submit message' to the icon-only submit button, fixing a missing accessible name for screen readers.
apps/sim/app/layout.tsx Adds a dns-prefetch hint for the analytics asset domain, reducing DNS lookup latency for the deferred analytics script.
apps/sim/app/(home)/components/collaboration/collaboration.tsx Removes priority from a below-fold collaboration image, correctly freeing bandwidth for the LCP element above the fold.
apps/sim/app/(home)/components/features/features.tsx Removes priority from the features section image (below-fold), consistent with the collaboration image change.
apps/sim/app/(home)/components/enterprise/components/audit-log-preview.tsx Increases text opacity on time and separator spans from /30 and /40 to /55 and /60 to improve WCAG AA contrast ratios. No logic changes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Browser Request - Landing Page] --> B{Cached?}
    B -- Yes, within 1h --> C[Serve Static HTML\nrevalidate=3600]
    B -- No / Stale --> D[Next.js ISR Re-render]
    D --> C
    C --> E[Layout - layout.tsx]
    E --> F[dns-prefetch\nassets.onedollarstats.com]
    E --> G[Landing Component]
    G --> H[Hero - priority images]
    G --> I[Collaboration - no priority]
    G --> J[Features - no priority]
    G --> K[Enterprise Section]
    G --> L[Footer CTA\naria-label on submit]
    K --> M[AuditLogPreview\ncontrast improved]
    K --> N[AccessControlPanel]
    N --> O[FeatureToggleItem\nrole=button / aria-pressed / keyboard handler]
Loading

Reviews (3): Last reviewed commit: "fix(landing): ensure explicit delay prop..." | Re-trigger Greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1
Copy link
Copy Markdown
Collaborator Author

@cursor review

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@waleedlatif1 waleedlatif1 merged commit 1728c37 into staging Mar 30, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the waleedlatif1/lighthouse-audit branch March 30, 2026 05:33
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