fix: Kontrast im hellen Theme (Text und Hauptknöpfe mit --accent-strong, Fokusring); Prüfskripte für die Oberfläche (#1174)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-21 18:30:48 +01:00
parent 9d89546069
commit de0b83496a
12 changed files with 362 additions and 12 deletions

View File

@ -0,0 +1,18 @@
import { start } from './lib.mjs';
const BASE = process.env.NEXUS_BASE || 'http://127.0.0.1:18112';
const pw = process.argv[2]; const S = process.argv[3];
const b = await start();
try {
await b.login(BASE, 'claude', pw);
await b.viewport(1200, 800, { dsf: 2, mobile: false });
for (const theme of ['light', 'dark']) {
await b.send('Emulation.setEmulatedMedia', { features: [{ name: 'prefers-color-scheme', value: theme }] });
await b.goto(BASE + '/ui/chat');
for (const [name, sel] of [['Knopf', '#chat button[type=submit]'], ['Link', 'header nav a'], ['Feld', '#chat textarea'], ['Auswahl', '#chat select']]) {
await b.send('Input.dispatchKeyEvent', { type: 'keyDown', key: 'Tab', code: 'Tab' }); await b.send('Input.dispatchKeyEvent', { type: 'keyUp', key: 'Tab', code: 'Tab' });
const r = await b.eval(`(() => { const e = document.querySelector(${JSON.stringify(sel)}); e.focus(); const cs = getComputedStyle(e); return JSON.stringify({ trifft: e.matches(':focus-visible'), outline: cs.outlineStyle + ' ' + cs.outlineWidth + ' ' + cs.outlineColor, boxShadow: cs.boxShadow.slice(0, 40) }); })()`);
console.log(theme, name.padEnd(8), r);
}
await b.shot(`${S}/cdp/fokus-${theme}.png`);
}
} finally { b.close(); }