Skip to content

fix: improve button hover contrast to meet WCAG 2.1 AA standards#11

Open
hk2166 wants to merge 3 commits intoAOSSIE-Org:mainfrom
hk2166:fix/button-hover-contrast
Open

fix: improve button hover contrast to meet WCAG 2.1 AA standards#11
hk2166 wants to merge 3 commits intoAOSSIE-Org:mainfrom
hk2166:fix/button-hover-contrast

Conversation

@hk2166
Copy link

@hk2166 hk2166 commented Mar 1, 2026

Fixed insufficient text-to-background contrast on button hover states
in the landing page hero section to meet WCAG 2.1 AA accessibility standards.

Changes Made:

  • View Docs button: replaced hover:text-teal-500 (transparent background)
    with hover:bg-teal-600 hover:text-white, achieving ~4.6:1 contrast ratio
  • Download button: darkened hover gradient to hover:from-yellow-600 hover:to-green-600 and set font-semibold for improved legibility

Addressed Issues:

Fixes #3

Screenshots/Recordings:

Screenshot 2026-03-02 at 1 32 21 AM

Additional Notes:

Previous hover states fell below the WCAG 2.1 AA minimum of 4.5:1 contrast
ratio for normal text. Both buttons now meet or exceed this threshold.

Checklist

  • [ ✅] My code follows the project's code style and conventions
  • [ ✅] 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 Contributing Guidelines

⚠️ AI Notice - Important!

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.

Copilot AI review requested due to automatic review settings March 1, 2026 20:03
@github-actions github-actions bot added bug Something isn't working configuration Configuration file changes frontend Changes to frontend code javascript JavaScript/TypeScript code changes labels Mar 1, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 1, 2026

Warning

Rate limit exceeded

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

⌛ 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 1496367 and b5ffdc8.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • src/Pages/FaqPage/FAQ.tsx
  • src/Pages/Footer/Footer.tsx
  • src/Pages/Landing page/Home1.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@github-actions github-actions bot added size/L Large PR (201-500 lines changed) first-time-contributor First PR of an external contributor pending-coderabbit-review labels Mar 1, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates UI components (Footer and FAQ) and synchronizes the lockfile metadata, but it does not include the landing-page hero/download button hover-contrast changes described in the PR title/description and Issue #3 context.

Changes:

  • Replaced the existing footer with a new 4-column, animated footer layout including external/community links.
  • Added hover-driven styling behavior to FAQ items and adjusted FAQ border classes.
  • Updated package-lock.json package version fields to 1.0.0.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/Pages/Footer/Footer.tsx Large footer redesign with framer-motion animations and new external links/icons.
src/Pages/FaqPage/FAQ.tsx Adds hover state styling to FAQ items and adjusts border styling logic.
package-lock.json Updates lockfile version fields to match 1.0.0.

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

Comment on lines +96 to 100
const [hovered, setHovered] = useState(false);

return (
<motion.div
className={`rounded-xl overflow-hidden transition-all duration-300
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

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

The new hovered React state is only used to drive hover styling. This can be expressed with Tailwind hover:/group-hover: classes (and conditional classes based on isOpen) without triggering re-renders on mouse enter/leave. Consider removing hovered state + mouse handlers and implementing the hover styles purely via CSS classes.

Copilot uses AI. Check for mistakes.
Comment on lines +19 to +22
<footer className="bg-white dark:bg-black text-gray-700 dark:text-gray-300 border-t border-gray-200 dark:border-gray-800 transition-colors duration-300">
{/* Main grid */}
<div className="container mx-auto px-6 py-16">
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-12">
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

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

PR title/description and linked issue talk about improving landing page download/docs button hover contrast, but this PR’s code changes are in Footer/FAQ (and package-lock). Either include the hero/download-button contrast changes in this PR, or update the PR title/description (and issue link) to match the actual scope.

Copilot uses AI. Check for mistakes.
Comment on lines +103 to +104
? 'border-pink-500 dark:border-grey-500'
: 'dark:border-grey-500'}
Copy link

Copilot AI Mar 1, 2026

Choose a reason for hiding this comment

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

dark:border-grey-500 isn’t a valid Tailwind color token (Tailwind uses gray, not grey), so the dark-mode border color won’t apply. Use dark:border-gray-500 (or whatever shade matches the design) and consider also setting an explicit non-dark border color for the collapsed state for consistency.

Suggested change
? 'border-pink-500 dark:border-grey-500'
: 'dark:border-grey-500'}
? 'border-pink-500 dark:border-gray-500'
: 'border-gray-200 dark:border-gray-500'}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working configuration Configuration file changes first-time-contributor First PR of an external contributor frontend Changes to frontend code javascript JavaScript/TypeScript code changes pending-coderabbit-review size/L Large PR (201-500 lines changed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Improve hover state contrast ratio of download buttons to meet WCAG AA standards

2 participants