mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 11:33:28 +01:00
* fix(auth): Loki's sign-in in AccountKit's order and words Every other app on AccountKit's screens draws OrangeCat, the passkey, the password, the sign-in link and then recovery, and links between the pages with "Create an account" / "Sign in". Loki put "Forgot password?" under the password field and said "Welcome back", "Create one free →" and "Already have an account? Sign in →". The sign-in and sign-up cards now take those words from AccountKit's labels, and recovery is a full-width row after the sign-in link. Loki still draws these forms itself; moving them onto SignInForm/SignUpForm/AccountPanel is the next step. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9 * test(auth): the shared sign-in's words come from AccountKit, not a copy The expectation named Apple and X, which AccountKit's published label no longer does, so the test failed on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9 --------- Co-authored-by: Claude <noreply@anthropic.com>
25 lines
998 B
TypeScript
25 lines
998 B
TypeScript
/**
|
|
* Static accessibility checks for the auth form primitives.
|
|
* Run: npm run test:auth-a11y
|
|
*/
|
|
import assert from "node:assert/strict";
|
|
import fs from "node:fs";
|
|
|
|
const authShell = fs.readFileSync("src/components/auth/AuthShell.tsx", "utf8");
|
|
const signIn = fs.readFileSync("src/components/auth/SignInForm.tsx", "utf8");
|
|
const onboarding = fs.readFileSync("src/app/onboarding/page.tsx", "utf8");
|
|
|
|
assert.match(authShell, /<label className="ui-auth-label" htmlFor=\{fieldId\}>/);
|
|
assert.match(authShell, /only\.type === AuthInput/);
|
|
assert.match(authShell, /cloneElement/);
|
|
assert.match(authShell, /id=\{id\}/);
|
|
|
|
assert.match(signIn, /<AuthInput\s+id="email"/);
|
|
assert.match(signIn, /<AuthField label=\{L.password\} htmlFor="password">/);
|
|
assert.match(signIn, /<AuthInput\s+id="owner-password"/);
|
|
|
|
assert.match(onboarding, /<AuthField label="Username" htmlFor="onboarding-username">/);
|
|
assert.match(onboarding, /id="onboarding-username"/);
|
|
|
|
console.log("✓ auth accessibility checks passed");
|