Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ function Header() {
<div className="w-full xl:container flex justify-center text-white dark:text-gray-800">
<div className="w-full max-w-4xl text-center flex flex-col items-center px-4">
<h1 className="hero__title font-bold text-2xl sm:text-3xl md:text-4xl lg:text-5xl xl:text-6xl 2xl:text-7xl mb-6 sm:mb-8 lg:mb-12 leading-tight sm:leading-tight md:leading-tight lg:leading-tight xl:leading-tight 2xl:leading-tight">
<span className="inline-block text-white dark:text-black">
<span className="inline-block text-white dark:text-gray-800">
Schema-First Full‑Stack Toolkit
Comment on lines 19 to 23
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Re-check dark-mode contrast – current dark:text-gray-800 is likely too low against a dark hero background

dark:text-gray-800 (#1F2937) is almost the same luminance as most dark backgrounds (e.g. #0f172a, #111827, etc.). This can drop the contrast ratio far below the WCAG-AA 4.5:1 guideline for normal text, defeating the PR’s stated goal.

Please verify the effective background color of .hero--primary in dark mode and run a quick contrast check. If the ratio is < 4.5 : 1, consider one of:

-<span className="inline-block text-white dark:text-gray-800">
+<span className="inline-block text-white dark:text-gray-100">

-<span className="inline-block mt-2 sm:mt-0 text-gray-800 dark:text-white font-extrabold">
+<span className="inline-block mt-2 sm:mt-0 text-gray-200 dark:text-white font-extrabold">

or switch to Tailwind’s text-gray-200/300 for dark variants.

You can confirm quickly with:

If the ratio < 4.5, please adjust the color.

Also applies to: 27-27


🏁 Script executed:

#!/bin/bash
# Compute contrast ratio between bg and fg (requires node & tinycolor2 if available)
# Substitute the actual dark hero background hex below:
bg="#0f172a"
fg="#1f2937"
node - <<'JS'
const tiny = require('tinycolor2');
function contrast(a,b){return tiny.readability(a,b).toFixed(2)}
console.log(`contrast: ${contrast(process.env.fg,process.env.bg)}`)
JS

Length of output: 879


🏁 Script executed:

#!/usr/bin/env bash
# Compute contrast ratio between bg and fg using Python
python3 - << 'PYCODE'
import sys
def luminance(hex_color):
    hex_color = hex_color.lstrip('#')
    r, g, b = [int(hex_color[i:i+2], 16) / 255.0 for i in (0, 2, 4)]
    def to_lin(c):
        return c / 12.92 if c <= 0.03928 else ((c + 0.055) / 1.055) ** 2.4
    r_l, g_l, b_l = to_lin(r), to_lin(g), to_lin(b)
    return 0.2126 * r_l + 0.7152 * g_l + 0.0722 * b_l

bg = "#0f172a"
fg = "#1f2937"
L1, L2 = luminance(fg), luminance(bg)
ratio = (L1 + 0.05) / (L2 + 0.05) if L1 >= L2 else (L2 + 0.05) / (L1 + 0.05)
print(f"contrast: {ratio:.2f}:1")
PYCODE

# Search for any .hero--primary usage or definition
rg "hero--primary" -n

Length of output: 148


Increase Dark-Mode Text Contrast

Running a local luminance check confirms dark:text-gray-800 (#1F2937) on the hero’s dark background (#0f172a) yields only 1.22:1, far below the WCAG-AA minimum of 4.5:1. Please adjust the dark-mode text colors in src/pages/index.tsx:

• At lines 19–23:

- <span className="inline-block text-white dark:text-gray-800">
+ <span className="inline-block text-white dark:text-gray-100">

• At line 27:

- <span className="inline-block mt-2 sm:mt-0 text-gray-800 dark:text-white font-extrabold">
+ <span className="inline-block mt-2 sm:mt-0 text-gray-200 dark:text-white font-extrabold">

These changes will raise the contrast to ≥ 4.5:1 in dark mode.

📝 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
<div className="w-full xl:container flex justify-center text-white dark:text-gray-800">
<div className="w-full max-w-4xl text-center flex flex-col items-center px-4">
<h1 className="hero__title font-bold text-2xl sm:text-3xl md:text-4xl lg:text-5xl xl:text-6xl 2xl:text-7xl mb-6 sm:mb-8 lg:mb-12 leading-tight sm:leading-tight md:leading-tight lg:leading-tight xl:leading-tight 2xl:leading-tight">
<span className="inline-block text-white dark:text-black">
<span className="inline-block text-white dark:text-gray-800">
Schema-First Full‑Stack Toolkit
<div className="w-full xl:container flex justify-center text-white dark:text-gray-800">
<div className="w-full max-w-4xl text-center flex flex-col items-center px-4">
<h1 className="hero__title font-bold text-2xl sm:text-3xl md:text-4xl lg:text-5xl xl:text-6xl 2xl:text-7xl mb-6 sm:mb-8 lg:mb-12 leading-tight sm:leading-tight md:leading-tight lg:leading-tight xl:leading-tight 2xl:leading-tight">
- <span className="inline-block text-white dark:text-gray-800">
+ <span className="inline-block text-white dark:text-gray-100">
Schema-First Full-Stack Toolkit
</span>
</h1>
{/* … other content … */}
- <span className="inline-block mt-2 sm:mt-0 text-gray-800 dark:text-white font-extrabold">
+ <span className="inline-block mt-2 sm:mt-0 text-gray-200 dark:text-white font-extrabold">
{/* your subtitle or tagline here */}
</span>
🤖 Prompt for AI Agents
In src/pages/index.tsx around lines 19 to 23 and line 27, the dark mode text
color classes use dark:text-gray-800 which results in insufficient contrast
against the dark background. Update these dark mode text color classes to a
lighter shade that meets the WCAG-AA minimum contrast ratio of 4.5:1, such as
dark:text-gray-100 or a similar lighter gray, to improve readability and
accessibility.

</span>
<br className="hidden sm:block" />
<span className="sm:hidden"> </span>
<span className="inline-block mt-2 sm:mt-0 text-black dark:text-white font-extrabold">
<span className="inline-block mt-2 sm:mt-0 text-gray-800 dark:text-white font-extrabold">
with Clean & Scalable Authorization
</span>
</h1>
Expand Down