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

@ -49,7 +49,8 @@ function Logo({ src, alt = "", className }) {
);
}
const TEAL = "#138ba0"; // last-resort card color
const TEAL = "#0f7183"; // last-resort card color
const INK = "#073d4a"; // button text: the card colour is only a border
const CARD_BG = "#ffffff"; // sits under every card, gradient or not
/* Laid over a card's background image so black text reads on any
@ -169,8 +170,8 @@ export function Card({
const typeBadge =
showType && ev.event_type ? (
<span
className="inline-block rounded-full px-3 py-0.5 mb-2 text-xs font-700 uppercase tracking-wide"
style={{ border: `1px solid ${color}`, color }}
className="inline-block rounded-full px-3 py-0.5 mb-2 text-xs font-bold uppercase tracking-wide"
style={{ border: `1px solid ${color}`, color: INK }}
>
{eventTypeLabel(ev.event_type)}
</span>
@ -200,6 +201,9 @@ export function Card({
filter: past ? "saturate(0.75)" : "none",
pointerEvents: interactive ? "auto" : "none",
}}
// A card shown but not in play (a carousel neighbour, a collapsed
// past event) keeps its links out of the tab order too.
inert={!interactive}
>
<div className={`flex-1 flex flex-col ${compact ? "p-8" : "p-10"}`}>
{compact ? (
@ -208,13 +212,13 @@ export function Card({
<Logo src={orgLogo} className="ev-ngu h-11 w-auto mb-4" />
<div className="ev-info">
{typeBadge}
<h3 className="text-3xl font-900 leading-tight">
<h3 className="text-3xl font-extrabold leading-tight">
<TitleLink ev={ev} linked={linked}>
{ev.title}
</TitleLink>
</h3>
{ev.theme && (
<p className="text-xl font-300 font-bold">"{ev.theme}"</p>
<p className="text-xl font-normal font-bold">"{ev.theme}"</p>
)}
{ev.date_label && <p className="text-xl">{ev.date_label}</p>}
{schedule && <p className="text-xl">{schedule}</p>}
@ -224,7 +228,7 @@ export function Card({
</div>
<Logo
src={eventLogo}
alt={ev.title}
alt=""
className="ev-image w-full h-auto object-contain"
/>
<div className="ev-desc">{descriptions}</div>
@ -236,13 +240,13 @@ export function Card({
<div className="md:col-span-2">
<Logo src={orgLogo} className="h-15 w-auto mb-6" />
{typeBadge}
<h3 className="text-4xl font-900">
<h3 className="text-4xl font-extrabold">
<TitleLink ev={ev} linked={linked}>
{ev.title}
</TitleLink>
</h3>
{ev.theme && (
<p className="text-2xl font-300 font-bold">"{ev.theme}"</p>
<p className="text-2xl font-normal font-bold">"{ev.theme}"</p>
)}
{ev.date_label && <p className="text-2xl">{ev.date_label}</p>}
{schedule && <p className="text-2xl">{schedule}</p>}
@ -253,7 +257,7 @@ export function Card({
<div className="md:col-span-1 flex items-center justify-end">
<Logo
src={eventLogo}
alt={ev.title}
alt=""
className="w-full h-auto max-h-72 object-contain"
/>
</div>
@ -274,7 +278,7 @@ export function Card({
doesn't. */}
<div className={`mt-auto ${compact ? "pt-6" : "pt-8"}`}>
{links.length === 0 && (
<p className="text-center font-600" style={{ color: accent }}>
<p className="text-center font-semibold" style={{ color: accent }}>
{past
? "This event has concluded. Thank you to everyone who joined us!"
: igHandle
@ -295,10 +299,10 @@ export function Card({
<a
key={item.label}
href={item.url}
className={`inline-flex items-center justify-center gap-2 rounded-xl font-700 transition-all duration-200 hover:scale-105 text-center ${
className={`inline-flex items-center justify-center gap-2 rounded-xl font-bold transition-all duration-200 hover:scale-105 text-center ${
compact ? "py-2.5 px-5" : "py-2.5 px-6"
}`}
style={{ border: `1px solid ${color}`, color }}
style={{ border: `1px solid ${color}`, color: INK }}
>
<PlatformIcon platform={item.platform} />
{item.label}
@ -313,7 +317,7 @@ export function Card({
href={igUrl}
target="_blank"
rel="noopener noreferrer"
className={`ig-link flex items-center justify-center rounded-xl font-700 transition-all duration-200 hover:scale-[1.02] gap-3 ${
className={`ig-link flex items-center justify-center rounded-xl font-bold transition-all duration-200 hover:scale-[1.02] gap-3 ${
compact ? "py-2.5 px-5" : "py-3 px-6"
}`}
style={{ border: `1px solid ${accent}`, color: accent }}
@ -327,10 +331,10 @@ export function Card({
{linked && (
<Link
to={eventHref(ev.id)}
className={`rounded-xl font-700 transition-all duration-200 hover:scale-105 text-center ${
className={`rounded-xl font-bold transition-all duration-200 hover:scale-105 text-center ${
compact ? "py-2.5 px-5" : "py-2.5 px-6"
}`}
style={{ border: `1px solid ${color}`, color }}
style={{ border: `1px solid ${color}`, color: INK }}
>
Event details
</Link>
@ -366,7 +370,7 @@ export function TypeFilter({ types, active, setActive, accent }) {
key={id}
onClick={() => setActive(id)}
aria-pressed={active === id}
className="rounded-full py-1.5 px-4 text-sm font-700 transition-colors duration-200"
className="rounded-full py-1.5 px-4 text-sm font-bold transition-colors duration-200"
style={chip(active === id)}
>
{label}
@ -405,7 +409,7 @@ export function EventCardsToggle({ view, setView, accent }) {
<button
onClick={() => setView("carousel")}
aria-pressed={view === "carousel"}
className="flex items-center gap-2 py-2 px-4 font-700 text-sm transition-colors duration-200"
className="flex items-center gap-2 py-2 px-4 font-bold text-sm transition-colors duration-200"
style={btn(view === "carousel")}
>
<svg viewBox="0 0 24 24" className="h-4 w-4" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
@ -417,7 +421,7 @@ export function EventCardsToggle({ view, setView, accent }) {
<button
onClick={() => setView("grid")}
aria-pressed={view === "grid"}
className="flex items-center gap-2 py-2 px-4 font-700 text-sm transition-colors duration-200"
className="flex items-center gap-2 py-2 px-4 font-bold text-sm transition-colors duration-200"
style={btn(view === "grid")}
>
<svg viewBox="0 0 24 24" className="h-4 w-4" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
@ -525,7 +529,7 @@ export default function EventListCards({
});
const notice = text => (
<p className="max-w-6xl mx-auto px-6 font-600" style={{ color: accent }}>
<p className="max-w-6xl mx-auto px-6 font-semibold" style={{ color: accent }}>
{text}
</p>
);
@ -595,7 +599,7 @@ export default function EventListCards({
{pastEvents.length > 0 && (
<div className="mt-12">
<h3
className="text-2xl font-800 mb-6"
className="text-2xl font-extrabold mb-6"
style={{ color: accent, opacity: 0.85 }}
>
Past Events
@ -635,7 +639,7 @@ export default function EventListCards({
<button
onClick={() => setShowPast(v => !v)}
aria-expanded={showPast}
className="flex items-center gap-2 py-2.5 px-6 rounded-xl font-700 transition-all duration-200 hover:scale-105"
className="flex items-center gap-2 py-2.5 px-6 rounded-xl font-bold transition-all duration-200 hover:scale-105"
style={{ border: `1px solid ${accent}`, color: accent }}
>
{showPast
@ -704,7 +708,7 @@ export default function EventListCards({
onClick={prev}
disabled={index === 0}
aria-label="Previous event"
className="absolute left-2 md:left-6 top-1/2 -translate-y-1/2 z-10 h-12 w-12 rounded-full flex items-center justify-center text-2xl font-700 shadow-lg transition-all duration-200 hover:scale-110 disabled:hover:scale-100"
className="absolute left-2 md:left-6 top-1/2 -translate-y-1/2 z-10 h-12 w-12 rounded-full flex items-center justify-center text-2xl font-bold shadow-lg transition-all duration-200 hover:scale-110 disabled:hover:scale-100"
style={arrowStyle(index > 0)}
>
‹
@ -713,7 +717,7 @@ export default function EventListCards({
onClick={next}
disabled={index === events.length - 1}
aria-label="Next event"
className="absolute right-2 md:right-6 top-1/2 -translate-y-1/2 z-10 h-12 w-12 rounded-full flex items-center justify-center text-2xl font-700 shadow-lg transition-all duration-200 hover:scale-110 disabled:hover:scale-100"
className="absolute right-2 md:right-6 top-1/2 -translate-y-1/2 z-10 h-12 w-12 rounded-full flex items-center justify-center text-2xl font-bold shadow-lg transition-all duration-200 hover:scale-110 disabled:hover:scale-100"
style={arrowStyle(index < events.length - 1)}
>
›
@ -729,6 +733,7 @@ export default function EventListCards({
key={e.id}
onClick={() => setIndex(i)}
aria-label={`Go to ${e.title}`}
aria-current={i === index ? "true" : undefined}
className="h-2.5 rounded-full transition-all duration-200"
style={{
width: i === index ? "1.5rem" : "0.625rem",