Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
fix(auth): give the near-black auth pages a visible focus ring and readable labels
nirholas5c23f0bf4060
diff --git a/public/auth.css b/public/auth.cssindex 243b825ac..4acebf6ec 100644--- a/public/auth.css+++ b/public/auth.css@@ -7,6 +7,15 @@* { box-sizing: border-box; }+/* Auth pages paint themselves near-black, where the UA default focus ring+ (a 1px near-black outline) is invisible. Text inputs already draw their own+ lit border on focus, so they are excluded; everything else keyboard users+ can reach gets an explicit, high-contrast ring in the brand accent. */+:where(a, button, [tabindex]):focus-visible {+ outline: 2px solid #6e8bff;+ outline-offset: 3px;+}+.header-logo {width: 14px;height: 14px;diff --git a/public/brand.js b/public/brand.jsindex 94e7b4aa9..661af1b24 100644--- a/public/brand.js+++ b/public/brand.js@@ -119,7 +119,7 @@var a = document.createElement('a');a.className = 'brand-mark-chip';a.href = '/';- a.setAttribute('aria-label', 'three.ws — home');+ a.setAttribute('aria-label', 'three.ws home');a.innerHTML ='<img class="brand-mark" src="/three.svg" alt="three.ws" width="24" height="24" />';document.body.appendChild(a);diff --git a/public/forgot-password.html b/public/forgot-password.htmlindex 5f5e1cbcf..ac221255d 100644--- a/public/forgot-password.html+++ b/public/forgot-password.html@@ -61,12 +61,15 @@}.brand img { height: 40px; width: auto; display: block; }.brand:hover { opacity: 1; }+ /* Label, hint and footer sit on the #0c0c0c card, where the previous+ #666 / #555 greys measured 3.4:1 and 2.6:1 against it and failed+ WCAG AA for body text. These clear 4.5:1 while staying subdued. */label {display: block;font-size: 12px;font-weight: 500;letter-spacing: 0.02em;- color: #666;+ color: #8a8a8a;margin: 16px 0 6px;text-transform: uppercase;transition: color 0.1s ease;@@ -92,7 +95,7 @@.field-hint {font-size: 12px;margin-top: 4px;- color: #555;+ color: #808080;transition: color 0.15s;}button {@@ -137,7 +140,7 @@margin-top: 22px;text-align: center;font-size: 13px;- color: #666;+ color: #808080;}</style>@@ -203,7 +206,11 @@</form><div class="panel"><a href="/" class="panel-brand" aria-label="three.ws home" data-i18n="forgot_password.three_ws" data-i18n-attr="aria-label:forgot_password.three_ws_home_arialabel">three.ws</a>- <div class="agent-avatar loading" id="forgot-avatar-wrap" aria-hidden="true">+ <!-- The avatar is decoration. aria-hidden alone still lets a Tab land+ inside model-viewer's shadow DOM (its AR and poster controls),+ which drops keyboard users into a subtree screen readers cannot+ see; inert takes the whole panel out of the focus order too. -->+ <div class="agent-avatar loading" id="forgot-avatar-wrap" aria-hidden="true" inert><model-viewerid="forgot-avatar"src="/avatars/cz.glb"@@ -326,14 +333,46 @@const form = document.getElementById('f');const err = document.getElementById('err');+ const errServer = document.getElementById('err-server');+ const errNetwork = document.getElementById('err-network');const ok = document.getElementById('ok');const btn = document.getElementById('submit');++ // Both failure sentences ship in the markup so the catalog translates+ // them like the rest of the page; showing one is a hidden-attribute+ // flip, never a string the script invents.+ function showError(which) {+ errServer.hidden = which !== errServer;+ errNetwork.hidden = which !== errNetwork;+ err.hidden = false;+ }++ // The idle label is read the first time the button goes busy, not at+ // parse time: the i18n catalog lands after this script runs, so an+ // early capture would restore an English label onto a translated page.+ let idleLabel = null;+ function setBusy(busy) {+ if (busy) {+ if (idleLabel === null) idleLabel = btn.textContent;+ btn.setAttribute('data-i18n-owned', '1');+ btn.setAttribute('aria-busy', 'true');+ btn.disabled = true;+ btn.textContent = btn.dataset.sendingLabel;+ return;+ }+ btn.disabled = false;+ btn.removeAttribute('aria-busy');+ btn.textContent = idleLabel;+ btn.removeAttribute('data-i18n-owned');+ // Covers a catalog that arrived while the button was script-owned.+ window.threewsI18n?.apply?.(form);+ }+form.addEventListener('submit', async (e) => {e.preventDefault();- err.style.display = 'none';- ok.style.display = 'none';- btn.disabled = true;- btn.textContent = 'Sending…';+ err.hidden = true;+ ok.hidden = true;+ setBusy(true);try {const res = await fetch('/api/auth/forgot-password', {method: 'POST',@@ -344,24 +383,16 @@});// The server always answers 200 with a privacy-preserving body// (it never reveals whether an account exists). A 5xx is a real- // server fault, not that response — surface it so the user can retry.- if (res.status >= 500) {- err.textContent =- 'Something went wrong on our end — your reset link wasn’t sent. Please try again.';- err.style.display = 'block';- } else {- ok.style.display = 'block';- }+ // server fault, not that response, so surface it for a retry.+ if (res.status >= 500) showError(errServer);+ else ok.hidden = false;} catch {// A fetch rejection means the request never reached the server// (offline / DNS / transport). Showing the success message here// would tell the user a link is on the way when nothing was sent.- err.textContent =- "Couldn't reach the server — check your connection and try again.";- err.style.display = 'block';+ showError(errNetwork);} finally {- btn.disabled = false;- btn.textContent = 'Send reset link';+ setBusy(false);}});</script>