Skip to content

fix: add aria-label to Newsletter input and nav links for FAQ/Testimonials#198

Open
shazzar00ni wants to merge 2 commits into
mainfrom
fix/e2e-test-failures
Open

fix: add aria-label to Newsletter input and nav links for FAQ/Testimonials#198
shazzar00ni wants to merge 2 commits into
mainfrom
fix/e2e-test-failures

Conversation

@shazzar00ni

Copy link
Copy Markdown
Owner

Summary

  • Add aria-label="Email" to Newsletter input for E2E test identification
  • Add FAQ and Testimonials to NAV_LINKS for navigation
  • Add aria-label prop to Input component

Changes

  • src/components/ui/Input.tsx: Add aria-label prop support
  • src/components/Newsletter.tsx: Add aria-label to email input
  • src/data/content.ts: Add FAQ and Testimonials to nav links

Testing

  • Run E2E tests: npm run e2e
  • Newsletter form tests should now pass
  • FAQ and Testimonials navigation should work

Related

  • Fixes E2E test failures identified in TEST_REPORT.md

…nials

- Add aria-label='Email' to Newsletter input for E2E test identification
- Add FAQ and Testimonials to NAV_LINKS for navigation
- Add aria-label prop to Input component
Copilot AI review requested due to automatic review settings May 6, 2026 00:44

@infinitcode-ai infinitcode-ai 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.

Summary

This pull request adds an aria-label prop to the Input component and uses it in the Newsletter component, improving accessibility. It also adds two new navigation links ('FAQ' and 'Testimonials') to the content data. The changes are minimal, well-structured, and introduce no apparent bugs or security issues.

Review Verdict: ✅ Review Passed
The changes are straightforward, enhance accessibility, and extend navigation without breaking existing functionality. No critical issues detected.

Changes

File Path Changes Detected
src/components/Newsletter.tsx • Added aria-label="Email" to the email input for better accessibility.
src/components/ui/Input.tsx • Added optional 'aria-label' prop to the InputProps interface.
• Destructured 'aria-label': ariaLabel from props and passed it to the underlying <input> element.
src/data/content.ts • Added 'FAQ' and 'Testimonials' navigation links to the NAV_LINKS array.

Code Style & Consistency

All identifiers follow project casing conventions.

Hot Take

"Adding aria-label is like putting a seatbelt on a tricycle—technically correct but maybe overkill for a newsletter signup. And those new nav links? Bold move adding 'FAQ' and 'Testimonials' without any actual content to back them up—hope you're ready for some 404 adventures."

Example Commands:

@infinitcodeai review          Trigger an instant AI PR review.
@infinitcodeai {prompt}        Ask anything about your codebase.

Note: For additional settings, navigate to Infinitcode AI.

About

Automated review powered by Infinitcode AI
Report generated at 5/6/2026, 12:45:57 AM

@vercel

vercel Bot commented May 6, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docugen Ready Ready Preview, Comment May 6, 2026 2:46am

@coderabbitai

coderabbitai Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@shazzar00ni has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 54 minutes and 47 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: db6c59d6-0531-4766-a76f-160f38ce107d

📥 Commits

Reviewing files that changed from the base of the PR and between 828d1a3 and c5b5ba4.

📒 Files selected for processing (5)
  • TEST_REPORT.md
  • e2e-report.txt
  • src/components/Newsletter.tsx
  • src/components/ui/Input.test.tsx
  • src/data/content.ts

Walkthrough

Adds optional aria-label accessibility prop to the Input component and applies it to the Newsletter email field. Also expands site navigation with FAQ and Testimonials links.

Changes

Email Input Accessibility

Layer / File(s) Summary
Interface Definition
src/components/ui/Input.tsx
InputProps interface updated with optional aria-label?: string prop.
Component Implementation
src/components/ui/Input.tsx
Input element destructures and passes ariaLabel prop to the HTML input's aria-label attribute.
Feature Usage
src/components/Newsletter.tsx
Newsletter email input passes aria-label="Email" to leverage the new prop.

Site Navigation Expansion

Layer / File(s) Summary
Navigation Data
src/data/content.ts
NAV_LINKS array extended with two new entries: FAQ and Testimonials sections.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

✨ A label for the input field,
Accessibility strength revealed,
FAQ paths now light the way,
Testimonials shine on display,
Navigation grows with care each day. 🎯

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: adding aria-label attributes for accessibility and expanding navigation links with FAQ/Testimonials sections.
Description check ✅ Passed The description is directly related to the changeset, providing clear context about the purpose (E2E test identification), listing all modified files, and including testing instructions.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/e2e-test-failures

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@codacy-production

codacy-production Bot commented May 6, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Improves landing-page accessibility and navigation by enabling aria-label support on the shared Input component, using it on the newsletter email field (to support label-based E2E selection), and adding missing section anchors to the main navigation.

Changes:

  • Added aria-label support to the shared Input component.
  • Labeled the Newsletter email input with aria-label="Email".
  • Added FAQ and Testimonials links to NAV_LINKS.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/data/content.ts Adds FAQ/Testimonials anchors to the global nav link list.
src/components/ui/Input.tsx Extends the Input API to accept and forward aria-label.
src/components/Newsletter.tsx Applies aria-label to the newsletter email input for accessibility/E2E selection.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/ui/Input.tsx

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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/components/Newsletter.tsx`:
- Line 108: The Newsletter component currently hardcodes aria-label="Email";
replace that literal with the centralized copy constant (e.g.,
NEWSLETTER_COPY.ariaLabel) by importing NEWSLETTER_COPY from src/data/content.ts
and using it for the input's aria-label prop (look for the input element in the
Newsletter component). Add the import statement for NEWSLETTER_COPY (or extend
an existing import from src/data/content.ts) and ensure the aria-label prop uses
NEWSLETTER_COPY.ariaLabel so all text is sourced from the content module.
🪄 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: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 9b37c115-c47d-4448-b046-1801ba33bf00

📥 Commits

Reviewing files that changed from the base of the PR and between dcff020 and 828d1a3.

📒 Files selected for processing (3)
  • src/components/Newsletter.tsx
  • src/components/ui/Input.tsx
  • src/data/content.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Agent
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Codacy Security Scan
🧰 Additional context used
📓 Path-based instructions (4)
src/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.{ts,tsx,js,jsx}: Use absolute imports from src/ directory (configured in tsconfig.json)
Organize imports in this order: React → external dependencies → internal components/utils
Use camelCase for variable and function names (e.g., handleSubmit, isLoading)
Use SCREAMING_SNAKE_CASE for constants (e.g., SITE_CONFIG)
Handle runtime errors properly — avoid empty catch blocks; always log the error or re-throw to preserve stack traces

Files:

  • src/data/content.ts
  • src/components/Newsletter.tsx
  • src/components/ui/Input.tsx
src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

src/**/*.{ts,tsx}: No any types - use explicit types or unknown with type guards
Use interface for object types, type for unions/primitives
Use descriptive generic names (T, K, V) or descriptive names (Item, Key) for generics

Files:

  • src/data/content.ts
  • src/components/Newsletter.tsx
  • src/components/ui/Input.tsx
src/data/content.ts

📄 CodeRabbit inference engine (AGENTS.md)

src/data/content.ts: Use developer-focused tone: confident, technical, no marketing fluff
Avoid lorem ipsum; use realistic placeholder text
Use 'you/your' for direct address in copy

Files:

  • src/data/content.ts
src/components/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

src/components/**/*.tsx: Use named exports only for components; no default exports
Use PascalCase for component files and component names (e.g., HeroSection, PricingCard)
Use meaningful CSS class names, avoid abbreviations
Use design system colors from tailwind.config.js (e.g., text-dark-100, bg-teal-600)
Dark mode first: The app defaults to dark mode. Use dark: prefix to activate styles when dark mode is active.
Avoid arbitrary Tailwind values ([...]); extend theme instead
Use semantic Tailwind color names: text-dark-300 for secondary text, text-teal-400 for accents
Use consistent spacing scale: 4, 6, 8, 12, 16
Use responsive Tailwind prefixes: sm:, md:, lg: for responsive breakpoints
Use Framer Motion for entrance animations only (fade-in, slide-up); keep duration at 0.5s for most, 0.6s for complex animations
When using Framer Motion, stagger children with delay: index * 0.1
Use inline form validation or simple state for form validation; do not use external validation libraries
Display user-friendly messages for network errors
Place all text copy and site configuration in src/data/content.ts; never hardcode text in components
Use mobile-first responsive design approach
Use React.memo() for expensive components
Optimize images with WebP/AVIF formats

Files:

  • src/components/Newsletter.tsx
  • src/components/ui/Input.tsx
🔇 Additional comments (2)
src/components/ui/Input.tsx (1)

9-10: Accessibility prop plumbing is correctly implemented.

aria-label is properly added to InputProps, destructured safely, and forwarded to the native input element.

Also applies to: 47-48, 58-60

src/data/content.ts (1)

13-14: NAV_LINKS update looks good.

Adding FAQ and Testimonials here keeps navigation content centralized and consistent with the data-driven content pattern.

Comment thread src/components/Newsletter.tsx Outdated
- Add NEWSLETTER_COPY.ariaLabel to content.ts for centralized copy
- Use NEWSLETTER_COPY.ariaLabel in Newsletter component
- Add unit tests for aria-label prop forwarding
@sonarqubecloud

sonarqubecloud Bot commented May 6, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants