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
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue