Skip to content

feat(a11y): make the pages work on phones, keyboards and screen readers - #9

Merged
coko7 merged 1 commit into
mainfrom
feat/accessibility
Nov 29, 2026
Merged

coko7 merged 1 commit into
mainfrom
feat/accessibility

Conversation

@coko7

@coko7 coko7 commented Nov 29, 2026

Copy link
Copy Markdown
Owner

An accessibility pass that keeps v1's look. Only CSS and markup change, plus labels computed for the calendar.

  1. Leaderboard on phones: under 650px the Guesses column is hidden and cells are tighter, so Rank, User, Score and Accuracy fit at 390px. Scores no longer wrap their star onto a new line, at any width.
  2. Screen readers:
    • Nerd Font icons are aria-hidden.
    • The profile's lock icon is labelled "hidden until you guess".
    • The CSS-generated glyphs (rank #, podium snowflakes) get empty alt text (content: "…" / "").
    • The header emojis are hidden.
  3. Calendar:
    • Each day has a label: "Day 1", "Day 3, guessed" (the star used to hide the number), "Day 5, locked".
    • Locked days are marked disabled.
    • Their numbers go from 25% to 50% opacity in the text colour: readable, still clearly locked.
  4. Keyboard: :focus-visible gets the same colour swap as hover, plus a yellow outline.
  5. Messages: errors are role="alert" and notices ("Locked in!", name changed) are role="status", so screen readers announce them.
  6. Motion: animations and transitions stop when the system asks for reduced motion.

Pre-launch, so no version bump and no changelog note.

Check

  • Screenshots at 390px (home, leaderboard) and on desktop with the real 2025 data. The desktop look is unchanged.
  • The guess-flow test checks the calendar labels: "Day 1", "Day 2, locked", "Day 1, guessed".
  • fmt, clippy, 27 tests pass.

Not tested

No real screen reader (VoiceOver, NVDA or TalkBack) was used. Empty alt text on CSS glyphs needs Firefox 128 or later; older Firefox drops those glyphs entirely.

Co-Authored-By: lazytrek 352825308+lazytrek@users.noreply.github.com

- Leaderboard fits phones: the guesses column is hidden under 650px,
  cells are tighter, and scores no longer wrap.
- Nerd Font icons are hidden from screen readers; the profile lock is
  labelled "hidden until you guess"; CSS-generated glyphs get empty alt.
- Calendar days have labels ("Day 3, guessed", "Day 5, locked");
  locked days are marked disabled and readable at 50% opacity.
- Keyboard focus looks like hover, plus a visible outline.
- Errors and notices are announced (role alert/status).
- Animations and transitions stop with prefers-reduced-motion.

Co-Authored-By: lazytrek <352825308+lazytrek@users.noreply.github.com>
@coko7
coko7 merged commit 19ff9b1 into main Nov 29, 2026
2 checks passed
@coko7
coko7 deleted the feat/accessibility branch November 29, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant