mirror of
https://github.com/corazoncp/corazoncp-landing.git
synced 2026-12-01 04:30:31 +00:00
fix(a11y): resolve WCAG contrast, sticky header legibility, WhatsApp FAB overlap, and skip link (#16)
* test(a11y): add Red contract tests for contrast, sticky header, skip link, and FAB
- Assert skip-to-content link before .fixed WhatsApp FAB and <main id="main"> across all 4 built routes
- Assert bg-ivory/95 header, #146c3c/#183a2d FAB contrast + mobile icon circle, #7d5d28 gold token, pb-20 footer, and >=24px tap targets
* fix(a11y): resolve WCAG contrast, sticky header legibility, WhatsApp FAB overlap, and skip link
- Switch sticky header from bg-sage/15 to bg-ivory/95, prepend #main skip link before .fixed FAB, and add py-2.5 lg:py-1.5 nav tap padding
- Darken WhatsApp FAB to #146c3c, align aria-label with visible text ("Conversar con Azu por WhatsApp"), and collapse to 48x48 circle on <640px
- Darken --color-gold to #7d5d28 and footer text to #4b5950; add pb-20 on footer and pb-24 on /kundalini/ main
- Add id="main" across all 4 routes, scroll-mt-24 on focus targets, and update Slice 3 header bg assertion in services-catalog.test.js
This commit is contained in:
1 parent
c2a2a4ae37
commit
20908fdf78
10 files changed
+256
-34
No files matched your search
+3
-3
@@ -31,11 +31,11 @@
|
||||
<link rel="stylesheet" href="/src/style.css" />
|
||||
</head>
|
||||
<body class="bg-ivory text-forest selection:bg-emerald/20 selection:text-forest">
|
||||
<!-- @include src/partials/whatsapp-fab.html -->
|
||||
|
||||
<!-- @include src/partials/header.html -->
|
||||
|
||||
<main>
|
||||
<!-- @include src/partials/whatsapp-fab.html -->
|
||||
|
||||
<main id="main">
|
||||
<section class="py-12 md:py-20">
|
||||
<div class="mx-auto max-w-3xl px-6">
|
||||
<div class="mb-8">
|
||||
|
||||
+4
-4
@@ -31,11 +31,11 @@
|
||||
<link rel="stylesheet" href="/src/style.css" />
|
||||
</head>
|
||||
<body class="bg-ivory text-forest selection:bg-emerald/20 selection:text-forest">
|
||||
<!-- @include src/partials/whatsapp-fab.html -->
|
||||
|
||||
<!-- @include src/partials/header.html -->
|
||||
|
||||
<main>
|
||||
<!-- @include src/partials/whatsapp-fab.html -->
|
||||
|
||||
<main id="main">
|
||||
<!-- Section 02: Hero -->
|
||||
<section id="hero" class="py-12 md:py-20 lg:py-24">
|
||||
<div class="mx-auto grid max-w-6xl items-center gap-12 px-6 md:grid-cols-12">
|
||||
@@ -121,7 +121,7 @@
|
||||
href="https://wa.me/573215428972?text=Hola%20Azu,%20me%20gustar%C3%ADa%20agendar%20una%20sesi%C3%B3n%20inicial%20de%20Mentor%C3%ADas%20y%20Oidaterapia."
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="block w-full rounded-full border border-emerald px-6 py-3 text-center text-sm font-semibold text-emerald transition hover:bg-emerald hover:text-ivory"
|
||||
class="block w-full scroll-mt-24 rounded-full border border-emerald px-6 py-3 text-center text-sm font-semibold text-emerald transition hover:bg-emerald hover:text-ivory"
|
||||
>
|
||||
Agendar Sesión Inicial →
|
||||
</a>
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
<link rel="stylesheet" href="/src/style.css" />
|
||||
</head>
|
||||
<body class="bg-ivory text-forest selection:bg-emerald/20 selection:text-forest">
|
||||
<!-- @include src/partials/whatsapp-fab.html -->
|
||||
|
||||
<!-- @include src/partials/header.html -->
|
||||
|
||||
<main>
|
||||
<!-- @include src/partials/whatsapp-fab.html -->
|
||||
|
||||
<main id="main" class="pb-24">
|
||||
<section class="py-12 md:py-20">
|
||||
<div class="mx-auto max-w-6xl px-6">
|
||||
<div class="mx-auto max-w-3xl text-center mb-14">
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<!-- Footer -->
|
||||
<footer class="mt-16 border-t border-sage/20 py-12 text-center text-xs text-forest/60">
|
||||
<footer class="mt-16 border-t border-sage/20 pt-12 pb-20 sm:py-12 text-center text-xs text-[#4b5950]">
|
||||
<div class="mx-auto max-w-6xl px-6">
|
||||
<div class="flex items-center justify-center gap-6 mb-4">
|
||||
<a
|
||||
href="https://www.facebook.com/elcorazoncomoportal/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="transition hover:text-emerald font-medium"
|
||||
class="inline-flex min-h-[24px] items-center py-1.5 transition hover:text-emerald font-medium"
|
||||
aria-label="Facebook Fanpage oficial de El Corazón como Portal"
|
||||
>
|
||||
Facebook
|
||||
@@ -16,7 +16,7 @@
|
||||
href="https://www.instagram.com/elcorazoncomoportal"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="transition hover:text-emerald font-medium"
|
||||
class="inline-flex min-h-[24px] items-center py-1.5 transition hover:text-emerald font-medium"
|
||||
aria-label="Instagram"
|
||||
>
|
||||
Instagram
|
||||
@@ -26,7 +26,7 @@
|
||||
href="https://www.youtube.com/@Elcoraz%C3%B3ncomoportal"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="transition hover:text-emerald font-medium"
|
||||
class="inline-flex min-h-[24px] items-center py-1.5 transition hover:text-emerald font-medium"
|
||||
aria-label="YouTube"
|
||||
>
|
||||
YouTube
|
||||
@@ -36,7 +36,7 @@
|
||||
href="https://x.com/Elcorazoncp"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="transition hover:text-emerald font-medium"
|
||||
class="inline-flex min-h-[24px] items-center py-1.5 transition hover:text-emerald font-medium"
|
||||
aria-label="X Twitter"
|
||||
>
|
||||
X (Twitter)
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
<!-- Section 01: Header & Minimal Nav -->
|
||||
<header class="sticky top-0 z-40 border-b border-sage/30 bg-sage/15 backdrop-blur-md">
|
||||
<a
|
||||
href="#main"
|
||||
class="sr-only focus:not-sr-only focus:absolute focus:top-3 focus:left-3 focus:z-50 focus:rounded-md focus:bg-ivory focus:px-4 focus:py-2 focus:text-sm focus:font-semibold focus:text-forest focus:shadow-lg"
|
||||
>
|
||||
Saltar al contenido
|
||||
</a>
|
||||
<header class="sticky top-0 z-40 border-b border-sage/30 bg-ivory/95 backdrop-blur-md">
|
||||
<!-- Why: lg (1024px) desktop nav breakpoint + shrink-0 on the brand + gap-4 prevents brand/nav overlap at 768px–1018px. -->
|
||||
<div class="relative mx-auto flex max-w-6xl items-center justify-between gap-4 px-6 py-4">
|
||||
<!-- Why: the full brand title stays in the header row at 375px; only the nav collapses. -->
|
||||
@@ -22,12 +28,12 @@
|
||||
</button>
|
||||
<!-- Why: a single nav tree keeps screen-reader and visual order aligned at every breakpoint. -->
|
||||
<ul id="site-menu" class="hidden absolute inset-x-0 top-full z-40 flex-col space-y-4 border-b border-sage/30 bg-ivory/95 px-6 py-5 text-sm font-medium text-forest shadow-lg backdrop-blur-md lg:static lg:flex lg:flex-row lg:items-center lg:gap-8 lg:space-y-0 lg:border-b-0 lg:bg-transparent lg:p-0 lg:shadow-none">
|
||||
<li><a href="/#servicios" class="block transition hover:text-emerald">Servicios</a></li>
|
||||
<li><a href="/kundalini/" data-nav-current="kundalini" class="block transition hover:text-emerald">Kundalini Yoga</a></li>
|
||||
<li><a href="/#otros-espacios" class="block transition hover:text-emerald">Otros Espacios</a></li>
|
||||
<li><a href="/#acerca" class="block transition hover:text-emerald">Acerca de Azu</a></li>
|
||||
<li><a href="/#filosofia" class="block transition hover:text-emerald">Filosofía</a></li>
|
||||
<li><a href="/#contacto" class="block transition hover:text-emerald">Contacto</a></li>
|
||||
<li><a href="/#servicios" class="block py-2.5 lg:py-1.5 transition hover:text-emerald">Servicios</a></li>
|
||||
<li><a href="/kundalini/" data-nav-current="kundalini" class="block py-2.5 lg:py-1.5 transition hover:text-emerald">Kundalini Yoga</a></li>
|
||||
<li><a href="/#otros-espacios" class="block py-2.5 lg:py-1.5 transition hover:text-emerald">Otros Espacios</a></li>
|
||||
<li><a href="/#acerca" class="block py-2.5 lg:py-1.5 transition hover:text-emerald">Acerca de Azu</a></li>
|
||||
<li><a href="/#filosofia" class="block py-2.5 lg:py-1.5 transition hover:text-emerald">Filosofía</a></li>
|
||||
<li><a href="/#contacto" class="block py-2.5 lg:py-1.5 transition hover:text-emerald">Contacto</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
href="https://wa.me/573215428972?text=Hola%20Azu,%20visit%C3%A9%20tu%20p%C3%A1gina%20y%20me%20gustar%C3%ADa%20conversar%20sobre%20tus%20sesiones."
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
class="fixed bottom-5 right-5 z-50 flex min-h-[48px] min-w-[48px] items-center gap-2.5 rounded-full bg-[#25D366] px-5 py-3 text-sm font-bold text-white shadow-lg shadow-black/20 transition hover:scale-105 hover:bg-[#20ba59] hover:shadow-xl focus:outline-none focus:ring-4 focus:ring-[#25D366]/40 active:scale-95"
|
||||
aria-label="Conversar por WhatsApp con Azucena Sánchez"
|
||||
class="fixed bottom-5 right-5 z-50 flex min-h-[48px] min-w-[48px] w-12 h-12 justify-center items-center gap-2.5 rounded-full bg-[#146c3c] px-0 text-sm font-bold text-white shadow-lg shadow-black/20 transition hover:scale-105 hover:bg-forest hover:shadow-xl focus:outline-none focus:ring-4 focus:ring-emerald/40 active:scale-95 sm:w-auto sm:px-5 sm:py-3"
|
||||
aria-label="Conversar con Azu por WhatsApp"
|
||||
>
|
||||
<svg class="h-6 w-6 fill-current shrink-0" viewBox="0 0 24 24" aria-hidden="true" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M17.472 14.382c-.301-.15-1.78-.878-2.056-.979-.276-.101-.477-.15-.678.15-.201.301-.778.979-.954 1.18-.176.201-.352.226-.653.075-1.428-.714-2.36-1.272-3.308-2.898-.25-.43.25-.399.715-1.328.075-.15.038-.276-.019-.377-.057-.101-.477-1.155-.653-1.581-.172-.416-.347-.36-.477-.366-.124-.007-.276-.007-.427-.007-.15 0-.395.056-.602.282-.207.226-.791.772-.791 1.884 0 1.112.81 2.186.923 2.337.113.151 1.595 2.435 3.864 3.414.539.233.96.372 1.288.476.541.172 1.034.148 1.423.09.434-.065 1.334-.545 1.522-1.072.188-.528.188-.98.132-1.072-.056-.092-.207-.15-.508-.3zM12.008 2.004c-5.502 0-9.98 4.478-9.98 9.98 0 1.76.459 3.475 1.332 4.992L2.004 22l5.163-1.353a9.948 9.948 0 0 0 4.841 1.337c5.502 0 9.98-4.478 9.98-9.98 0-5.502-4.478-9.98-9.98-9.98zm0 18.293a8.283 8.283 0 0 1-4.226-1.153l-.303-.18-3.141.824.838-3.061-.197-.314a8.275 8.275 0 0 1-1.267-4.409c0-4.573 3.723-8.296 8.296-8.296 4.573 0 8.296 3.723 8.296 8.296 0 4.573-3.723 8.296-8.296 8.296z"/>
|
||||
</svg>
|
||||
<span>Conversar con Azu</span>
|
||||
<span class="hidden sm:inline">Conversar con Azu</span>
|
||||
</a>
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
--color-forest: #102f27;
|
||||
--color-emerald: #185844;
|
||||
--color-sage: #78947f;
|
||||
--color-gold: #b08a4f;
|
||||
--color-gold: #7d5d28;
|
||||
--color-porcelain-mist: #f4f1ea;
|
||||
--color-gris-oscuro: #303030;
|
||||
|
||||
|
||||
@@ -0,0 +1,215 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import test from 'node:test';
|
||||
|
||||
const ROUTES = [
|
||||
'dist/index.html',
|
||||
'dist/kundalini/index.html',
|
||||
'dist/volver-a-ti/index.html',
|
||||
'dist/descargo/index.html',
|
||||
];
|
||||
|
||||
function readRoute(routePath) {
|
||||
return fs.readFileSync(path.resolve(routePath), 'utf-8');
|
||||
}
|
||||
|
||||
function readBuiltCss() {
|
||||
const assetsDir = path.resolve('dist/assets');
|
||||
const cssFiles = fs.readdirSync(assetsDir).filter((file) => file.endsWith('.css'));
|
||||
assert.ok(cssFiles.length > 0, 'dist/assets must contain at least one built CSS file');
|
||||
return cssFiles.map((file) => fs.readFileSync(path.join(assetsDir, file), 'utf-8')).join('\n');
|
||||
}
|
||||
|
||||
function extractBody(html, routePath) {
|
||||
const match = html.match(/<body\b[^>]*>([\s\S]*)<\/body>/i);
|
||||
assert.ok(match, `${routePath}: built HTML must contain a <body> element`);
|
||||
return match[1];
|
||||
}
|
||||
|
||||
function extractFloatingWhatsAppLink(html, routePath) {
|
||||
const match = html.match(/<a\b[^>]*class="[^"]*\bfixed\b[^"]*"[^>]*>[\s\S]*?<\/a>/i);
|
||||
assert.ok(match, `${routePath}: built HTML must contain a floating .fixed WhatsApp link`);
|
||||
return match[0];
|
||||
}
|
||||
|
||||
function hasAccessibleTapTarget(classAttr) {
|
||||
return (
|
||||
/\bpy-(?:1\.5|2|2\.5)\b/.test(classAttr) ||
|
||||
(/\binline-flex\b/.test(classAttr) && /\bmin-h-\[24px\]\b/.test(classAttr))
|
||||
);
|
||||
}
|
||||
|
||||
test('Issue #11 Acceptance Criteria: A11y foundations, contrast, and sticky header', async (t) => {
|
||||
await t.test('Criterion 1a: every built route defines <main id="main">', () => {
|
||||
for (const route of ROUTES) {
|
||||
const html = readRoute(route);
|
||||
assert.match(
|
||||
html,
|
||||
/<main\b[^>]*\bid="main"[^>]*>/i,
|
||||
`${route}: must contain <main id="main">`,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
await t.test(
|
||||
'Criterion 1b: every built route has an <a href="#main"> skip link before the floating WhatsApp link in <body>',
|
||||
() => {
|
||||
for (const route of ROUTES) {
|
||||
const body = extractBody(readRoute(route), route);
|
||||
const skipLinkMatch = /<a\b[^>]*\bhref="#main"[^>]*>[\s\S]*?<\/a>/i.exec(body);
|
||||
assert.ok(skipLinkMatch, `${route}: <body> must contain an <a href="#main"> skip link`);
|
||||
|
||||
const fabMatch = /<a\b[^>]*class="[^"]*\bfixed\b[^"]*"[^>]*>/i.exec(body);
|
||||
assert.ok(fabMatch, `${route}: <body> must contain a floating .fixed WhatsApp link`);
|
||||
|
||||
assert.ok(
|
||||
skipLinkMatch.index < fabMatch.index,
|
||||
`${route}: <a href="#main"> skip link must appear before the floating .fixed WhatsApp link`,
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
await t.test(
|
||||
'Criterion 2: every built route sticky <header> uses bg-ivory/95 instead of bg-sage/15',
|
||||
() => {
|
||||
for (const route of ROUTES) {
|
||||
const html = readRoute(route);
|
||||
const headerOpenTag = html.match(/<header\b[^>]*>/i)?.[0];
|
||||
assert.ok(headerOpenTag, `${route}: must contain a <header> element`);
|
||||
|
||||
assert.match(
|
||||
headerOpenTag,
|
||||
/\bbg-ivory\/95\b/,
|
||||
`${route}: <header> must use bg-ivory/95 for legibility`,
|
||||
);
|
||||
assert.doesNotMatch(
|
||||
headerOpenTag,
|
||||
/\bbg-sage\/15\b/,
|
||||
`${route}: <header> must not use low-contrast bg-sage/15`,
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
await t.test('Criterion 3a: floating WhatsApp FAB does not use low-contrast bg-[#25D366]', () => {
|
||||
for (const route of ROUTES) {
|
||||
const fab = extractFloatingWhatsAppLink(readRoute(route), route);
|
||||
assert.doesNotMatch(
|
||||
fab,
|
||||
/bg-\[#25D366\]/i,
|
||||
`${route}: floating WhatsApp link must not use bg-[#25D366]`,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
await t.test(
|
||||
'Criterion 3b: floating WhatsApp FAB aria-label includes both "Conversar con Azu" and "WhatsApp"',
|
||||
() => {
|
||||
for (const route of ROUTES) {
|
||||
const fab = extractFloatingWhatsAppLink(readRoute(route), route);
|
||||
const ariaLabel = fab.match(/\baria-label="([^"]*)"/i)?.[1];
|
||||
assert.ok(ariaLabel, `${route}: floating WhatsApp link must have an aria-label`);
|
||||
assert.ok(
|
||||
ariaLabel.includes('Conversar con Azu'),
|
||||
`${route}: WhatsApp FAB aria-label must include "Conversar con Azu"`,
|
||||
);
|
||||
assert.ok(
|
||||
ariaLabel.includes('WhatsApp'),
|
||||
`${route}: WhatsApp FAB aria-label must include "WhatsApp"`,
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
await t.test(
|
||||
'Criterion 3c: floating WhatsApp FAB wraps "Conversar con Azu" in <span class="hidden sm:inline"> for a 48x48 mobile circle',
|
||||
() => {
|
||||
for (const route of ROUTES) {
|
||||
const fab = extractFloatingWhatsAppLink(readRoute(route), route);
|
||||
assert.match(
|
||||
fab,
|
||||
/<span\b[^>]*class="[^"]*\bhidden\b[^"]*\bsm:inline\b[^"]*"[^>]*>\s*Conversar con Azu\s*<\/span>/i,
|
||||
`${route}: floating WhatsApp link must wrap "Conversar con Azu" in <span class="hidden sm:inline">`,
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
await t.test(
|
||||
'Criterion 4: <footer> avoids text-forest/60 and includes pb-20 or pb-24 for mobile FAB clearance',
|
||||
() => {
|
||||
for (const route of ROUTES) {
|
||||
const html = readRoute(route);
|
||||
const footerOpenTag = html.match(/<footer\b[^>]*>/i)?.[0];
|
||||
assert.ok(footerOpenTag, `${route}: must contain a <footer> element`);
|
||||
|
||||
assert.doesNotMatch(
|
||||
footerOpenTag,
|
||||
/\btext-forest\/60\b/,
|
||||
`${route}: <footer> must not use low-contrast text-forest/60`,
|
||||
);
|
||||
assert.match(
|
||||
footerOpenTag,
|
||||
/\bpb-(?:20|24)\b/,
|
||||
`${route}: <footer> must include pb-20 or pb-24 to clear the mobile floating button`,
|
||||
);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
await t.test('Criterion 5: built CSS sets --color-gold to #7d5d28 and removes #b08a4f', () => {
|
||||
const css = readBuiltCss();
|
||||
assert.match(css, /--color-gold:\s*#7d5d28\b/i, 'Built CSS must define --color-gold: #7d5d28');
|
||||
assert.doesNotMatch(
|
||||
css,
|
||||
/#b08a4f\b/i,
|
||||
'Built CSS must not contain the old low-contrast #b08a4f gold token',
|
||||
);
|
||||
});
|
||||
|
||||
await t.test(
|
||||
'Criterion 6a: header nav links (#site-menu a) include vertical padding or min-h-[24px] for >= 24px tap targets',
|
||||
() => {
|
||||
for (const route of ROUTES) {
|
||||
const html = readRoute(route);
|
||||
const menuMarkup = html.match(/<ul\b[^>]*\bid="site-menu"[^>]*>[\s\S]*?<\/ul>/i)?.[0];
|
||||
assert.ok(menuMarkup, `${route}: must contain #site-menu`);
|
||||
|
||||
const links = [...menuMarkup.matchAll(/<a\b[^>]*>/gi)].map((match) => match[0]);
|
||||
assert.ok(links.length > 0, `${route}: #site-menu must contain navigation links`);
|
||||
|
||||
for (const link of links) {
|
||||
const classAttr = link.match(/\bclass="([^"]*)"/i)?.[1] ?? '';
|
||||
assert.ok(
|
||||
hasAccessibleTapTarget(classAttr),
|
||||
`${route}: #site-menu link (${link}) must include py-1.5/py-2/py-2.5 or inline-flex min-h-[24px]`,
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
await t.test(
|
||||
'Criterion 6b: footer social links include vertical padding or min-h-[24px] for >= 24px tap targets',
|
||||
() => {
|
||||
for (const route of ROUTES) {
|
||||
const html = readRoute(route);
|
||||
const footerMarkup = html.match(/<footer\b[^>]*>[\s\S]*?<\/footer>/i)?.[0];
|
||||
assert.ok(footerMarkup, `${route}: must contain <footer>`);
|
||||
|
||||
const links = [...footerMarkup.matchAll(/<a\b[^>]*>/gi)].map((match) => match[0]);
|
||||
assert.ok(links.length > 0, `${route}: <footer> must contain social links`);
|
||||
|
||||
for (const link of links) {
|
||||
const classAttr = link.match(/\bclass="([^"]*)"/i)?.[1] ?? '';
|
||||
assert.ok(
|
||||
hasAccessibleTapTarget(classAttr),
|
||||
`${route}: footer link (${link}) must include py-1.5/py-2/py-2.5 or inline-flex min-h-[24px]`,
|
||||
);
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
});
|
||||
@@ -96,15 +96,16 @@ test('Slice 3 Acceptance Criteria: 5-Card Catalog, Brand Tokens & Complementary
|
||||
await t.test(
|
||||
'Criterion 2: Hero & Header Polish (contrast wash, clean subtitle hook, enlarged quote text-sm/md/lg)',
|
||||
() => {
|
||||
// 1. Sticky Navigation Bar with translucent green tint wash
|
||||
// 1. Sticky Navigation Bar with WCAG-legible ivory wash
|
||||
// Why: Issue #11 replaces the low-contrast green tint wash with bg-ivory/95 for dark link legibility.
|
||||
const headerMatch = indexHtml.match(/<header[^>]*class="([^"]*)"/i);
|
||||
assert.ok(headerMatch, 'Header must exist with class attribute');
|
||||
const headerClasses = headerMatch[1];
|
||||
assert.match(headerClasses, /sticky/i, 'Header must be sticky');
|
||||
assert.match(
|
||||
headerClasses,
|
||||
/(bg-sage\/\d+|bg-emerald\/\d+)/i,
|
||||
'Header must use translucent green tint wash (bg-sage/* or bg-emerald/*)',
|
||||
/bg-ivory\/95/i,
|
||||
'Header must use WCAG-legible ivory wash (bg-ivory/95)',
|
||||
);
|
||||
assert.match(headerClasses, /backdrop-blur/i, 'Header must retain backdrop-blur');
|
||||
assert.match(headerClasses, /border-b/i, 'Header must have border-b');
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
<link rel="stylesheet" href="/src/style.css" />
|
||||
</head>
|
||||
<body class="bg-ivory text-forest selection:bg-emerald/20 selection:text-forest">
|
||||
<!-- @include src/partials/whatsapp-fab.html -->
|
||||
|
||||
<!-- @include src/partials/header.html -->
|
||||
|
||||
<main>
|
||||
<!-- @include src/partials/whatsapp-fab.html -->
|
||||
|
||||
<main id="main">
|
||||
<!-- Hero -->
|
||||
<section class="py-12 md:py-20">
|
||||
<div class="mx-auto grid max-w-6xl items-center gap-12 px-6 md:grid-cols-12">
|
||||
@@ -462,7 +462,7 @@
|
||||
<div class="mt-6">
|
||||
<a
|
||||
href="#inscripcion"
|
||||
class="block w-full rounded-full border border-emerald px-6 py-3 text-center text-sm font-semibold text-emerald transition hover:bg-emerald hover:text-ivory"
|
||||
class="block w-full scroll-mt-24 rounded-full border border-emerald px-6 py-3 text-center text-sm font-semibold text-emerald transition hover:bg-emerald hover:text-ivory"
|
||||
>
|
||||
Ir a inscripción →
|
||||
</a>
|
||||
@@ -523,7 +523,7 @@
|
||||
<div class="mt-6">
|
||||
<a
|
||||
href="#inscripcion"
|
||||
class="block w-full rounded-full bg-emerald px-6 py-3 text-center text-sm font-semibold text-ivory transition hover:bg-forest"
|
||||
class="block w-full scroll-mt-24 rounded-full bg-emerald px-6 py-3 text-center text-sm font-semibold text-ivory transition hover:bg-forest"
|
||||
>
|
||||
Ir a inscripción →
|
||||
</a>
|
||||
|
||||
Reference in new issue
Block a user