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

@ -67,13 +67,13 @@ function Blocks({ blocks = [] as any[], color }) {
switch (block.type) {
case "heading":
return (
<h4 key={i} className="text-lg font-800" style={{ color }}>
<h4 key={i} className="text-lg font-extrabold">
{block.text}
</h4>
);
case "subheading":
return (
<h5 key={i} className="font-700">
<h5 key={i} className="font-bold">
{block.text}
</h5>
);
@ -98,8 +98,8 @@ function Blocks({ blocks = [] as any[], color }) {
href={item.url}
target="_blank"
rel="noopener noreferrer"
className="font-700 underline"
style={{ color }}
className="font-bold underline"
style={{ textDecorationColor: color }}
>
{item.text}
</a>
@ -288,11 +288,11 @@ function LegendButton({ region, selected, setSelected, hovered, setHovered }) {
onFocus={() => setHovered(region.id)}
onBlur={() => setHovered(null)}
aria-pressed={selected === region.id}
className="flex items-center gap-2 py-1.5 px-3 rounded-lg text-sm font-700 transition-all duration-200"
className="flex items-center gap-2 py-1.5 px-3 rounded-lg text-sm font-bold transition-all duration-200"
style={{
border: `1px solid ${colorOf(region)}`,
background: on ? colorOf(region) : "transparent",
color: on ? "#ffffff" : colorOf(region),
color: on ? "#ffffff" : INK,
opacity: selected && selected !== region.id ? 0.45 : 1,
}}
>
@ -339,7 +339,7 @@ function Legend({ domestic, international, onMapIds, ...props }: any) {
{selected && (
<button
onClick={() => setSelected(null)}
className="py-1.5 px-3 rounded-lg text-sm font-700 underline"
className="py-1.5 px-3 rounded-lg text-sm font-bold underline"
style={{ color: FALLBACK_COLOR }}
>
Show all
@ -369,26 +369,26 @@ function RegionBlock({
className="transition-opacity duration-200"
style={{ opacity: selected && !on ? 0.35 : 1, marginLeft: indent ? "0.75rem" : 0 }}
>
<button
onClick={() => setSelected(on ? null : region.id)}
onMouseEnter={() => setHovered(region.id)}
onMouseLeave={() => setHovered(null)}
className="w-full flex items-baseline gap-2 text-left py-2"
>
<span
className="h-3 w-3 rounded-full shrink-0"
style={{ background: colorOf(region) }}
/>
<h4
className={`font-800 ${indent ? "text-lg" : "text-xl"}`}
style={{ color: colorOf(region) }}
{/* The heading holds the button, not the other way round: a
heading inside a button stops being a heading. */}
<h4 className={`font-extrabold ${indent ? "text-lg" : "text-xl"}`} style={{ color: INK }}>
<button
onClick={() => setSelected(on ? null : region.id)}
onMouseEnter={() => setHovered(region.id)}
onMouseLeave={() => setHovered(null)}
aria-expanded={on}
className="w-full flex items-baseline gap-2 text-left py-2"
>
<span
className="h-3 w-3 rounded-full shrink-0"
style={{ background: colorOf(region) }}
/>
{region.name}
</h4>
<span className="text-sm ml-auto" style={{ color: MUTED }}>
{chapters.length || "-"}
</span>
</button>
<span className="text-sm font-normal ml-auto" style={{ color: MUTED }}>
{chapters.length || "-"}
</span>
</button>
</h4>
{subtext && (
<p className="text-sm mb-2 ml-5 leading-snug" style={{ color: MUTED }}>
@ -410,7 +410,7 @@ function RegionBlock({
style={{ borderLeft: `2px solid ${colorOf(region)}` }}
>
<div className="min-w-0 flex-1">
<p className="font-700">{c.name}</p>
<p className="font-bold">{c.name}</p>
<p className="text-sm" style={{ color: FALLBACK_COLOR }}>
{c.location_label}
{c.meets ? ` · ${c.meets}` : ""}
@ -422,7 +422,7 @@ function RegionBlock({
href={c.website}
target="_blank"
rel="noopener noreferrer"
className="font-700 underline"
className="font-bold underline"
style={{ color: colorOf(region) }}
>
Details
@ -431,7 +431,7 @@ function RegionBlock({
{c.email && (
<a
href={`mailto:${c.email}`}
className="font-700 underline"
className="font-bold underline"
style={{ color: colorOf(region) }}
>
Contact
@ -481,7 +481,7 @@ function OrgLogo({ org, color, size = "h-14 w-14" }) {
return (
<div
className={`${size} rounded-xl shrink-0 flex items-center justify-center font-800`}
className={`${size} rounded-xl shrink-0 flex items-center justify-center font-extrabold`}
style={{ border: `1px solid ${color}`, color }}
aria-label={org.name}
>
@ -502,7 +502,7 @@ function ChapterCard({ chapter, color, open, onOpen }) {
<OrgLogo org={chapter} color={color} />
<div className="min-w-0 flex-1">
<p className="font-700 leading-tight">{chapter.name}</p>
<p className="font-bold leading-tight">{chapter.name}</p>
<p className="text-sm" style={{ color: FALLBACK_COLOR }}>
{chapter.location_label}
</p>
@ -580,14 +580,14 @@ function ChapterDetail({ chapter, region, onClose }) {
<OrgLogo org={chapter} color={colorOf(region)} size="h-20 w-20" />
<div className="min-w-0 flex-1">
<p className="text-2xl font-900 leading-tight">{chapter.name}</p>
<p className="text-2xl font-extrabold leading-tight">{chapter.name}</p>
<p style={{ color: FALLBACK_COLOR }}>{chapter.location_label}</p>
</div>
<button
onClick={onClose}
aria-label="Close details"
className="shrink-0 h-8 w-8 rounded-full flex items-center justify-center text-lg font-700 transition-transform duration-200 hover:scale-110"
className="shrink-0 h-8 w-8 rounded-full flex items-center justify-center text-lg font-bold transition-transform duration-200 hover:scale-110"
style={{ border: `1px solid ${colorOf(region)}`, color: colorOf(region) }}
>
×
@ -603,7 +603,7 @@ function ChapterDetail({ chapter, region, onClose }) {
<dt className="shrink-0" style={{ color: MUTED }}>
{label}
</dt>
<dd className="font-700" style={{ color: INK }}>
<dd className="font-bold" style={{ color: INK }}>
{value}
</dd>
</div>
@ -615,7 +615,7 @@ function ChapterDetail({ chapter, region, onClose }) {
{orgPath(chapter) && (
<Link
to={orgPath(chapter)!}
className="py-2 px-5 rounded-xl font-700 text-sm transition-transform duration-200 hover:scale-105"
className="py-2 px-5 rounded-xl font-bold text-sm transition-transform duration-200 hover:scale-105"
style={{ background: colorOf(region), color: "#ffffff" }}
>
Chapter page
@ -626,7 +626,7 @@ function ChapterDetail({ chapter, region, onClose }) {
href={chapter.website}
target="_blank"
rel="noopener noreferrer"
className="py-2 px-5 rounded-xl font-700 text-sm transition-transform duration-200 hover:scale-105"
className="py-2 px-5 rounded-xl font-bold text-sm transition-transform duration-200 hover:scale-105"
style={{ border: `1px solid ${colorOf(region)}`, color: colorOf(region) }}
>
Visit site
@ -636,7 +636,7 @@ function ChapterDetail({ chapter, region, onClose }) {
{chapter.email && (
<a
href={`mailto:${chapter.email}`}
className="py-2 px-5 rounded-xl font-700 text-sm transition-transform duration-200 hover:scale-105"
className="py-2 px-5 rounded-xl font-bold text-sm transition-transform duration-200 hover:scale-105"
style={{ border: `1px solid ${colorOf(region)}`, color: colorOf(region) }}
>
Get in touch
@ -666,7 +666,7 @@ function ChapterGrid({ regions, chapters, chaptersIn, subtextFor, openId, setOpe
className="h-3 w-3 rounded-full shrink-0"
style={{ background: colorOf(region) }}
/>
<h3 className="text-2xl font-800" style={{ color: colorOf(region) }}>
<h3 className="text-2xl font-extrabold" style={{ color: colorOf(region) }}>
{region.name}
</h3>
<span className="text-sm" style={{ color: MUTED }}>
@ -741,7 +741,7 @@ export function OrgMapToggle({ view, setView, accent }) {
key={id}
onClick={() => setView(id)}
aria-pressed={view === id}
className="py-2 px-4 font-700 text-sm transition-colors duration-200"
className="py-2 px-4 font-bold text-sm transition-colors duration-200"
style={btn(view === id)}
>
{label}
@ -834,7 +834,7 @@ export default function OrgListMap({ view = "map", accent = FALLBACK_COLOR }) {
if (error && regions.length === 0) {
return shell(
<p className="font-600" style={{ color: accent }}>
<p className="font-semibold" style={{ color: accent }}>
· Chapters couldn't be loaded just now, please try again shortly ·
</p>
);
@ -904,13 +904,13 @@ export default function OrgListMap({ view = "map", accent = FALLBACK_COLOR }) {
ref={listRef}
className="relative lg:h-0 lg:min-h-full overflow-y-auto pr-2"
>
<h3 className="text-xl font-800 mb-1" style={{ color: FALLBACK_COLOR }}>
<h3 className="text-xl font-extrabold mb-1" style={{ color: FALLBACK_COLOR }}>
{US_TITLE}
</h3>
{domestic.map(r => block(r, true))}
<h3
className="text-xl font-800 mt-6 mb-1 pt-4"
className="text-xl font-extrabold mt-6 mb-1 pt-4"
style={{ color: FALLBACK_COLOR, borderTop: `1px solid ${RULE}` }}
>
{INTL_TITLE}