Files
q-edit/docs/adr/0005-page-controls-hash-bridge.md
2025-09-02 21:04:17 -04:00

19 lines
623 B
Markdown

# ADR 0005 — Pagination controls ↔ URL hash bridge
**Date:** 2025-09-02
## Context
We want page navigation to be shareable and restorable via the URL without changing existing app logic.
## Decision
- Add `scripts/init-page-hash.mjs` to delegate clicks on `[data-page]` within `#pagination-top` and `#pagination-bottom`.
- Reflect active page with `aria-current="page"` and `.is-active` class.
- Keep behavior additive; no changes to `script.js` required.
## Consequences
- One extra script tag in `index.html`.
- Existing pagination markup can opt-in by adding `data-page="N"` attributes to clickable elements.