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

@ -10,6 +10,8 @@
useEvents({ status: "upcoming" }) a home page strip
useEvents({ type: "workshop" }) one kind, wherever it is
useEvents({ type: ["class", "workshop"] })
useEvents({ from: "2026-09-27", to: "2026-11-07" }) a window
useEvents({ scope: "national", past: 12 }) 12 past at most
useEvents() everything
`scope` and `type` are different questions and stack rather
@ -33,7 +35,7 @@ const NO_SCOPES: any[] = [];
const NO_EVENTS: any[] = [];
/* The path for a filter, as the server reads it (routes/content.js). */
export function eventsPath({ scope, host, status, type }: any = {}) {
export function eventsPath({ scope, host, status, type, from, to, past }: any = {}) {
const query = new URLSearchParams();
if (scope) query.set("scope", scope);
// An organization or a person slug: co-hosting puts one event on
@ -42,15 +44,24 @@ export function eventsPath({ scope, host, status, type }: any = {}) {
if (status) query.set("status", status);
const types = Array.isArray(type) ? type.join(",") : type;
if (types) query.set("type", types);
// A date window (YYYY-MM-DD, either end optional): events with a
// day in it, plus undated ones. The calendar asks for its grid.
if (from) query.set("from", from);
if (to) query.set("to", to);
// Only the most recent `past` past events (a carousel's way back).
if (past != null) query.set("past", String(past));
const qs = query.toString();
return qs ? `/events?${qs}` : "/events";
}
/* A null filter fetches nothing. `ready` is whether any answer has
arrived; on a change of filter the last answer stays until the
new one lands, so a caller can keep it on screen meanwhile. */
export function useEvents(filter: any = {}) {
const { data, error, loading } = useResource(eventsPath(filter));
const { data, error, loading } = useResource(filter ? eventsPath(filter) : null);
const events = data?.events ?? NO_EVENTS;
const scopes = data?.scopes ?? NO_SCOPES;
return { events, scopes, loading, error };
return { events, scopes, loading, error, ready: data !== undefined };
}
/* Past and upcoming, split. `status` arrives already resolved, the