feat: rebuild the header controls as icon buttons

The theme switch was three labelled radios that wrapped the header onto
a second line with long translations. It is three SVG buttons now, with
search and menu sharing the same language: no resting outline, a filled
chip for the active choice.

Radios gave arrow-key roving for free, so the group reimplements it
rather than losing it. The first chip colour put accent on accent and
failed WCAG AA; the label carries full contrast instead. Mobile targets
sit at 45px because a floor of exactly 44 rounds to 43.99997 in Firefox.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
chrnxandClaude Opus 5 committed 2026-08-13 19:41:24 -05:00
1 parent f55d9d9b45
commit a142ece51d
16 files changed
+316 -156

No files matched your search

+2 -2
View File
@@ -50,7 +50,7 @@
const shell = menuButton && menuButton.parentElement;
const brand = shell && shell.querySelector( '.chrnx-site-brand' );
const navLink = nav && nav.querySelector( 'a[href]' );
const themeRadio = themePanel && themePanel.querySelector( 'input[type="radio"]' );
const themeRadio = themePanel && themePanel.querySelector( '[data-chrnx-theme-value]' );
const required = [
menuButton,
nav,
@@ -107,7 +107,7 @@
let activePanel = null;
const currentThemeRadio = () =>
themePanel.querySelector( 'input[type="radio"]:checked' ) || themeRadio;
themePanel.querySelector( '[data-chrnx-theme-value][aria-pressed="true"]' ) || themeRadio;
const restoreOriginalOrder = () => {
elements.forEach( ( element ) => {
const anchor = anchors.get( element );