Accessibility: reading and color blind modes, audit fixes, calendar window

- Accessibility panel: the switch knob stays in its track; the panel
  follows its button in the Tab order and opens on its first switch.
- Reading mode is the page as plain text: one column, no colors,
  pictures, cards or motion; descriptions stay in place.
- Color blind mode (protanopia, deuteranopia, tritanopia, monochrome):
  palette swaps chosen by simulation, applied to code, data and CSS
  colors on public pages only. The newsletter uses the stored palette.
- Audit fixes: focus not hidden by the header, focus on page change
  and in-page jumps, focus return for the menu, day list and people
  details, labelled admin fields and dialogs, keyboard map tiles,
  scrollable tables, and more.
- Calendar asks /events for its six weeks only (?from=&to=); carousels
  take their 12 most recent past events (?past=12).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-10-02 14:33:09 -05:00
parent d067c02d33
commit b816203c0c
45 changed files with 760 additions and 208 deletions

View file

@ -135,23 +135,20 @@ function Caption({ text }: { text?: string | null }) {
)
}
// Clear of the fixed header when jumped to.
const ANCHOR_MARGIN = { scrollMarginTop: 'calc(var(--header-h, 5rem) + 1rem)' }
function Block({ block, accent, anchor }: { block: ContentBlock; accent: string; anchor?: string }) {
const text = block.text ?? ''
switch (block.type) {
case 'heading':
return (
<h3 id={anchor} className="text-2xl font-bold" style={{ color: accentText(accent), ...ANCHOR_MARGIN }}>
<h3 id={anchor} className="text-2xl font-bold" style={{ color: accentText(accent) }}>
{text}
</h3>
)
case 'subheading':
return (
<h4 id={anchor} className="text-lg font-normal" style={{ color: accentText(accent), ...ANCHOR_MARGIN }}>
<h4 id={anchor} className="text-lg font-normal" style={{ color: accentText(accent) }}>
{text}
</h4>
)
@ -248,8 +245,9 @@ function Block({ block, accent, anchor }: { block: ContentBlock; accent: string;
const width = Math.max(...rows.map((row) => row.length))
return (
// Wide tables scroll sideways inside their box on a phone
// rather than squeezing every column to a word.
<div className="overflow-x-auto border border-brand/15">
// rather than squeezing every column to a word. Focusable, so
// the arrow keys scroll it too (Safari won't on its own).
<div tabIndex={0} role="region" aria-label="Table" className="overflow-x-auto border border-brand/15">
<table className="min-w-full text-left text-sm leading-snug">
<thead className="bg-tint">
<tr>