You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4477fbc
Browse filesBrowse the repository at this point in the historyBrowse files
#76 page weight:
- Scatter sends one path of dots per colour above 250 points and draws the
circles after mount; hover picks the nearest point; coordinates rounded to
0.1 px and shared attributes moved onto one group per colour.
- hooks.server.ts compresses HTML and JSON (Brotli/gzip) and sets a weak ETag
from the build version and import hash, answering revalidation with a 304.
- /sharks no longer ships derivable fields.
#32 keyboard and motion:
- charts/marks.ts: markKeys (one tab stop per chart, arrows/Home/End step
through marks, Enter follows links, Escape hides) and markAt/pointerIn.
All nine chart types use it; tooltips announce via role="status".
- Reduced motion: global CSS override and no Leaflet zoom/fade animation.
- e2e: keyboard test, compression/304 test, axe on /morphometrics and /pressure.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: AGENTS.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,8 @@ Drop the workbook in `data/` named like `Physioshark_Shark Log 2026-2027.xlsx` (
118
118
- Cite the study behind a chart with `<ChartCard papers={['debaere2024lunar']}>` (ids in `src/lib/publications.ts`). Link only papers that analysed the same question with this dataset; check the abstract first. PDFs are served at `rummerlab.com/papers/<file>` (metadata in the rummerlab-website repo, `data/papers.json`).
119
119
- Species colours come from `src/lib/species.ts` (blacktip = slot 1, sicklefin lemon = slot 2).
120
120
- Charts measure their width (`bind:clientWidth`) and carry a `viewBox` so pre-hydration renders scale down instead of overflowing.
121
-
- Interactive marks (links) inside an SVG → the SVG gets `role="group"`, not `img` (axe `nested-interactive`). Only put `aria-label` on elements that are links.
121
+
- Keyboard (#32): every chart spreads `markKeys()` from `charts/marks.ts` onto its svg (one tab stop, `role="application"` while it has marks, arrows/Home/End/Enter/Escape) and puts `data-mark={i}` on each mark's hover element so `markAt` can pin the tooltip there. Pointer handlers use `pointerIn(e)`. A new chart needs both, plus `KEYS_HINT` in its `aria-label`. Only put `aria-label` on elements that are links (e.g. linked scatter points).
122
+
- Page weight (#76): markup, not data, made pages heavy. Scatter sends one path of dots per colour above 250 points and swaps in circles after mount, hover picks the nearest point, coordinates are rounded to 0.1 px. Keep per-mark attributes off big charts; put shared ones on a parent `<g>`. `hooks.server.ts` Brotli/gzips HTML and JSON and sets a weak ETag (build version + import hash) so revalidation is a 304 without a render.
0 commit comments