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:
Zaldimmar 2026-09-28 22:07:56 -05:00
parent 5274e09571
commit 185f9831e2
61 changed files with 310 additions and 207 deletions

View file

@ -19,7 +19,7 @@ import { Link } from "react-router-dom";
import { ApiError, del, get, post } from "../../lib/api.ts";
const TEAL = "#138ba0";
const TEAL = "#0f7183";
const MUTED = "#4a6b72";
const POLL_MS = 2000;
@ -81,9 +81,9 @@ function sizeOf(bytes: number | null): string {
}
const button =
"rounded-full border border-[#138ba0] px-4 py-2 text-sm font-semibold text-[#138ba0] transition-colors hover:bg-[#eef9fb] disabled:cursor-default disabled:opacity-50";
"rounded-full border border-[#138ba0] px-4 py-2 text-sm font-semibold text-[#0f7183] transition-colors hover:bg-[#eef9fb] disabled:cursor-default disabled:opacity-50";
const primary =
"rounded-full bg-[#138ba0] px-5 py-2.5 font-semibold text-white transition-colors hover:bg-[#0f7183] disabled:bg-[#4a6b72]/25";
"rounded-full bg-[#0f7183] px-5 py-2.5 font-semibold text-white transition-colors hover:bg-[#0b5c6a] disabled:bg-[#4a6b72]/25";
const input =
"rounded-lg border border-[#4a6b72]/25 bg-white px-3 py-2 text-sm text-[#26454c] outline-none focus:border-[#138ba0] focus:ring-2 focus:ring-[#138ba0]/25";
@ -103,7 +103,7 @@ function Status({ job }: { job: Job }) {
return (
<div className="mt-2">
<div className="h-2 overflow-hidden rounded-full bg-[#eef9fb]">
<div className="h-full bg-[#138ba0] transition-all" style={{ width: `${job.status === "queued" ? 0 : percent}%` }} />
<div className="h-full bg-[#0f7183] transition-all" style={{ width: `${job.status === "queued" ? 0 : percent}%` }} />
</div>
<p className="mt-1 text-xs" style={{ color: MUTED }}>
{job.status === "queued" ? "Waiting its turn…" : `${percent}%`}
@ -368,7 +368,7 @@ export default function AdminClips() {
return (
<div>
<div className="flex flex-wrap items-baseline gap-3">
<h1 className="text-2xl font-bold text-[#138ba0]">Video clips</h1>
<h1 className="text-2xl font-bold text-[#0f7183]">Video clips</h1>
<p className="text-sm" style={{ color: MUTED }}>
Cut clips from our YouTube and Facebook videos, for Reels, Shorts, the site or a podcast.
</p>

View file

@ -28,8 +28,8 @@ import { feedbackTypeLabel } from "../../data/feedbackTypes.ts";
const STATUSES = ["new", "read", "actioned", "archived", "spam"];
const STATUS_STYLE = {
new: "bg-[#138ba0] text-white",
read: "bg-[#eef9fb] text-[#138ba0]",
new: "bg-[#0f7183] text-white",
read: "bg-[#eef9fb] text-[#0f7183]",
actioned: "bg-[#eaf3e2] text-[#4a6b2f]",
archived: "bg-[#4a6b72]/10 text-[#4a6b72]",
spam: "bg-[#fdf3f2] text-[#b3261e]",
@ -117,7 +117,7 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
{row.email && (
<a
href={`mailto:${row.email}?subject=Your%20NGU%20site%20feedback`}
className="text-[#138ba0] underline underline-offset-2"
className="text-[#0f7183] underline underline-offset-2"
>
{row.email}
</a>
@ -165,7 +165,7 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
type="button"
disabled={busy}
onClick={() => save({ admin_note: note })}
className="mt-2 rounded-full bg-[#138ba0] px-4 py-1.5 text-sm font-semibold text-white transition-colors hover:bg-[#0f7183] disabled:bg-[#4a6b72]/25"
className="mt-2 rounded-full bg-[#0f7183] px-4 py-1.5 text-sm font-semibold text-white transition-colors hover:bg-[#0b5c6a] disabled:bg-[#4a6b72]/25"
>
{busy ? "Saving…" : "Save note"}
</button>
@ -305,7 +305,7 @@ export default function AdminFeedback() {
return (
<div>
<h1 className="text-3xl font-bold text-[#138ba0]">Feedback</h1>
<h1 className="text-3xl font-bold text-[#0f7183]">Feedback</h1>
<p className="mt-2 text-sm text-[#4a6b72]">
{canWrite
? "Everything submitted through the site form."
@ -322,7 +322,7 @@ export default function AdminFeedback() {
className={
"rounded-full px-4 py-1.5 text-sm transition-colors " +
(status === tab.id
? "bg-[#138ba0] font-semibold text-white"
? "bg-[#0f7183] font-semibold text-white"
: "border border-[#4a6b72]/25 text-[#4a6b72] hover:border-[#138ba0]/50")
}
>
@ -387,7 +387,7 @@ export default function AdminFeedback() {
<button
type="button"
onClick={() => load(cursor)}
className="mt-6 rounded-full border border-[#138ba0] px-5 py-2 font-semibold text-[#138ba0] transition-colors hover:bg-[#eef9fb]"
className="mt-6 rounded-full border border-[#138ba0] px-5 py-2 font-semibold text-[#0f7183] transition-colors hover:bg-[#eef9fb]"
>
Load older
</button>

View file

@ -36,7 +36,7 @@ function NavCard({ item }) {
return (
<div className="group relative flex flex-col rounded-2xl border border-[#138ba0]/20 bg-white p-5 transition-all hover:border-[#138ba0]/60 hover:shadow-sm">
<div className="flex items-baseline gap-3">
<h3 className="text-base font-semibold text-[#138ba0]">
<h3 className="text-base font-semibold text-[#0f7183]">
<Link
to={to}
className="after:absolute after:inset-0 after:rounded-2xl after:content-['']"
@ -46,7 +46,7 @@ function NavCard({ item }) {
</h3>
<span
aria-hidden="true"
className="ml-auto text-[#138ba0] opacity-0 transition-opacity group-hover:opacity-100"
className="ml-auto text-[#0f7183] opacity-0 transition-opacity group-hover:opacity-100"
>
→
</span>
@ -62,7 +62,7 @@ function NavCard({ item }) {
<Link
key={child.to}
to={child.to}
className="text-[#4a6b72] underline-offset-4 transition-colors hover:text-[#138ba0] hover:underline"
className="text-[#4a6b72] underline-offset-4 transition-colors hover:text-[#0f7183] hover:underline"
>
{child.label}
</Link>
@ -77,7 +77,7 @@ function CardBlock({ title, blurb, children }) {
return (
<div className="mt-10">
<div className="flex items-baseline gap-3">
<h2 className="text-lg font-semibold text-[#138ba0]">{title}</h2>
<h2 className="text-lg font-semibold text-[#0f7183]">{title}</h2>
{blurb && <p className="text-sm text-[#4a6b72]">{blurb}</p>}
</div>
<div className="mt-4 grid gap-4 sm:grid-cols-2">{children}</div>
@ -114,7 +114,7 @@ export default function AdminHome() {
return (
<div className="grid gap-8 lg:grid-cols-[1fr_17rem] lg:items-start">
<div>
<h1 className="text-2xl font-bold text-[#138ba0]">
<h1 className="text-2xl font-bold text-[#0f7183]">
{user?.name ? `Welcome back, ${user.name.split(" ")[0]}.` : "Welcome back."}
</h1>
<p className="mt-1 text-[#4a6b72]">Pick a section to work in.</p>
@ -144,7 +144,7 @@ export default function AdminHome() {
<p className="mt-0.5 break-all text-xs text-[#4a6b72]/80">{user.email}</p>
)}
{role && (
<span className="mt-2 inline-block rounded-full bg-[#eef9fb] px-2.5 py-0.5 text-xs font-medium text-[#138ba0]">
<span className="mt-2 inline-block rounded-full bg-[#eef9fb] px-2.5 py-0.5 text-xs font-medium text-[#0f7183]">
{role}
</span>
)}
@ -156,7 +156,7 @@ export default function AdminHome() {
<li key={link.to}>
<Link
to={link.to}
className="underline-offset-4 transition-colors hover:text-[#138ba0] hover:underline"
className="underline-offset-4 transition-colors hover:text-[#0f7183] hover:underline"
>
{link.label}
</Link>
@ -171,7 +171,7 @@ export default function AdminHome() {
href="/"
target="_blank"
rel="noreferrer"
className="mt-2 inline-block underline-offset-4 transition-colors hover:text-[#138ba0] hover:underline"
className="mt-2 inline-block underline-offset-4 transition-colors hover:text-[#0f7183] hover:underline"
>
View the public site ↗
</a>

View file

@ -45,8 +45,8 @@ import {
function GroupMenu({ item, lit, pathname }) {
const children = item.children ?? [];
const link = lit
? "font-semibold text-[#138ba0]"
: "text-[#4a6b72] transition-colors hover:text-[#138ba0]";
? "font-semibold text-[#0f7183]"
: "text-[#4a6b72] transition-colors hover:text-[#0f7183]";
return (
<div className="group relative">
@ -68,7 +68,7 @@ function GroupMenu({ item, lit, pathname }) {
to={child.to}
className={`block rounded-lg px-3 py-2 text-sm transition-colors hover:bg-[#eef9fb] ${
matches(pathname, child.to)
? "font-semibold text-[#138ba0]"
? "font-semibold text-[#0f7183]"
: "text-[#26454c]"
}`}
>
@ -130,7 +130,7 @@ export default function AdminLayout() {
const subnav = active?.children ?? [];
const wordmark = <span className="text-lg font-bold text-[#138ba0]">{areaTitle}</span>;
const wordmark = <span className="text-lg font-bold text-[#0f7183]">{areaTitle}</span>;
return (
<div className="flex min-h-screen flex-col bg-[#f6fbfc]">
@ -172,7 +172,7 @@ export default function AdminLayout() {
<button
type="button"
onClick={handleLogout}
className="rounded-full border border-[#4a6b72]/30 px-4 py-1.5 font-medium transition-colors hover:bg-[#eef9fb] hover:text-[#138ba0]"
className="rounded-full border border-[#4a6b72]/30 px-4 py-1.5 font-medium transition-colors hover:bg-[#eef9fb] hover:text-[#0f7183]"
>
Sign out
</button>
@ -190,8 +190,8 @@ export default function AdminLayout() {
to={child.to}
className={
child === activeChild
? "font-semibold text-[#138ba0]"
: "text-[#4a6b72] transition-colors hover:text-[#138ba0]"
? "font-semibold text-[#0f7183]"
: "text-[#4a6b72] transition-colors hover:text-[#0f7183]"
}
>
{child.label}

View file

@ -87,7 +87,7 @@ export default function AdminLogin() {
return (
<div className="flex min-h-screen items-center justify-center bg-[#eef9fb] px-6 py-16">
<div className="w-full max-w-sm">
<h1 className="text-3xl font-bold text-[#138ba0]">NGU admin</h1>
<h1 className="text-3xl font-bold text-[#0f7183]">NGU admin</h1>
<p className="mt-2 text-sm text-[#4a6b72]">
Sign in to edit the site.
</p>
@ -162,7 +162,7 @@ export default function AdminLogin() {
<button
type="submit"
disabled={busy || !email || !password}
className="mt-6 w-full rounded-full bg-[#138ba0] px-6 py-3 font-semibold text-white transition-colors hover:bg-[#0f7183] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#138ba0]/40 disabled:cursor-not-allowed disabled:bg-[#4a6b72]/25"
className="mt-6 w-full rounded-full bg-[#0f7183] px-6 py-3 font-semibold text-white transition-colors hover:bg-[#0b5c6a] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#138ba0]/40 disabled:cursor-not-allowed disabled:bg-[#4a6b72]/25"
>
{busy ? "Signing in…" : "Sign in"}
</button>

View file

@ -113,7 +113,7 @@ function CopyPath({ url }: { url: string }) {
setTimeout(() => setCopied(false), 1500);
});
}}
className="text-xs text-[#138ba0] hover:underline"
className="text-xs text-[#0f7183] hover:underline"
>
{copied ? "Copied" : "Copy path"}
</button>
@ -128,7 +128,7 @@ export default function AdminMedia() {
return (
<div>
<div className="flex flex-wrap items-baseline gap-3">
<h1 className="text-2xl font-bold text-[#138ba0]">Media</h1>
<h1 className="text-2xl font-bold text-[#0f7183]">Media</h1>
<p className="text-sm text-[#4a6b72]">
Uploaded images. Image fields in every editor pick from here.
</p>
@ -169,7 +169,7 @@ export default function AdminMedia() {
href={item.url}
target="_blank"
rel="noreferrer"
className="text-xs text-[#138ba0] hover:underline"
className="text-xs text-[#0f7183] hover:underline"
>
Open
</a>

View file

@ -54,7 +54,7 @@ function Block({ title, note, children }: any) {
return (
<section className="mt-8 first:mt-0">
<div className="flex items-baseline gap-3">
<h2 className="text-lg font-semibold text-[#138ba0]">{title}</h2>
<h2 className="text-lg font-semibold text-[#0f7183]">{title}</h2>
{note && <p className="text-sm text-[#4a6b72]">{note}</p>}
</div>
<div className="mt-3">{children}</div>
@ -156,7 +156,7 @@ export default function AdminPanel() {
<button
type="button"
onClick={load}
className="mt-3 rounded-full border border-[#138ba0] px-4 py-1.5 text-sm font-medium text-[#138ba0] transition-colors hover:bg-[#eef9fb]"
className="mt-3 rounded-full border border-[#138ba0] px-4 py-1.5 text-sm font-medium text-[#0f7183] transition-colors hover:bg-[#eef9fb]"
>
Try again
</button>
@ -171,7 +171,7 @@ export default function AdminPanel() {
return (
<div>
<h1 className="text-2xl font-bold text-[#138ba0]">Panel</h1>
<h1 className="text-2xl font-bold text-[#0f7183]">Panel</h1>
<p className="mt-1 text-[#4a6b72]">
Accounts and server state. Everything here is superadmin-only.
</p>
@ -281,7 +281,7 @@ export default function AdminPanel() {
type="button"
disabled={busy}
onClick={() => revoke(row)}
className="ml-3 text-xs font-medium text-[#138ba0] underline-offset-4 hover:underline disabled:opacity-50"
className="ml-3 text-xs font-medium text-[#0f7183] underline-offset-4 hover:underline disabled:opacity-50"
>
Sign out
</button>
@ -296,7 +296,7 @@ export default function AdminPanel() {
className={`rounded-full border px-3 py-1 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${
row.is_active
? "border-[#4a6b72]/30 text-[#4a6b72] hover:border-[#b3261e]/50 hover:text-[#b3261e]"
: "border-[#138ba0]/40 text-[#138ba0] hover:bg-[#eef9fb]"
: "border-[#138ba0]/40 text-[#0f7183] hover:bg-[#eef9fb]"
}`}
>
{row.is_active ? "Disable" : "Enable"}

View file

@ -356,13 +356,13 @@ export default function EntityEdit() {
<button
type="button"
onClick={() => leave(`/admin/${manifest.key}`)}
className="text-sm text-[#4a6b72] hover:text-[#138ba0]"
className="text-sm text-[#4a6b72] hover:text-[#0f7183]"
>
← {manifest.label}
</button>
)}
<h1 className="mt-2 text-3xl font-bold text-[#138ba0]">
<h1 className="mt-2 text-3xl font-bold text-[#0f7183]">
{isNew ? `New ${manifest.singular}` : heading}
</h1>
@ -478,7 +478,7 @@ export default function EntityEdit() {
type="button"
onClick={save}
disabled={saving || !dirty}
className="rounded-full bg-[#138ba0] px-6 py-2 font-semibold text-white transition-colors hover:bg-[#0f7183] disabled:bg-[#4a6b72]/25"
className="rounded-full bg-[#0f7183] px-6 py-2 font-semibold text-white transition-colors hover:bg-[#0b5c6a] disabled:bg-[#4a6b72]/25"
>
{saving ? "Saving…" : isNew ? "Create" : "Save changes"}
</button>
@ -506,7 +506,7 @@ export default function EntityEdit() {
<span
role="status"
className={`flex items-center gap-2 text-sm ${
message.tone === "ok" ? "text-[#138ba0]" : "text-[#b3261e]"
message.tone === "ok" ? "text-[#0f7183]" : "text-[#b3261e]"
}`}
>
{message.text}

View file

@ -39,6 +39,9 @@ export default function EntityList() {
// well as editors, which is the failure mode an == against a
// ladder always produces once a rank is added above it.
const canWrite = atLeast(user, manifest?.writeRole ?? "editor");
// The cell that carries the row's link: the primary column, else the first.
const columns = manifest?.list.columns ?? [];
const linkKey = (columns.find((c) => c.primary) ?? columns[0])?.key;
const load = useCallback(async () => {
if (!manifest || manifest.singleton) return;
@ -89,11 +92,11 @@ export default function EntityList() {
return (
<div>
<div className="flex flex-wrap items-center gap-4">
<h1 className="text-3xl font-bold text-[#138ba0]">{manifest.label}</h1>
<h1 className="text-3xl font-bold text-[#0f7183]">{manifest.label}</h1>
{canWrite && (
<Link
to={`/admin/${manifest.key}/new`}
className="ml-auto rounded-full bg-[#138ba0] px-4 py-2 text-sm font-semibold text-white transition-colors hover:bg-[#0f7183]"
className="ml-auto rounded-full bg-[#0f7183] px-4 py-2 text-sm font-semibold text-white transition-colors hover:bg-[#0b5c6a]"
>
New {manifest.singular}
</Link>
@ -162,6 +165,8 @@ export default function EntityList() {
</tr>
</thead>
<tbody>
{/* The row click is for the mouse; the link in the primary
cell is what a keyboard or screen reader uses. */}
{rows.map((row) => (
<tr
key={row.id}
@ -175,11 +180,23 @@ export default function EntityList() {
column.primary ? "font-medium text-[#26454c]" : "text-[#4a6b72]"
}`}
>
{column.widget === "bool"
? row[column.key]
? "Yes"
: "-"
: row[column.key] || "-"}
{column.key === linkKey ? (
<Link
to={`/admin/${manifest.key}/${row.id}`}
onClick={(e) => e.stopPropagation()}
className="hover:underline"
>
{row[column.key] || row.id}
</Link>
) : column.widget === "bool" ? (
row[column.key] ? (
"Yes"
) : (
"-"
)
) : (
row[column.key] || "-"
)}
</td>
))}
<td className="px-4 py-3 font-mono text-xs text-[#4a6b72]">{row.id}</td>