Fix accessibility found in the audit
- Text contrast: teal text and button fills use #0f7183 (5.7:1), section accents darkened to pass on white, solid CTA buttons instead of the gradient, footer and subnav text raised to white/65, event and region colours kept on borders and swatches with ink text - Hidden carousel slides and collapsed past events are inert - Admin list rows carry a real link for keyboard use - Mobile menu is a modal dialog: focus, Escape, inert background, above the header - Skip to content link, one focus-visible ring, reduced-motion rule, focus rings on the calendar inputs - Region headings hold their button instead of sitting inside it - font-700 style classes (not Tailwind v4 utilities) replaced with named weights, and the 700/800 font files loaded - Migration 038: alt text for blog covers and schedule graphics; event logos next to their title are decorative - Drop the Church Center script from index.html; Giving loads it itself Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5274e09571
commit
185f9831e2
61 changed files with 310 additions and 207 deletions
|
|
@ -43,7 +43,7 @@ const BODY = '#4a6b72'
|
|||
|
||||
export default function ContentBlocks({
|
||||
blocks,
|
||||
accent = '#138ba0',
|
||||
accent = '#0f7183',
|
||||
className = '',
|
||||
}: {
|
||||
blocks?: ContentBlock[] | null
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ function Card({ card }: { card: FeaturedCard }) {
|
|||
const text = (
|
||||
<div className="flex flex-1 flex-col p-6">
|
||||
{card.eyebrow && (
|
||||
<p className="text-xs font-bold uppercase tracking-[0.2em] text-[#138ba0]">{card.eyebrow}</p>
|
||||
<p className="text-xs font-bold uppercase tracking-[0.2em] text-[#0f7183]">{card.eyebrow}</p>
|
||||
)}
|
||||
{card.title && (
|
||||
<h3 className="mt-2 font-display text-xl font-extrabold leading-snug text-[#073d4a]">
|
||||
|
|
|
|||
|
|
@ -40,13 +40,13 @@ const Footer_Links = [
|
|||
];
|
||||
|
||||
const footerLinkClass =
|
||||
"text-white/40 hover:text-[#aac992] text-sm transition-colors";
|
||||
"text-white/65 hover:text-[#aac992] text-sm transition-colors";
|
||||
|
||||
const pageLinkClass =
|
||||
"text-white/80 hover:text-[#aac992] text-sm font-semibold transition-colors";
|
||||
|
||||
const sectionLinkClass =
|
||||
"text-white/45 hover:text-[#aac992] text-sm transition-colors";
|
||||
"text-white/65 hover:text-[#aac992] text-sm transition-colors";
|
||||
|
||||
const headingClass = "text-white/90 text-sm font-semibold mb-4";
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ export default function Footer() {
|
|||
<br />
|
||||
{Organization_Details.cityLine}
|
||||
<br />
|
||||
<span className="text-white/40">({Organization_Details.addressNote})</span>
|
||||
<span className="text-white/65">({Organization_Details.addressNote})</span>
|
||||
</address>
|
||||
<p className="mt-3 max-w-xl text-sm leading-relaxed text-white/60">
|
||||
{Organization_Details.nonprofit} Tax ID: {Organization_Details.taxId}.
|
||||
|
|
@ -111,7 +111,7 @@ export default function Footer() {
|
|||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-block mt-8 px-6 py-2.5 rounded-full text-sm font-bold text-white whitespace-nowrap transition-all duration-200 hover:scale-105"
|
||||
style={{ background: "linear-gradient(135deg, #008fa8, #88b668)" }}
|
||||
style={{ background: "#0f7183" }}
|
||||
>
|
||||
Support Us
|
||||
</a>
|
||||
|
|
@ -161,7 +161,7 @@ export default function Footer() {
|
|||
</div>
|
||||
|
||||
<div className="border-t border-white/10 pt-8 flex flex-col md:flex-row items-center justify-between gap-4">
|
||||
<p className="text-white/40 text-sm">© 2026 Next Generation of Unity. All rights reserved.</p>
|
||||
<p className="text-white/65 text-sm">© 2026 Next Generation of Unity. All rights reserved.</p>
|
||||
<div className="flex gap-6">
|
||||
{Footer_Links.map((link) => (
|
||||
<Link key={link.label} to={link.to} className={footerLinkClass}>
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ const ACTION_VARIANTS: Record<
|
|||
},
|
||||
fancy: {
|
||||
className: "font-bold text-white hover:scale-105",
|
||||
style: { background: "linear-gradient(135deg, #008fa8, #88b668)" },
|
||||
style: { background: "#0f7183" },
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -73,6 +73,7 @@ export default function Layout() {
|
|||
const [activeSection, setActiveSection] = useState<string | null>(null);
|
||||
const [headerHeight, setHeaderHeight] = useState(72);
|
||||
const headerRef = useRef<HTMLElement>(null);
|
||||
const closeMenuRef = useRef<HTMLButtonElement>(null);
|
||||
const location = useLocation();
|
||||
|
||||
const sections = PAGE_SECTIONS[location.pathname] ?? [];
|
||||
|
|
@ -84,6 +85,16 @@ export default function Layout() {
|
|||
setActiveSection(null);
|
||||
}, [location.pathname]);
|
||||
|
||||
// The open menu is modal: focus starts on its close button, Escape
|
||||
// shuts it, and everything behind it is inert (below).
|
||||
useEffect(() => {
|
||||
if (!mobileMenuOpen) return;
|
||||
closeMenuRef.current?.focus();
|
||||
const onKey = (e: KeyboardEvent) => e.key === "Escape" && setMobileMenuOpen(false);
|
||||
window.addEventListener("keydown", onKey);
|
||||
return () => window.removeEventListener("keydown", onKey);
|
||||
}, [mobileMenuOpen]);
|
||||
|
||||
// The header grows and shrinks: the banner can be dismissed and the
|
||||
// subnav only exists on some pages. Measure it instead of guessing,
|
||||
// so the spacer below always matches.
|
||||
|
|
@ -140,11 +151,18 @@ export default function Layout() {
|
|||
|
||||
return (
|
||||
<div className="min-h-screen overflow-x-hidden">
|
||||
<a
|
||||
href="#main"
|
||||
className="sr-only focus:not-sr-only focus:fixed focus:top-2 focus:left-2 focus:z-[70] focus:rounded-full focus:bg-white focus:px-4 focus:py-2 focus:font-semibold focus:text-[#073d4a]"
|
||||
>
|
||||
Skip to content
|
||||
</a>
|
||||
|
||||
{/* ── NAV ─────────────────────────────────────────────── */}
|
||||
<header
|
||||
ref={headerRef}
|
||||
className="fixed top-0 left-0 right-0 z-50 backdrop-blur-md"
|
||||
inert={mobileMenuOpen}
|
||||
>
|
||||
|
||||
{/* Tier 0, site-wide announcement */}
|
||||
|
|
@ -211,7 +229,7 @@ export default function Layout() {
|
|||
borderBottom: "1px solid rgba(45,200,224,0.15)",
|
||||
}}
|
||||
>
|
||||
<span className="text-xs text-white/45">{activePage?.label}</span>
|
||||
<span className="text-xs text-white/65">{activePage?.label}</span>
|
||||
|
||||
{/* Separates the page label from its sections */}
|
||||
<span
|
||||
|
|
@ -244,20 +262,26 @@ export default function Layout() {
|
|||
<div aria-hidden style={{ height: headerHeight }} />
|
||||
|
||||
{/* Page content */}
|
||||
<main>
|
||||
<main id="main" tabIndex={-1} className="outline-none" inert={mobileMenuOpen}>
|
||||
<Outlet />
|
||||
</main>
|
||||
|
||||
{/*Site Footer applied to every page*/}
|
||||
<Footer />
|
||||
<div inert={mobileMenuOpen}>
|
||||
<Footer />
|
||||
</div>
|
||||
|
||||
{/* Mobile menu */}
|
||||
{mobileMenuOpen && (
|
||||
<div
|
||||
className="fixed inset-0 z-40 flex flex-col items-center justify-center overflow-y-auto py-16"
|
||||
className="fixed inset-0 z-[60] flex flex-col items-center justify-center overflow-y-auto py-16"
|
||||
style={{ background: "rgba(7,61,74,0.97)" }}
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
aria-label="Menu"
|
||||
>
|
||||
<button
|
||||
ref={closeMenuRef}
|
||||
className="absolute top-5 right-6 text-white text-3xl"
|
||||
aria-label="Close menu"
|
||||
onClick={() => setMobileMenuOpen(false)}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
title: "Local Chapters",
|
||||
blurb: "Optional line under the section heading.",
|
||||
accent: "#138ba0", // heading, banner, rule
|
||||
accent: "#0f7183", // heading, banner, rule
|
||||
background: "#eef9fb",
|
||||
actions: <SomeButton />, // optional, right of the heading
|
||||
content: <YourStuff />,
|
||||
|
|
@ -33,7 +33,7 @@ import { useEffect, type ReactNode } from "react";
|
|||
|
||||
import { documentTitle } from "../lib/site.ts";
|
||||
|
||||
const TEAL = "#138ba0";
|
||||
const TEAL = "#0f7183";
|
||||
|
||||
export type ShellSection = {
|
||||
id: string;
|
||||
|
|
@ -75,7 +75,7 @@ export function Section({ section }: { section: ShellSection }) {
|
|||
<div className="max-w-6xl mx-auto px-6 mb-10">
|
||||
<div className="flex flex-wrap items-end justify-between gap-4">
|
||||
<div>
|
||||
<h2 className="text-4xl md:text-5xl font-800" style={{ color: accent }}>
|
||||
<h2 className="text-4xl md:text-5xl font-extrabold" style={{ color: accent }}>
|
||||
{title}
|
||||
</h2>
|
||||
{blurb && <p className="mt-2 text-[#4a6b72] max-w-xl">{blurb}</p>}
|
||||
|
|
@ -103,7 +103,7 @@ export default function PageShell({ title, intro, sections }: PageShellProps) {
|
|||
{/* Page header */}
|
||||
<div className="pt-24 pb-12 px-6" style={{ background: "#eef9fb" }}>
|
||||
<div className="max-w-6xl mx-auto">
|
||||
<h1 className="text-5xl md:text-6xl font-800" style={{ color: TEAL }}>
|
||||
<h1 className="text-5xl md:text-6xl font-extrabold" style={{ color: TEAL }}>
|
||||
{title}
|
||||
</h1>
|
||||
{intro && <p className="mt-3 text-lg text-[#4a6b72] max-w-2xl">{intro}</p>}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
import { Link } from 'react-router-dom'
|
||||
import PageShell from './PageShell.tsx'
|
||||
|
||||
const TEAL = '#138ba0'
|
||||
const TEAL = '#0f7183'
|
||||
const BODY = '#4a6b72'
|
||||
|
||||
export default function PageState({
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
--pl-radius: 3px;
|
||||
|
||||
/* color */
|
||||
--pl-accent: #138ba0;
|
||||
--pl-accent: #0f7183;
|
||||
--pl-frame-bg: #fff;
|
||||
--pl-frame-edge: rgba(15, 23, 42, 0.1);
|
||||
--pl-photo-bg: #e7edef;
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ function Avatar({ person, size }: { person: NonNullable<ContentBlockItem['person
|
|||
) : (
|
||||
<span
|
||||
aria-hidden="true"
|
||||
className={`${size} flex shrink-0 items-center justify-center rounded-full bg-[#eef9fb] text-xs font-bold text-[#138ba0]`}
|
||||
className={`${size} flex shrink-0 items-center justify-center rounded-full bg-[#eef9fb] text-xs font-bold text-[#0f7183]`}
|
||||
>
|
||||
{initials(person.name)}
|
||||
</span>
|
||||
|
|
@ -165,7 +165,7 @@ function Entry({ entry, accent }: { entry: ContentBlockItem; accent: string }) {
|
|||
</div>
|
||||
)}
|
||||
|
||||
{graphic && <img src={graphic} alt="" loading="lazy" className="w-full rounded-lg" />}
|
||||
{graphic && <img src={graphic} alt={entry.media_alt ?? ""} loading="lazy" className="w-full rounded-lg" />}
|
||||
|
||||
{place && (
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import { useState } from 'react'
|
|||
import HomeLink from '../pages/sections/home/HomeLink.tsx'
|
||||
import { playingSource, videoSource, videoThumbnail } from '../lib/embeds.ts'
|
||||
|
||||
const ACCENT = '#138ba0'
|
||||
const ACCENT = '#0f7183'
|
||||
|
||||
export default function VideoPlayer({
|
||||
url,
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ export type MediaItem = {
|
|||
};
|
||||
|
||||
const button =
|
||||
"rounded-full border border-[#138ba0] px-3 py-1 text-sm font-medium text-[#138ba0] " +
|
||||
"rounded-full border border-[#138ba0] px-3 py-1 text-sm font-medium text-[#0f7183] " +
|
||||
"transition-colors hover:bg-[#eef9fb] disabled:cursor-default disabled:opacity-50";
|
||||
|
||||
/* A light checkerboard, so a white logo on a transparent background
|
||||
|
|
@ -172,7 +172,7 @@ export function UploadButton({
|
|||
type="checkbox"
|
||||
checked={keepOriginal}
|
||||
onChange={(e) => setKeepOriginal(e.target.checked)}
|
||||
className="h-3.5 w-3.5 rounded border-[#4a6b72]/40 text-[#138ba0]"
|
||||
className="h-3.5 w-3.5 rounded border-[#4a6b72]/40 text-[#0f7183]"
|
||||
/>
|
||||
Keep original
|
||||
</label>
|
||||
|
|
@ -293,7 +293,7 @@ export function MediaPicker({
|
|||
>
|
||||
<div className="flex max-h-[85vh] flex-col">
|
||||
<div className="flex flex-wrap items-center gap-3 border-b border-[#138ba0]/15 px-5 py-4">
|
||||
<h2 className="text-lg font-semibold text-[#138ba0]">Choose an image</h2>
|
||||
<h2 className="text-lg font-semibold text-[#0f7183]">Choose an image</h2>
|
||||
<input
|
||||
type="search"
|
||||
value={query}
|
||||
|
|
@ -498,7 +498,7 @@ export function LinkPreviewInput({
|
|||
{busy ? "Fetching…" : "Fetch preview"}
|
||||
</button>
|
||||
{note && (
|
||||
<span className={`text-xs ${note.tone === "ok" ? "text-[#138ba0]" : "text-[#b3261e]"}`}>
|
||||
<span className={`text-xs ${note.tone === "ok" ? "text-[#0f7183]" : "text-[#b3261e]"}`}>
|
||||
{note.text}
|
||||
</span>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -101,8 +101,8 @@ export function SectionNav({ sections }: { sections: EditorSection[] }) {
|
|||
aria-current={lit ? "location" : undefined}
|
||||
className={`-ml-px flex w-full items-center gap-1.5 border-l-2 px-3 py-1.5 text-left text-sm transition-colors ${
|
||||
lit
|
||||
? "border-[#138ba0] font-semibold text-[#138ba0]"
|
||||
: "border-transparent text-[#4a6b72] hover:border-[#138ba0]/40 hover:text-[#138ba0]"
|
||||
? "border-[#138ba0] font-semibold text-[#0f7183]"
|
||||
: "border-transparent text-[#4a6b72] hover:border-[#138ba0]/40 hover:text-[#0f7183]"
|
||||
}`}
|
||||
>
|
||||
<Label section={section} />
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ export function Field({ field, value, row, options, error, onChange, onPatch }:
|
|||
checked={value === 1 || value === true}
|
||||
disabled={locked}
|
||||
onChange={(e) => onChange(e.target.checked ? 1 : 0)}
|
||||
className="h-4 w-4 rounded border-[#4a6b72]/40 text-[#138ba0] focus:ring-[#138ba0]/40 disabled:opacity-50"
|
||||
className="h-4 w-4 rounded border-[#4a6b72]/40 text-[#0f7183] focus:ring-[#138ba0]/40 disabled:opacity-50"
|
||||
/>
|
||||
{helpText(field, row) ?? "Yes"}
|
||||
</label>
|
||||
|
|
@ -478,14 +478,14 @@ export function Repeater({
|
|||
<button
|
||||
type="button"
|
||||
onClick={() => setOpen(new Set(list.map((_, i) => i)))}
|
||||
className="hover:text-[#138ba0] hover:underline"
|
||||
className="hover:text-[#0f7183] hover:underline"
|
||||
>
|
||||
Expand all
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setOpen(new Set())}
|
||||
className="hover:text-[#138ba0] hover:underline"
|
||||
className="hover:text-[#0f7183] hover:underline"
|
||||
>
|
||||
Collapse all
|
||||
</button>
|
||||
|
|
@ -494,7 +494,7 @@ export function Repeater({
|
|||
<button
|
||||
type="button"
|
||||
onClick={add}
|
||||
className="ml-auto rounded-full border border-[#138ba0] px-3 py-1 text-sm font-medium text-[#138ba0] transition-colors hover:bg-[#eef9fb]"
|
||||
className="ml-auto rounded-full border border-[#138ba0] px-3 py-1 text-sm font-medium text-[#0f7183] transition-colors hover:bg-[#eef9fb]"
|
||||
>
|
||||
{spec.addLabel ?? "Add"}
|
||||
</button>
|
||||
|
|
@ -565,7 +565,7 @@ export function Repeater({
|
|||
type="button"
|
||||
onClick={() => toggle(index)}
|
||||
aria-expanded={expanded}
|
||||
className="flex min-w-0 flex-1 items-center gap-2 text-left text-sm font-medium text-[#26454c] hover:text-[#138ba0]"
|
||||
className="flex min-w-0 flex-1 items-center gap-2 text-left text-sm font-medium text-[#26454c] hover:text-[#0f7183]"
|
||||
>
|
||||
<span
|
||||
aria-hidden="true"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue