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

@ -464,6 +464,7 @@ export default function AdminClips() {
value={url}
onChange={(e) => setUrl(e.target.value)}
placeholder="https://www.youtube.com/watch?v=…"
aria-label="Video link"
className={`min-w-0 flex-1 ${input}`}
/>
<button type="submit" className={primary} disabled={adding || !url.trim()}>

View file

@ -391,6 +391,7 @@ function FeedbackCard({ row, onChange, onRemove, canWrite, canRemove }) {
value={note}
disabled={busy}
placeholder="Internal note: who's handling it, what was done"
aria-label="Internal note"
onChange={(e) => setNote(e.target.value)}
className="mt-3 w-full resize-y border border-muted/25 bg-surface px-3 py-2 text-sm text-body outline-none focus:border-brand focus:ring-2 focus:ring-brand/25"
/>
@ -611,6 +612,7 @@ export default function AdminFeedback({ kind = "feedback" }: { kind?: keyof type
type="search"
value={query}
placeholder="Search messages"
aria-label="Search messages"
onChange={(e) => setQuery(e.target.value)}
onKeyDown={(e) => {
if (e.key === "Enter") setSearch(query.trim());

View file

@ -304,6 +304,7 @@ function FilesTab() {
value={query}
onChange={(e) => setQuery(e.target.value)}
placeholder="Search by file name"
aria-label="Search by file name"
className="ml-auto w-64 border border-muted/25 px-3 py-2 text-sm outline-none focus:border-brand"
/>
</div>
@ -548,6 +549,7 @@ export default function AdminMedia() {
value={query}
onChange={(e) => setQuery(e.target.value)}
placeholder="Search by file name"
aria-label="Search by file name"
className="ml-auto w-64 border border-muted/25 px-3 py-2 text-sm outline-none focus:border-brand"
/>
</div>

View file

@ -38,7 +38,7 @@ import { mediaUrl } from '../../lib/media.ts'
import { SITE_NAME, SITE_ORIGIN, siteUrl } from '../../lib/site.ts'
import { seriesLabel } from '../../lib/eventSeries.ts'
import { useWideAdminPage } from '../../lib/adminWidth.tsx'
import { PALETTE } from '../../lib/color.ts'
import { STORED_PALETTE } from '../../lib/color.ts'
import { PLATFORMS } from '../../lib/platforms.ts'
import { SOCIAL_LINKS } from '../../data/socialLinks.ts'
import {
@ -81,9 +81,10 @@ const PART_TYPES: Array<[string, string, string]> = [
]
const partLabel = (type: string) => PART_TYPES.find(([value]) => value === type)?.[1] ?? type
/* The site's palette as choices; an inbox needs the hex itself. */
/* The site's palette as choices; an inbox needs the hex itself, and
the one stored, not a color blind mode's swap (color.ts). */
const SHADES = ['', ', darkest', ', light', ', lightest']
const PALETTE_OPTIONS = Object.entries(PALETTE).flatMap(([family, shades]) =>
const PALETTE_OPTIONS = Object.entries(STORED_PALETTE).flatMap(([family, shades]) =>
shades.map((hex, i) => [hex, `${family[0].toUpperCase()}${family.slice(1)}${SHADES[i]}`]),
)
const colorField = (path: string, label: string, fallback: string, none: string, types: string[]) => ({

View file

@ -378,6 +378,7 @@ export default function AdminPanel() {
value={row.role}
disabled={locked || busy || fromGroup}
onChange={(e) => changeRole(row, e.target.value)}
aria-label={`Role for ${row.name || row.email}`}
className="border border-brand/30 bg-surface px-2 py-1 text-sm text-ink disabled:cursor-not-allowed disabled:bg-tint-soft disabled:text-muted/60"
title={
fromGroup

View file

@ -149,6 +149,7 @@ export default function EntityList() {
type="search"
value={query}
placeholder="Search"
aria-label="Search"
onChange={(e) => setQuery(e.target.value)}
onKeyDown={(e) => e.key === "Enter" && setParam("q", query.trim())}
className="border border-muted/25 bg-surface px-4 py-1.5 text-sm text-body outline-none focus:border-brand"