Skip to content

fix(hero): improve accessibility, contrast, and spacing on responsive viewports#714

Open
reach2saksham wants to merge 2 commits intoAOSSIE-Org:mainfrom
reach2saksham:fix/hero-section-accessibility
Open

fix(hero): improve accessibility, contrast, and spacing on responsive viewports#714
reach2saksham wants to merge 2 commits intoAOSSIE-Org:mainfrom
reach2saksham:fix/hero-section-accessibility

Conversation

@reach2saksham
Copy link
Copy Markdown
Contributor

@reach2saksham reach2saksham commented Mar 27, 2026

Addressed Issues:

Fixes #713

  • Improved heading visibility across md → lg breakpoints
  • Added bottom padding to the hero heading for better visual separation
  • Ensured consistent background support behind the heading
  • Updated text and icon colors:
    • text-zinc-500text-zinc-800 on lg screens (better contrast on yellow background)
  • Enhanced overall accessibility compliance (WCAG)

Screenshots/Recordings:

Before:
image

After:
image

Before:
image

After:
image

Additional Notes:

AI Usage Disclosure:

We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact. AI slop is strongly discouraged and may lead to banning and blocking. Do not spam our repos with AI slop.

Check one of the checkboxes below:

  • This PR does not contain AI-generated code at all.
  • This PR contains AI-generated code. I have read the AI Usage Policy and this PR complies with this policy. I have tested the code locally and I am responsible for it.

I have used the following AI models and tools: TODO

Checklist

  • My PR addresses a single issue, fixes a single bug or makes a single improvement.
  • My code follows the project's code style and conventions
  • If applicable, I have made corresponding changes or additions to the documentation
  • If applicable, I have made corresponding changes or additions to tests
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contribution Guidelines
  • Once I submit my PR, CodeRabbit AI will automatically review it and I will address CodeRabbit's comments.
  • I have filled this PR template completely and carefully, and I understand that my PR may be closed without review otherwise.

Summary by CodeRabbit

  • Style
    • Adjusted hero background visibility breakpoint for improved responsiveness on large screens
    • Tweaked hero spacing and heading styling for better visual balance
    • Refined paragraph and section text color scales with larger-screen overrides for improved contrast
    • Harmonized link and icon color treatments for consistent appearance across themes and sizes

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e2971724-f3d2-4b43-8d1b-c96838ccea8b

📥 Commits

Reviewing files that changed from the base of the PR and between 02dd7ac and ededbc2.

📒 Files selected for processing (1)
  • src/app/page.jsx
✅ Files skipped from review due to trivial changes (1)
  • src/app/page.jsx

📝 Walkthrough

Walkthrough

Updated responsive styling in the homepage: adjusted hero background visibility breakpoint, added bottom padding to the hero heading, and tuned several text color utilities (including lg-specific overrides) for hero, social links, and "Our Projects" to improve contrast and responsiveness.

Changes

Cohort / File(s) Summary
Hero & Typography Styling
src/app/page.jsx
Changed hero background visibility class from md:block to lg:block; added pb-8 to hero heading; adjusted text color utilities (e.g., text-zinc-600text-zinc-500 with lg:text-zinc-800) for hero paragraph, social/contact links, and "Our Projects" title/description to add lg-specific darker color variants.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • Zahnentferner

Poem

🐰 I hopped along the hero's light,
Padded the heading, tuned the sight,
Colors deepened at lg display,
So screens and readers find their way,
A tiny fix — the meadow's bright.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: improving accessibility, contrast, and spacing in the hero section across responsive viewports.
Linked Issues check ✅ Passed The PR implementation addresses all primary coding objectives from issue #713: improved heading readability on md-lg viewports, added bottom padding to heading, enhanced text color contrast on lg screens, and WCAG compliance improvements.
Out of Scope Changes check ✅ Passed All changes in src/app/page.jsx are directly related to resolving the hero section's accessibility, contrast, and responsive issues documented in issue #713; no out-of-scope modifications detected.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/app/page.jsx (1)

203-208: ⚠️ Potential issue | 🟡 Minor

Same concern: reduced contrast for body text outside hero section.

This paragraph is in the "Our Projects" section with a standard background. Changing to text-zinc-500 on smaller viewports reduces readability compared to the original text-zinc-600. The lg:text-zinc-800 modifier provides no benefit here since this section doesn't use the yellow background.

💡 Suggested fix
-            <p className=" font-mono text-lg text-zinc-500 lg:text-zinc-800 dark:text-zinc-400 text-center ">
+            <p className=" font-mono text-lg text-zinc-600 dark:text-zinc-400 text-center ">
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/app/page.jsx` around lines 203 - 208, The paragraph's tailwind classes
reduce contrast on small viewports; update the class string on the paragraph
element (the <p> with className starting "font-mono text-lg ...") to use
text-zinc-600 for small screens instead of text-zinc-500 and remove the
unnecessary lg:text-zinc-800 modifier so the text color remains consistently
readable in the "Our Projects" section.
🧹 Nitpick comments (1)
src/app/page.jsx (1)

78-78: Verify contrast ratio for text-zinc-500 on white background.

The lg:text-zinc-800 correctly improves contrast on the yellow background. However, changing the base color from text-zinc-600 to text-zinc-500 results in lighter text on smaller viewports with white backgrounds, which may reduce contrast. Tailwind's zinc-500 (#71717a) on white is borderline for WCAG AA (≈4.48:1), while zinc-600 (#52525b) provides better margin (≈5.74:1).

Consider keeping text-zinc-600 as the base and only applying lg:text-zinc-800:

💡 Suggested change
-                  className="mt-8 font-mono text-xl leading-8 text-zinc-500 lg:text-zinc-800 dark:text-zinc-300 md:dark:text-[`#FED41E`]/90 bg-white/50 md:bg-transparent dark:bg-zinc-900/50 md:dark:bg-transparent backdrop-blur-sm md:backdrop-blur-none rounded-xl p-4 md:p-0 text-center lg:text-left"
+                  className="mt-8 font-mono text-xl leading-8 text-zinc-600 lg:text-zinc-800 dark:text-zinc-300 md:dark:text-[`#FED41E`]/90 bg-white/50 md:bg-transparent dark:bg-zinc-900/50 md:dark:bg-transparent backdrop-blur-sm md:backdrop-blur-none rounded-xl p-4 md:p-0 text-center lg:text-left"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/app/page.jsx` at line 78, The base text color in the className on the
element rendered in page.jsx uses text-zinc-500 which lowers contrast on white
backgrounds; update the className to use text-zinc-600 as the default (keep
lg:text-zinc-800 for large screens) so the element (the JSX element with the
long className string containing mt-8 font-mono ... text-zinc-500
lg:text-zinc-800 ...) has improved WCAG AA contrast on smaller viewports.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/app/page.jsx`:
- Around line 197-199: Revert the small-viewport text color change on the "Our
Projects" heading: update the h1 with className containing "Our Projects" so it
uses text-zinc-800 for normal/smaller viewports (keeping any existing lg: or
dark: variants intact) instead of text-zinc-500, ensuring the non-hero section
retains the original higher contrast; locate the h1 element in page.jsx and
replace the small-viewport token in the className back to text-zinc-800.

---

Outside diff comments:
In `@src/app/page.jsx`:
- Around line 203-208: The paragraph's tailwind classes reduce contrast on small
viewports; update the class string on the paragraph element (the <p> with
className starting "font-mono text-lg ...") to use text-zinc-600 for small
screens instead of text-zinc-500 and remove the unnecessary lg:text-zinc-800
modifier so the text color remains consistently readable in the "Our Projects"
section.

---

Nitpick comments:
In `@src/app/page.jsx`:
- Line 78: The base text color in the className on the element rendered in
page.jsx uses text-zinc-500 which lowers contrast on white backgrounds; update
the className to use text-zinc-600 as the default (keep lg:text-zinc-800 for
large screens) so the element (the JSX element with the long className string
containing mt-8 font-mono ... text-zinc-500 lg:text-zinc-800 ...) has improved
WCAG AA contrast on smaller viewports.
🪄 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

Run ID: a3ad2205-3007-4413-94bc-8627fcb6a6ec

📥 Commits

Reviewing files that changed from the base of the PR and between bb70285 and 02dd7ac.

📒 Files selected for processing (1)
  • src/app/page.jsx

Comment on lines +197 to 199
<h1 className="font-mono pl-3 text-5xl font-black capitalize tracking-tighter text-zinc-500 lg:text-zinc-800 dark:text-white">
Our Projects
</h1>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

This change reduces contrast outside the hero section.

The "Our Projects" section isn't part of the hero area and doesn't have a yellow background. Changing from text-zinc-800 to text-zinc-500 on smaller viewports reduces contrast on what is likely a white/neutral background. The PR objectives specifically target the hero section's yellow background.

Consider reverting this to maintain the original contrast:

💡 Suggested fix
-                <h1 className="font-mono pl-3 text-5xl font-black capitalize tracking-tighter text-zinc-500 lg:text-zinc-800 dark:text-white">
+                <h1 className="font-mono pl-3 text-5xl font-black capitalize tracking-tighter text-zinc-800 dark:text-white">
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<h1 className="font-mono pl-3 text-5xl font-black capitalize tracking-tighter text-zinc-500 lg:text-zinc-800 dark:text-white">
Our Projects
</h1>
<h1 className="font-mono pl-3 text-5xl font-black capitalize tracking-tighter text-zinc-800 dark:text-white">
Our Projects
</h1>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/app/page.jsx` around lines 197 - 199, Revert the small-viewport text
color change on the "Our Projects" heading: update the h1 with className
containing "Our Projects" so it uses text-zinc-800 for normal/smaller viewports
(keeping any existing lg: or dark: variants intact) instead of text-zinc-500,
ensuring the non-hero section retains the original higher contrast; locate the
h1 element in page.jsx and replace the small-viewport token in the className
back to text-zinc-800.

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.

[UI/UX]: The hero section's heading, body texts and icons have colour contrast, padding and responsiveness issues

1 participant