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
feat(accessibility): enhance ARIA attributes and animations for improved user experience across tabs
fudjia34249eeca4bd
diff --git a/src/agent-wallet-hub/index.js b/src/agent-wallet-hub/index.jsindex 8d3de238a..f481549c4 100644--- a/src/agent-wallet-hub/index.js+++ b/src/agent-wallet-hub/index.js@@ -249,6 +249,18 @@ export function mountAgentWalletHub({ mount, agent, initialTab, onNetworkChangeconst tabButtons = [...mount.querySelectorAll('[data-awh-tab]')];const panelFor = (id) => mount.querySelector(`[data-awh-panel="${CSS.escape(id)}"]`);+ // Panels are created once and shown/hidden via [hidden], so the awh-fade+ // animation only fires on first paint. Replay it on each tab switch so a+ // section enters with intent — honouring prefers-reduced-motion live.+ const reduceMotionMq =+ typeof matchMedia === 'function' ? matchMedia('(prefers-reduced-motion: reduce)') : null;+ function playPanelIn(panel) {+ if (!panel || reduceMotionMq?.matches) return;+ panel.style.animation = 'none';+ void panel.offsetWidth; // force reflow so the re-added animation restarts+ panel.style.animation = '';+ }+// Lazy-mount each tab on first activation; keep the instance so onShow/onHide// and destroy can fire. A tab mount that throws degrades to an inline error// rather than breaking the whole hub.@@ -310,6 +322,7 @@ export function mountAgentWalletHub({ mount, agent, initialTab, onNetworkChange}if (prev && instances.has(prev)) instances.get(prev)?.onHide?.();ensureMounted(id)?.onShow?.();+ playPanelIn(panelFor(id));try {history.replaceState(null, '', `#${id}`);} catch {diff --git a/src/agent-wallet-hub/tabs/access.js b/src/agent-wallet-hub/tabs/access.jsindex 382b20795..413372c40 100644--- a/src/agent-wallet-hub/tabs/access.js+++ b/src/agent-wallet-hub/tabs/access.js@@ -271,7 +271,7 @@ registerWalletTab({<input type="text" id="awh-acc-label" data-f="label" placeholder="e.g. Weather API integration" maxlength="120" autocomplete="off" /></div><div class="awh-acc-field">- <label>Allowed actions</label>+ <label id="awh-acc-actions-label">Allowed actions</label><div class="awh-acc-checks"><label class="awh-acc-check"><input type="checkbox" data-f="action" value="trade" /> Trade</label><label class="awh-acc-check"><input type="checkbox" data-f="action" value="snipe" /> Snipe</label>diff --git a/src/agent-wallet-hub/tabs/autopilot.js b/src/agent-wallet-hub/tabs/autopilot.jsindex cbbe488cc..c03d98f0c 100644--- a/src/agent-wallet-hub/tabs/autopilot.js+++ b/src/agent-wallet-hub/tabs/autopilot.js@@ -378,7 +378,7 @@ registerWalletTab({if (!res) return '';if (!res.ran) {const reason = (res.reason || '').replace(/_/g, ' ');- return `<div class="ap-warn amber">Last run did nothing — ${esc(res.note || reason || 'no due rules')}.</div>`;+ return `<div class="ap-warn amber" role="status">Last run did nothing — ${esc(res.note || reason || 'no due rules')}.</div>`;}const rows = (res.results || []).map((r) => {const tone = STATUS_TONE[r.last_status] || 'muted';diff --git a/src/agent-wallet-hub/tabs/portfolio.js b/src/agent-wallet-hub/tabs/portfolio.jsindex 24a05ce29..ebb62ff24 100644--- a/src/agent-wallet-hub/tabs/portfolio.js+++ b/src/agent-wallet-hub/tabs/portfolio.js@@ -361,7 +361,7 @@ registerWalletTab({const warn = h.liquidity_warning ? `<span class="awh-port-warn" title="No live market price — value shown is unknown, never guessed.">illiquid</span>` : '';const tradeBtn = h.isNative? ''- : `<button class="awh-btn awh-port-trade" type="button" data-trade="${escapeHtml(h.mint || '')}">Trade ↗</button>`;+ : `<button class="awh-btn awh-port-trade" type="button" data-trade="${escapeHtml(h.mint || '')}" aria-label="Trade ${sym}">Trade ↗</button>`;return `<tr><td><div class="awh-port-asset">${img}diff --git a/src/agent-wallet-hub/tabs/snipe.js b/src/agent-wallet-hub/tabs/snipe.jsindex 25be04af9..826225a59 100644--- a/src/agent-wallet-hub/tabs/snipe.js+++ b/src/agent-wallet-hub/tabs/snipe.js@@ -240,7 +240,7 @@ registerWalletTab({<h2>Describe a snipe strategy</h2><p class="sub">Write it in plain English. We compile it into a validated config — clamped to this agent's spend guards — then backtest it against three.ws's own real launch history before you risk a lamport.</p><textarea class="sb-ta" id="sb-src" aria-label="Describe your snipe strategy in plain English" placeholder="${esc(EXAMPLES[0])}" ${busy ? 'disabled' : ''}>${esc(state.source)}</textarea>- <div class="sb-egs">${EXAMPLES.map((e, i) => `<button class="sb-eg" data-eg="${i}">${esc(e.length > 60 ? e.slice(0, 58) + '…' : e)}</button>`).join('')}</div>+ <div class="sb-egs" role="group" aria-label="Example strategies — tap to use one">${EXAMPLES.map((e, i) => `<button type="button" class="sb-eg" data-eg="${i}" title="${esc(e)}">${esc(e.length > 60 ? e.slice(0, 58) + '…' : e)}</button>`).join('')}</div><div class="sb-actions"><button class="sb-btn primary" id="sb-compile" ${busy ? 'disabled' : ''}>${busy ? '<span class="sb-spin"></span>Compiling…' : (state.compiled ? 'Re-compile' : 'Compile strategy')}</button><a class="sb-dash" href="${esc(dashUrl)}">Open the Sniper dashboard</a>diff --git a/src/agent-wallet-hub/tabs/withdraw.js b/src/agent-wallet-hub/tabs/withdraw.jsindex 1f5f99b1b..749badb59 100644--- a/src/agent-wallet-hub/tabs/withdraw.js+++ b/src/agent-wallet-hub/tabs/withdraw.js@@ -252,7 +252,7 @@ registerWalletTab({return `<div class="awh-card"><div class="awh-skel-line" style="width:40%"></div><div class="awh-skel-line"></div><div class="awh-skel-line"></div><div class="awh-skel-line" style="width:60%"></div></div>`;}if (state.holdingsErr) {- return `<div class="awh-card"><div class="awh-err">Couldn’t load balances.<div class="why">${esc(state.holdingsErr)}</div></div><button class="awh-btn" type="button" data-act="reload-holdings">Retry</button></div>`;+ return `<div class="awh-card"><div class="awh-err" role="alert">Couldn’t load balances.<div class="why">${esc(state.holdingsErr)}</div></div><button class="awh-btn" type="button" data-act="reload-holdings">Retry</button></div>`;}const assets = assetList();if (!assets.length) {