Skip to content

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.

chore(a11y): polish create→deploy flow accessibility and ease of use

nirholaseec1d87e40f3
diff --git a/agent-home.html b/agent-home.html
index 0f0fac6aa..82a80b8bd 100644
--- a/agent-home.html
+++ b/agent-home.html
@@ -198,6 +198,26 @@
border-color: rgba(255, 255, 255, 0.4);
}
+ .agent-stage-cta:focus-visible {
+ outline: 2px solid rgba(255, 215, 0, 0.7);
+ outline-offset: 3px;
+ }
+
+ .agent-stage-empty {
+ text-align: center;
+ color: rgba(255, 255, 255, 0.4);
+ font-size: 0.85rem;
+ margin: 1rem 0 0;
+ }
+
+ .agent-stage-share-status {
+ text-align: center;
+ color: #4ade80;
+ font-size: 0.75rem;
+ min-height: 1.2em;
+ margin: 0.6rem 0 0;
+ }
+
.agent-page-hero {
max-width: 520px;
margin: 2rem auto 2rem;
@@ -405,7 +425,7 @@
</header>
<main id="main">
- <section class="agent-stage" aria-label="Agent body">
+ <section class="agent-stage" aria-label="Agent body" aria-busy="true">
<model-viewer
id="agent-stage-viewer"
class="agent-stage-viewer"
@@ -417,20 +437,32 @@
interaction-prompt="none"
ar
ar-modes="webxr scene-viewer quick-look"
- alt="Agent avatar"
+ alt="Loading agent avatar"
></model-viewer>
+ <p class="agent-stage-empty" id="agent-stage-empty" hidden>
+ This agent doesn't have a body yet.
+ </p>
<div class="agent-stage-cta-row" id="agent-stage-ctas" hidden>
<a
class="agent-stage-cta agent-stage-cta--primary"
id="agent-stage-edit"
- href="#"
hidden
>Open in editor →</a
>
- <button class="agent-stage-cta agent-stage-cta--ghost" id="agent-stage-share">
+ <button
+ class="agent-stage-cta agent-stage-cta--ghost"
+ id="agent-stage-share"
+ aria-describedby="agent-stage-share-status"
+ >
Copy share link
</button>
</div>
+ <p
+ id="agent-stage-share-status"
+ class="agent-stage-share-status"
+ role="status"
+ aria-live="polite"
+ ></p>
</section>
<div class="agent-page-hero">
@@ -649,35 +681,54 @@
}
async function mountStage(identity) {
+ const stage = document.querySelector('.agent-stage');
const viewer = document.getElementById('agent-stage-viewer');
+ const empty = document.getElementById('agent-stage-empty');
const ctaRow = document.getElementById('agent-stage-ctas');
const editLink = document.getElementById('agent-stage-edit');
const shareBtn = document.getElementById('agent-stage-share');
+ const shareStatus = document.getElementById('agent-stage-share-status');
const agentUrl = `${location.origin}/agent/${identity.id}`;
+ const friendlyName = identity.name || 'Agent';
+ viewer.setAttribute('alt', `${friendlyName} avatar`);
ctaRow.hidden = false;
shareBtn.addEventListener('click', async () => {
try {
await navigator.clipboard.writeText(agentUrl);
- const original = shareBtn.textContent;
shareBtn.textContent = 'Copied ✓';
+ shareStatus.textContent = `Copied ${agentUrl} to clipboard`;
setTimeout(() => {
- shareBtn.textContent = original;
- }, 1400);
- } catch {}
+ shareBtn.textContent = 'Copy share link';
+ shareStatus.textContent = '';
+ }, 1800);
+ } catch {
+ shareStatus.textContent =
+ 'Could not copy automatically. Press Ctrl+C / Cmd+C to copy the URL above.';
+ }
});
try {
const me = await fetch('/api/auth/me', { credentials: 'include' });
if (me.ok) {
editLink.href = `/app?agent=${identity.id}`;
+ editLink.setAttribute(
+ 'aria-label',
+ `Open ${friendlyName} in the editor`,
+ );
editLink.hidden = false;
}
} catch {}
const glbUrl = await resolveAgentGlb(identity);
- if (glbUrl) viewer.src = glbUrl;
+ if (glbUrl) {
+ viewer.src = glbUrl;
+ } else {
+ empty.hidden = false;
+ viewer.style.display = 'none';
+ }
+ stage.setAttribute('aria-busy', 'false');
}
async function resolveAgentGlb(identity) {
diff --git a/app.html b/app.html
index 89ad89317..4b58e69ef 100644
--- a/app.html
+++ b/app.html
@@ -116,6 +116,7 @@
hidden
target="_blank"
rel="noopener"
+ aria-label="Open this agent's public profile in a new tab"
title="Open this agent's public profile in a new tab"
>
<svg
@@ -129,6 +130,7 @@
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
+ focusable="false"
>
<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />
<polyline points="15 3 21 3 21 9" />
diff --git a/src/erc8004/deploy-button.css b/src/erc8004/deploy-button.css
index f010f5d7a..b664e163c 100644
--- a/src/erc8004/deploy-button.css
+++ b/src/erc8004/deploy-button.css
@@ -1,5 +1,18 @@
/* deploy-button.css — scoped under .deploy-button-root */
+.visually-hidden {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px;
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0);
+ white-space: nowrap;
+ border: 0;
+}
+
+
.deploy-button-root {
display: inline-flex;
align-items: center;
diff --git a/src/erc8004/deploy-button.js b/src/erc8004/deploy-button.js
index 76c4be6a1..6a2003947 100644
--- a/src/erc8004/deploy-button.js
+++ b/src/erc8004/deploy-button.js
@@ -19,7 +19,7 @@ import { BrowserProvider } from 'ethers';
// Faucet links per testnet chainId
const FAUCETS = {
- 84532: 'https://www.coinbase.com/faucets/base-ethereum-goerli-faucet',
+ 84532: 'https://www.coinbase.com/faucets/base-ethereum-sepolia-faucet',
11155111: 'https://sepoliafaucet.com/',
421614: 'https://www.alchemy.com/faucets/arbitrum-sepolia',
11155420: 'https://app.optimism.io/faucet',
@@ -28,6 +28,12 @@ const FAUCETS = {
97: 'https://testnet.bnbchain.org/faucet-smart',
};
+const WALLET_INSTALL_URL = 'https://metamask.io/download/';
+
+function _hasWallet() {
+ return typeof window !== 'undefined' && !!window.ethereum;
+}
+
export class DeployButton {
/**
* @param {object} opts
@@ -141,9 +147,11 @@ export class DeployButton {
const cls = i < activeIdx ? 'done' : i === activeIdx ? 'active' : 'pending';
return `<span class="progress-step progress-step--${cls}">${_esc(s)}</span>`;
});
+ const liveText = activeIdx < steps.length ? `${steps[activeIdx]}…` : 'Done';
this._root.innerHTML = `
- <div class="deploy-progress">
- ${labels.join('<span class="progress-sep">&#x2192;</span>')}
+ <div class="deploy-progress" role="status" aria-live="polite" aria-label="Deployment progress">
+ ${labels.join('<span class="progress-sep" aria-hidden="true">&#x2192;</span>')}
+ <span class="visually-hidden">${_esc(liveText)}</span>
</div>
`;
}
@@ -167,6 +175,16 @@ export class DeployButton {
}
async _startDeploy() {
+ // Friendly handling for visitors with no wallet installed — give them a
+ // link instead of a cryptic "No wallet provider available" error.
+ if (!_hasWallet()) {
+ this._renderError('No wallet detected. Install one to deploy on-chain.', {
+ label: 'Install MetaMask',
+ handler: () => window.open(WALLET_INSTALL_URL, '_blank', 'noopener'),
+ });
+ return;
+ }
+
const steps = ['Estimating gas', 'Sign tx', 'Waiting confirmation', 'Done'];
this._renderProgress(steps, 0);