Web Library: alphabet rail always shows #/A-Z/& #69

Merged
bvandeusen merged 1 commits from dev into main 2026-06-01 21:55:50 -04:00
Owner

Operator: previous rail only emitted buttons for letters that had items, so jumping to a section meant scrolling to it first — defeating the rail's point as a navigation tool. Rail now reads as a stable A-Z reference regardless of which letters are present in the current view.

  • New bucketFor() classifies the first character into # (digits), AZ (letters), or & (everything else). Anchor ids switch from per-letter to per-bucket: alpha-#, alpha-A, …, alpha-&.
  • railEntries hardcodes the full # → A-Z → & order.
  • Empty buckets render disabled with a low-opacity tint + cursor:default so they read as "no entries here" rather than broken jumps. aria-label changes too: Jump to A (enabled) vs C — no entries (disabled).
  • # / & get verbose labels ("numbers" / "symbols") because the bare glyph isn't readable.

Tests rewritten — 4 cases: full-rail-with-disabled-buckets, DOM order, populated-bucket ids, and a separate fixture confirming digit-starting items bucket under #.

CI green on ad1a000a (run 170).

Operator: previous rail only emitted buttons for letters that had items, so jumping to a section meant scrolling to it first — defeating the rail's point as a navigation tool. Rail now reads as a stable A-Z reference regardless of which letters are present in the current view. - New `bucketFor()` classifies the first character into `#` (digits), `A`–`Z` (letters), or `&` (everything else). Anchor ids switch from per-letter to per-bucket: `alpha-#`, `alpha-A`, …, `alpha-&`. - `railEntries` hardcodes the full `# → A-Z → &` order. - Empty buckets render disabled with a low-opacity tint + `cursor:default` so they read as "no entries here" rather than broken jumps. aria-label changes too: `Jump to A` (enabled) vs `C — no entries` (disabled). - `#` / `&` get verbose labels ("numbers" / "symbols") because the bare glyph isn't readable. Tests rewritten — 4 cases: full-rail-with-disabled-buckets, DOM order, populated-bucket ids, and a separate fixture confirming digit-starting items bucket under `#`. CI green on `ad1a000a` (run 170).
bvandeusen added 1 commit 2026-06-01 21:55:41 -04:00
Operator: prior rail only emitted buttons for letters with items, so
jumping to a letter required scrolling to that section first — not
useful as a navigation tool. Rail now always renders the full set so
the page reads as a stable A-Z reference regardless of which letters
are present.

- New bucketFor() classifies the first character into '#' (digits),
  'A'-'Z' (letters), or '&' (everything else). Anchor ids switch
  from per-letter to per-bucket: alpha-#, alpha-A, ..., alpha-&.
- ALPHABET + railEntries hardcode the full # / A-Z / & order.
- Buttons for empty buckets render disabled with a low-opacity tint
  + cursor:default so they read as 'no entries here' rather than
  broken jumps. aria-label changes too — 'Jump to A' (enabled) vs
  'C — no entries' (disabled) so screen readers announce state.
- # / & get verbose labels ('numbers'/'symbols') because the bare
  glyph isn't readable.

Tests rewritten — 4 cases: full-rail-with-disabled-buckets,
DOM-order, populated-bucket ids, and a separate fixture confirming
digit-starting items bucket under '#'.
bvandeusen merged commit 1d7b91333f into main 2026-06-01 21:55:50 -04:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/minstrel#69