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.

fix(walk): keep the demo frames keyboard-reachable so axe stays clean

nirholas0d621cd72597
diff --git a/STRUCTURE.md b/STRUCTURE.md
index 4fa395f0c..2dce5d82e 100644
--- a/STRUCTURE.md
+++ b/STRUCTURE.md
@@ -18,7 +18,7 @@ bottom.
| Agent shell (companion identity + agentic ⌘K + persistent navigation) | [src/agents/guest-agent.js](src/agents/guest-agent.js), [src/shared/agent-names.js](src/shared/agent-names.js), [src/walk-companion-identity.js](src/walk-companion-identity.js), [public/search.js](public/search.js), [src/view-transitions.js](src/view-transitions.js), [src/shell/page-lifecycle.js](src/shell/page-lifecycle.js) | Live | The agent IS the interface: every visitor gets a named ephemeral agent in the first five seconds (auto-summoned corner companion with an identity chip; “Claim →” prefills /create-agent and POST /api/agents makes it real); the ⌘K palette executes real commands in place (forge → free text→3D lane, digest → clustered news, price → live market data, ask → streamed /api/chat) and announces completions so the companion reacts; pages marked data-shell (`/markets`, `/coins`) navigate by swapping only the main element so the agent and shell never unload (page modules re-init via onPageReady). Docs: [docs/agent-shell.md](docs/agent-shell.md). Tests: [tests/search-commands.test.js](tests/search-commands.test.js), [tests/guest-agent.test.js](tests/guest-agent.test.js), [tests/agent-names.test.js](tests/agent-names.test.js) |
| Walk companion + playground | [walk-sdk/](walk-sdk) `→ /walk-companion.js` | Published as `@three-ws/walk` | Corner mascot + full-page stroll/platformer playground + diverse avatar picker. App entries: [src/walk-companion.js](src/walk-companion.js), [src/walk-playground.js](src/walk-playground.js) |
| The walkaround world (`/temporary`) | [pages/temporary.html](pages/temporary.html) `→ /temporary`, app [src/walk.js](src/walk.js), environments [src/walk-environments.js](src/walk-environments.js) + [public/environments/](public/environments), multiplayer [src/walk-net.js](src/walk-net.js) → `walk_world`, day/night [src/walk-day-night.js](src/walk-day-night.js), radar [src/game/hud/minimap.js](src/game/hud/minimap.js), companions [src/walk-npcs.js](src/walk-npcs.js), agent desks [src/walk-agent-desk.js](src/walk-agent-desk.js) | Live | Walk your avatar through six real staged environments (park, cyberpunk street, beach, gallery, void, office) with physics-driven locomotion on a heightfield, four camera modes, gestures, voice chat, trails, capture, and live peers. **Time of day is real and shared:** the same deterministic world clock `/play` runs on ([src/shared/world-clock.js](src/shared/world-clock.js)) drives the sun arc, sky gradient, light levels, and IBL strength, so two people in the same world always agree on whether it is night. The sky crossfades on a wider curve than the light levels, so dawn and dusk linger instead of flipping. Armed for outdoor stages only (indoor/void keep their authored manifest lighting) and paused while AR passthrough owns the rig. **The radar is `/play`'s:** `/temporary` mounts the same rotating GTA-style minimap the world HUD uses, with a compass, the walkable-disc boundary ring, and live blips for peers (their nameplate colours), NPC companions, live agent desks, the guide's named landmarks, and scenery. Click or tap it to set a walk-to waypoint (`Minimap.worldFromScreen()` inverts the rotating projection); `M` or the dock button toggles it and the choice persists. **Frame pacing is shared too:** the loop runs through [src/shared/frame-governor.js](src/shared/frame-governor.js) (60fps focused, 30 unfocused, 30 under power saver) and the controls overlay carries the cross-surface Power-saver switch. Tests: [tests/walk-day-night.test.js](tests/walk-day-night.test.js), [tests/minimap-projection.test.js](tests/minimap-projection.test.js) |
-| Walk landing + one-tag embed (`/walk`) | [pages/walk-landing.html](pages/walk-landing.html) `→ /walk`, embed app [pages/walk-embed.html](pages/walk-embed.html) `→ /walk/app` and `→ /walk-embed` ([src/walk-embed.js](src/walk-embed.js)), board [pages/walk-leaderboard.html](pages/walk-leaderboard.html) `→ /walk-leaderboard`, ranking API [api/walk/leaderboard.js](api/walk/leaderboard.js), curated quotes [data/walk-social.json](data/walk-social.json) | Live | The marketing entry for Walk and the surface the `→ /walk` route actually serves (the walkaround world above is at `/temporary`). Live demo embeds across six environments, the copyable one-tag iframe snippet, the Chrome extension pitch, and a top-three teaser off the real all-time distance ranking, which reads `rows` straight from the leaderboard endpoint and falls back to designed empty and retryable error states. The five showcase iframes carry `tabindex="-1"`; the four joystick demos stay keyboard-reachable and get a scripted focus ring, because an iframe whose document holds focus matches no focus pseudo-class. Page copy is mirrored in the `walk_landing` namespace of [public/locales/en.json](public/locales/en.json), which the i18n runtime applies over the served HTML, so the two must be edited together. |
+| Walk landing + one-tag embed (`/walk`) | [pages/walk-landing.html](pages/walk-landing.html) `→ /walk`, embed app [pages/walk-embed.html](pages/walk-embed.html) `→ /walk/app` and `→ /walk-embed` ([src/walk-embed.js](src/walk-embed.js)), board [pages/walk-leaderboard.html](pages/walk-leaderboard.html) `→ /walk-leaderboard`, ranking API [api/walk/leaderboard.js](api/walk/leaderboard.js), curated quotes [data/walk-social.json](data/walk-social.json) | Live | The marketing entry for Walk and the surface the `→ /walk` route actually serves (the walkaround world above is at `/temporary`). Live demo embeds across six environments, the copyable one-tag iframe snippet, the Chrome extension pitch, and a top-three teaser off the real all-time distance ranking, which reads `rows` straight from the leaderboard endpoint and falls back to designed empty and retryable error states. All nine demo iframes stay keyboard-reachable, which axe's `frame-focusable-content` rule requires of any frame whose document has focusable content, and each gets a scripted focus ring because an iframe whose document holds focus matches no focus pseudo-class. Page copy is mirrored in the `walk_landing` namespace of [public/locales/en.json](public/locales/en.json), which the i18n runtime applies over the served HTML, so the two must be edited together. |
| Live Docs (runnable code samples) | Pure decisions [public/docs-live-core.js](public/docs-live-core.js), runner [public/docs-live.js](public/docs-live.js), styles [public/docs-live.css](public/docs-live.css), mounted by the docs viewer [docs/index.html](docs/index.html) | Live | Every code sample across the ~318 documentation pages is editable, and the runnable ones execute in place: an `html` snippet containing `<agent-3d>` renders a real animated avatar in a sandboxed frame directly under the code, a single-`curl` `bash` block sends a real request and reports status, latency, size, body and response headers, and a `js` snippet runs as a module with its console streamed back. Slots such as `$API_KEY` or `<agent-id>` become input fields, with credential-shaped names held in memory and never written to storage. The safety split is the design: everything deciding what a reader may fire lives in the pure core and is unit-tested rather than trusted to a click handler. Only three.ws hosts are reachable, any path that can move funds or mint is refused outright on every verb, writes arm before they send, every fetch goes out with `credentials: omit`, and frames run `sandbox="allow-scripts"` without `allow-same-origin`. Authors opt a block out with `<!-- live:off -->`. Loaded lazily after the first page render, so a page with no runnable samples costs nothing. Docs: [docs/live-docs.md](docs/live-docs.md) `→ /docs/live-docs`. Tests: [tests/docs-live-core.test.js](tests/docs-live-core.test.js) |
| Docs World (immersive 3D docs) | [pages/docs-world.html](pages/docs-world.html) `→ /docs/world`, app [src/docs-world/](src/docs-world) (world/player/controls/overlays), styles [public/docs-world.css](public/docs-world.css), shared manifest [docs/nav.json](docs/nav.json) | Live | The documentation as a walkable place: each section of the docs sidebar is a glowing pavilion on a ring; walk up (WASD / touch joystick, four shared camera modes via [src/game/camera-modes.js](src/game/camera-modes.js)) or tap one to list its pages, and read the live markdown in an in-world DOM reader ([src/shared/markdown.js](src/shared/markdown.js)). One content source: both surfaces read `docs/nav.json` + `/docs/<slug>.md`, so classic and immersive docs cannot drift. Deep links mirror the classic hash routes (`/docs/world#forge`); the classic header's "3D world" button carries the open page across. Avatar is the platform's default rigged body (the same one `/walk` uses, since the agent mannequin ships unskinned and cannot be clip-driven) or any rigged GLB via `?avatar=`, animated by the canonical clip library. No-WebGL devices get a designed fallback routing to `/docs`. Docs: [docs/docs-world.md](docs/docs-world.md). Tests: [tests/docs-world.test.js](tests/docs-world.test.js) |
| React avatar creator | [avatar-sdk/](avatar-sdk) `→ /react` `/creator` | Published as `@three-ws/avatar` | Same package, React subpath |
diff --git a/docs/validation.md b/docs/validation.md
index 244135628..5963cf60c 100644
--- a/docs/validation.md
+++ b/docs/validation.md
@@ -96,6 +96,22 @@ Validation runs automatically after every model load. The result appears in the
Clicking the bar opens the full **ValidatorReport** panel, which shows the model metadata, a summary banner, and per-severity tables of messages.
+### On the /validation page
+
+[`/validation`](/validation) runs both checks in the browser with no upload and no account. Three tabs share one input:
+
+| Tab | What it shows |
+|-----|----------------|
+| **Validate** | The Khronos report: summary banner, model metadata, and per-severity message tables. |
+| **Inspect** | A glTF-Transform pass the spec check does not cover: file and texture weight, triangle and draw-call counts, extensions used, and ranked optimization suggestions. |
+| **Records** | On-chain attestations for an agent, and the form that submits a new one. |
+
+Load a model three ways: drop a `.glb`/`.gltf` on the drop zone, click it to open the file picker (it is in the tab order, so this works from the keyboard), or paste a URL and press **Fetch**. The sample chips load Khronos reference models from jsDelivr. Both checks run in parallel on the same bytes, so opening **Inspect** after a run needs no second load. Every state has a designed result: an unreadable file, a fetch the host refuses (CORS is the usual cause), or a validator crash each render a failure card naming the cause, what to try next, and a **Try again** button that reruns the same input. Nothing leaves the browser on either lane.
+
+Each report offers **Download JSON**. **Sign & pin on-chain** hands the in-memory report straight to the Records submit flow with its keccak256 hash precomputed, skipping the download-and-re-upload round trip.
+
+The tab is reflected in the URL hash (`#validate`, `#inspect`, `#records`), and the Records tab reads `?agent=` and `?chain=` from the query string, so a specific agent's records are linkable.
+
### Via the agent
Ask the agent in natural language:
@@ -335,13 +351,14 @@ Check your file in at least two other viewers before registering it:
## Validation UI components
-Three components render validation state in the browser:
+Four components render validation state in the browser:
| Component | File | Purpose |
|-----------|------|---------|
| `ValidatorToggle` | `src/components/validator-toggle.jsx` | Compact status bar; shows issue counts and severity class. Clicking opens the full report. |
| `ValidatorReport` | `src/components/validator-report.jsx` | Full report panel: model metadata, summary banner, per-severity message tables, and a JSON download link. |
| `ValidatorTable` | `src/components/validator-table.jsx` | Tabular view of messages for one severity level (Code / Message / Pointer columns). |
+| `InspectReport` | `src/components/inspect-report.jsx` | Performance panel for the `/validation` Inspect tab: stat cards, optimization suggestions, extension and texture tables. |
The toggle's CSS class reflects the highest severity: `level-0` (errors), `level-1` (warnings), `level-2` (infos), `level-3` (hints), or no class (clean). Style these classes to match your embedding context.
diff --git a/pages/walk-landing.html b/pages/walk-landing.html
index 3c6f82b13..a318272e7 100644
--- a/pages/walk-landing.html
+++ b/pages/walk-landing.html
@@ -194,12 +194,12 @@
border: 0;
background: transparent;
}
- /* The joystick demos are drivable from the keyboard, so they keep their
- tab stop. An iframe paints no focus ring of its own, and once focus
- crosses into its document the element matches none of :focus,
- :focus-within or :focus-visible, so the class below is toggled from
- script. The offset is negative because .wl-frame clips its overflow,
- which would swallow a ring drawn outside the iframe's edge. */
+ /* Each demo frame is a keyboard tab stop. An iframe paints no focus
+ ring of its own, and once focus crosses into its document the
+ element matches none of :focus, :focus-within or :focus-visible, so
+ the class below is toggled from script. The offset is negative
+ because .wl-frame clips its overflow, which would swallow a ring
+ drawn outside the iframe's edge. */
.wl-frame iframe.is-frame-focused,
.wl-ext-mock-frame iframe.is-frame-focused {
outline: var(--focus-ring-width) solid var(--focus-ring-color);
@@ -718,7 +718,6 @@
<iframe
src="/walk-embed?env=void&autoplay=true&controls=none&orbit=false"
title="Live demo: a 3D avatar walking in the void environment"
- tabindex="-1"
allow="accelerometer; gyroscope"
></iframe>
<span class="wl-frame-hint" data-i18n="walk_landing.live_walking_now">Live · walking now</span>
@@ -796,7 +795,6 @@
<iframe
data-src="/walk-embed?env=studio&autoplay=true&controls=none&orbit=false"
title="Step preview: a generated avatar idling in the studio"
- tabindex="-1"
loading="lazy"
></iframe>
</div>
@@ -811,7 +809,6 @@
<iframe
data-src="/walk-embed?env=sunset&autoplay=true&controls=none&orbit=false"
title="Step preview: an avatar walking at sunset"
- tabindex="-1"
loading="lazy"
></iframe>
</div>
@@ -826,7 +823,6 @@
<iframe
data-src="/walk-embed?env=void&autoplay=true&controls=none&orbit=false"
title="Step preview: an avatar walking, ready to embed"
- tabindex="-1"
loading="lazy"
></iframe>
</div>
@@ -893,7 +889,6 @@
<iframe
data-src="/walk-embed?autoplay=true&controls=none&orbit=false&ground=false"
title="A walking avatar overlaid on a web page"
- tabindex="-1"
loading="lazy"
></iframe>
</div>
@@ -1059,13 +1054,14 @@
lazyFrames.forEach((f) => frameIo.observe(f));
}
- // ── Keyboard focus ring for the drivable demos ───────────────
- // Focus crossing into an iframe blurs the top window and leaves the
- // element matching no focus pseudo-class, so the ring is applied here
- // instead. Only the joystick demos take focus; the showcase frames
- // carry tabindex="-1" and are skipped.
- const focusableFrames = [...document.querySelectorAll('.wl-frame iframe, .wl-ext-mock-frame iframe')]
- .filter((f) => f.tabIndex > -1);
+ // ── Keyboard focus ring for the demo frames ──────────────────
+ // Every embed is a tab stop, and has to be: each one loads a document
+ // with focusable content, which axe's frame-focusable-content rule
+ // requires stay reachable. But focus crossing into an iframe blurs the
+ // top window and leaves the element matching no focus pseudo-class, so
+ // a keyboard user landed in a demo with nothing on screen saying so.
+ // The ring is applied from here instead.
+ const focusableFrames = [...document.querySelectorAll('.wl-frame iframe, .wl-ext-mock-frame iframe')];
const syncFrameFocus = () => {
for (const f of focusableFrames) {
f.classList.toggle('is-frame-focused', f === document.activeElement);
diff --git a/public/validation/index.html b/public/validation/index.html
index a4df9d5e6..7bc763ff1 100644
--- a/public/validation/index.html
+++ b/public/validation/index.html
@@ -780,7 +780,10 @@
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
- z-index: 60;
+ /* Above the shared site chrome: nav.css stacks the sticky header at
+ 100 and its popovers up to 10000, so a dialog at 60 let the header
+ sit on top of its own scrim and stay clickable. */
+ z-index: 10050;
display: grid;
place-items: center;
opacity: 0;
@@ -788,12 +791,15 @@
/* visibility, not just opacity: an opacity-0 dialog keeps its
controls in the tab order and swallows keyboard focus. */
visibility: hidden;
- transition: opacity 0.15s, visibility 0.15s;
+ /* visibility flips instantly on open (so the dialog is focusable on the
+ same tick) and only after the fade on close. */
+ transition: opacity 0.15s, visibility 0s linear 0.15s;
}
.modal-overlay.open {
opacity: 1;
pointer-events: auto;
visibility: visible;
+ transition: opacity 0.15s, visibility 0s;
}
.modal {
background: #0f0f0f;
@@ -881,7 +887,7 @@
border-radius: 99px;
font-size: 13px;
color: #ddd;
- z-index: 70;
+ z-index: 10060;
box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
}
.toast.err {
@@ -1149,7 +1155,7 @@
<!-- Submit Modal — IDs preserved so ValidationDashboard wiring still works -->
<div class="modal-overlay" id="submit-modal">
- <div class="modal" role="dialog" aria-modal="true" aria-labelledby="submit-modal-title">
+ <div class="modal" role="dialog" aria-modal="true" tabindex="-1" aria-labelledby="submit-modal-title">
<h2 id="submit-modal-title" data-i18n="validation_index.submit_validation_report">Submit Validation Report</h2>
<p class="sub" data-i18n="validation_index.upload_a_json_validation_report_signed_by">
Upload a JSON validation report, signed by your wallet and stored on-chain.
diff --git a/src/validation-ui.js b/src/validation-ui.js
index 721b3ce4c..9f9599008 100644
--- a/src/validation-ui.js
+++ b/src/validation-ui.js
@@ -284,8 +284,14 @@ export class ValidationDashboard {
this.els.reportFile.value = '';
this.els.fileStatus.textContent = '';
this.els.submitReportBtn.disabled = true;
- const first = this._focusables()[0];
- if (first) first.focus();
+ // Focus the dialog itself so its title is announced and Escape/Tab land
+ // inside it. The offsetWidth read is not decoration: it flushes the style
+ // change above, and focus() on a still-computed-hidden subtree is a noop.
+ const dialog = this.els.submitModal.querySelector('.modal');
+ if (dialog) {
+ void this.els.submitModal.offsetWidth;
+ dialog.focus();
+ }
}
closeModal() {