Accessibility: reader view and full palette swaps; version v1.12.1-accessibility
- Reading mode is now a reader view (ReaderView.tsx): the page renders hidden and its headings, paragraphs, links and described pictures are written out in one column, with no header, backdrop or footer. - Color blind modes swap all three color families (teal, green, amber); palette hexes in components and CSS are now var(--pal-<family>-<shade>) so the modes reach them. - CLAUDE.md and docs/updating-data-in-code.md describe both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
420a8058b4
commit
de17da7dc8
19 changed files with 507 additions and 192 deletions
|
|
@ -19,7 +19,6 @@
|
|||
import { useEffect, useState } from "react";
|
||||
import { jumpTo } from "../../lib/focus.ts";
|
||||
import { scrollBehavior } from "../../lib/motion.ts";
|
||||
import { accentText } from "../../lib/color.ts";
|
||||
|
||||
export type EditorSection = {
|
||||
id: string;
|
||||
|
|
@ -107,7 +106,11 @@ export function SectionNav({ sections, wrap = false }: { sections: EditorSection
|
|||
type="button"
|
||||
onClick={() => jumpTo(section.id)}
|
||||
aria-current={lit ? "location" : undefined}
|
||||
style={section.accent ? ({ "--nav-accent": accentText(section.accent) } as React.CSSProperties) : undefined}
|
||||
style={
|
||||
section.accent
|
||||
? ({ "--nav-accent": `color-mix(in srgb, ${section.accent} var(--nav-text-mix), #ffffff)` } as React.CSSProperties)
|
||||
: undefined
|
||||
}
|
||||
className={`-ml-px flex w-full items-center gap-1.5 border-l-2 px-3 py-1.5 text-left text-sm transition-colors ${
|
||||
section.accent
|
||||
? lit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue