Accessibility: keyboard move entry and screen reader support (#72) (#115)

* commented out lesson and learning strip until lessons are established

* reword the hero section

* change layout and working on puzzle section - remove top div as it was
redundant

* amend flash message on replay

* switch cancel session for return home

* remove system theme toggle since this is the default, leaving only light
and dark toggles

* add keyboard and screen reader support for play (#72)

First draft covering the accessibility work in #72:\n\n- labelled SAN/UCI move input, validated against the tablebase and applied\n  by the board hook, plus an accessible promotion picker\n- live-region announcements for moves, checks, checkmates and solve/fail,\n  and a hidden text summary of the position\n- accessible labels, focus ring, skip link, keyboard-friendly review table\n  and non-colour grade cues\n- WCAG AA text contrast roles and a responsive play surface\n- regression tests for move entry, announcements and link-style CTAs
This commit is contained in:
2026-11-09 12:09:07 +01:00
committed by GitHub
parent 8df7ac982c
commit 805c2f1150
31 changed files with 812 additions and 136 deletions
+4
View File
@@ -16,6 +16,10 @@
}
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
/* A consistent focus ring for links, buttons and native controls. Components
that provide their own ring (form inputs) override this through utilities. */
:focus-visible { outline: 2px solid var(--color-coral-text); outline-offset: 2px; }
}
main { overflow: hidden; flex: 1 0 auto; }
+8 -2
View File
@@ -10,8 +10,11 @@
--color-coral: var(--coral);
--color-coral-control: var(--coral);
--color-coral-control-hover: var(--coral-dark);
--color-coral-text: var(--coral-dark);
--color-success-text: var(--mint-deep);
--color-coral-text: #b8432c;
--color-success-text: #3f6d5a;
--color-warning-text: #8a5a00;
--color-primary-text: #b8432c;
--color-error-text: #b8432c;
--color-mint-chip: var(--mint);
--color-on-accent-muted: #5f2c23;
@@ -71,6 +74,9 @@ html[data-theme="dark"] {
--color-coral-control-hover: #b8432c;
--color-coral-text: #ff9c85;
--color-success-text: #8fd3b5;
--color-warning-text: #f0b35a;
--color-primary-text: #f2816b;
--color-error-text: #f2816b;
--color-mint-chip: #24403a;
--color-on-accent-muted: rgba(255, 255, 255, 0.97);
--color-promotion-surface: #1b2822;