Repository navigation
fix(ui): fix Dark Mode/WCAG contrast, keyboard/a11y, sanitizer, and spread layout - #4
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improves
Resources/reader.htmlUI/UX, WCAG contrast across all themes, keyboard workflows, VoiceOver/ARIA accessibility, HTML sanitization security, and spread layout/render performance, and syncsREADME.md.Changes
Resources/reader.html)color-mix(in srgb, var(--fg) 5%, var(--bg)).--err(#a83220paper/sepia,#f07a65dark) and--bordertokens (>= 3.16:1against both page and input surfaces), darkened--muted(>= 5.35:1across all 3 themes), and setcolor-scheme+<meta name="color-scheme" content="light dark">.prefers-color-schemewith livechangelistener; added safe light canvas backdrop for transparent images/SVGs in Dark mode.#helpkeydownhandler acrossstart,loading,error, andarticlemodes forEscape,?, andTwhile respecting text inputs.#helpstrictly modal (role="dialog" aria-modal="true",inertbackground, Tab trap, backdrop/Esc/?dismiss, focus restoration).D.focusUrl(⌘L), stateless deterministic queue focus restoration (including tab switching and post-archive),ArrowLeft/ArrowRight/Home/Endonrole="tablist",docs.length > 0arrow guard, two-click confirmation on#disconnect,0+window.twoupZoomfont zoom/reset,:focus-visiblerings,mousedownselection tracking, pinch-zoom (e.ctrlKey) wheel pass-through, and mode-safewindow.flash().#cliptooverflow: clip, clamped top/bottom safe-area insets (preserving PR Show completion actions on the last spread #1's#reader-footerclearance), added#paneltop safe-area padding, narrow-viewport 1-column fallback (vw < 900or< 20em), 2-up measure cap (31 * fontSize), ragged alignment below 40ch, RTL support viaD.dir, scrollable tables /overflow-wrap: anywhereinline code, safe broken-image handling, normalized duplicate-title comparison,requestAnimationFramelayout coalescing (scheduleLayout), and cached DOM references.#mark-read,#read-another,window.archiveFailed, archive retry).sanitize()#twoup-endand stripped all untrustedidattributes.script,style,iframe,object,embed,form,base,meta,link,noscript, SVG/MathML animation/external elements) and event/external attributes (on*,xlink:href,srcdoc,formaction, foreignhref/src).http:,https:,mailto:,#onhref;http:,https:,data:image/(png|jpeg|jpg|gif|webp|avif);onsrc, blockingdata:image/svg+xml).Resources/reader.html,README.md)<title>,<main>,<article>,aria-labelon<section id="queue">,role="tablist"/role="tab"/aria-selected,role="list"on queue<ol>,role="status" aria-live="polite",role="alert"on errors,.sr-onlylabels on#u/#tok,aria-hidden="true"on decorative elements, idle-fading article shortcut hint, andprefers-reduced-motion: reduce.README.mdwith new shortcuts (0,⌘+/⌘−/⌘0,Esc) and./build.sh --build-only.Verification
node --checkon extracted inline<script>: pass>= 4.5:1text/muted/link/err,>= 3.0:1borders)data:image/svg+xml): all pass./build.sh --build-only(macOS Swift + codesign verify): built cleanly (build/trashed afterward)git diff --stat origin/main...HEAD: onlyResources/reader.htmlandREADME.mdtouched