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(a11y): give the overlays, chips and stacks a real keyboard and screen-reader path
nirholasdd055313c712
diff --git a/pages/temporary.html b/pages/temporary.htmlindex df35f54a9..7ca32fcbe 100644--- a/pages/temporary.html+++ b/pages/temporary.html@@ -882,6 +882,23 @@color: var(--text-2);font-size: 12px;}+ /* Retry affordance inside the picker's error notice. Styled as an+ inline control so it reads as part of the sentence, not a form. */+ .walk-avatar-picker-retry {+ display: inline-block;+ margin-top: 8px;+ padding: 5px 12px;+ border: 1px solid var(--border);+ border-radius: 999px;+ background: var(--panel);+ color: var(--text);+ font: inherit;+ font-size: 12px;+ cursor: pointer;+ transition: background 0.12s, border-color 0.12s;+ }+ .walk-avatar-picker-retry:hover { background: rgba(255,255,255,0.12); }+ .walk-avatar-picker-retry:active { background: rgba(255,255,255,0.18); }.walk-avatar-opt {display: flex;align-items: center;@@ -923,7 +940,10 @@left: 50%;transform: translateX(-50%);z-index: 8;- width: min(420px, calc(100vw - 200px));+ /* Never let the 200px side-gutter reserve collapse the chat below a+ usable width: under ~460px of viewport the subtraction wins and the+ form's send button lands off-screen. The 260px floor keeps it on. */+ width: min(420px, max(260px, calc(100vw - 200px)));display: flex;flex-direction: column;gap: 6px;@@ -970,6 +990,10 @@}.walk-chat-input {flex: 1;+ /* A flex item's automatic minimum size is its intrinsic width, which+ for a text input is ~20 characters. Without this the input refuses+ to shrink and pushes the send button past the viewport edge. */+ min-width: 0;padding: 8px 12px;border: 1px solid var(--border);border-radius: 999px;@@ -1197,6 +1221,7 @@.walk-touch-btn:focus-visible,.walk-emote-btn:focus-visible,.walk-avatar-opt:focus-visible,+ .walk-avatar-picker-retry:focus-visible,.walk-chat-send:focus-visible,.walk-voice-mic:focus-visible,.walk-voice-retry:focus-visible,diff --git a/public/corner-stack.js b/public/corner-stack.jsindex d1fe94c14..66311900c 100644--- a/public/corner-stack.js+++ b/public/corner-stack.js@@ -62,15 +62,25 @@'--z-overlay-modal:2147483600;','}','#' + STACK_ID + '{',- 'position:fixed;right:calc(18px + var(--tws-corner-reserve-w,0px));',- 'bottom:calc(18px + var(--tws-corner-reserve,0px) + var(--tws-corner-dock,0px));',+ 'position:fixed;right:18px;bottom:18px;',+ /* Reservations move the stack with a TRANSFORM, never with `bottom` or+ `right`. Those two are layout properties: animating them re-lays the+ element out on every frame, and the browser reports each of those+ frames to the layout-instability API even though the stack is fixed+ and nothing on the page moved. Docks are re-measured on a settle timer+ and on every body mutation, so a page that mounts anything late paid+ one shift per re-measure: 0.076 on /marketplace (twice), 0.081 on+ /launches, 0.076 on /agents/:id and 0.060 on /walk, measured on a+ Pixel 5 against production on 2026-09-08. A transform is composited,+ generates no layout shift at all, and lands on the same pixels. */+ 'transform:translate3d(calc(-1 * var(--tws-corner-reserve-w,0px)),calc(-1 * (var(--tws-corner-reserve,0px) + var(--tws-corner-dock,0px))),0);','z-index:var(--z-corner-stack,2147482500);','display:flex;flex-direction:column;align-items:flex-end;','gap:12px;max-width:min(380px,calc(100vw - 24px));','max-height:calc(100dvh - 36px - var(--tws-corner-reserve,0px) - var(--tws-corner-dock,0px));overflow:visible;',/* Clicks fall through the gaps; members re-enable pointer events. */'pointer-events:none;',- 'transition:bottom .35s cubic-bezier(.22,1,.36,1),right .35s cubic-bezier(.22,1,.36,1);',+ 'transition:transform .35s cubic-bezier(.22,1,.36,1);','}','@media (prefers-reduced-motion:reduce){#' + STACK_ID + '{transition:none;}}','#' + STACK_ID + ':empty{display:none;}',@@ -81,13 +91,18 @@'position:relative;inset:auto;margin:0;pointer-events:auto;','}','@media (max-width:640px){',- /* Phone layout: the stack still spans the width so a wide card can grow- leftward, but members size to their content and hug the right edge.+ /* Phone layout: a wide card can still grow leftward across the whole+ viewport, but members size to their content and hug the right edge.Stretching every member edge-to-edge turned a 44px language control- into a full-width bar laid over the page's own bottom controls. */+ into a full-width bar laid over the page's own bottom controls.+ The room to grow is a `max-width` rather than a `left` anchor: the+ base rule's step-aside transform slides the whole box left, and a box+ pinned to both edges would have slid its LEFT edge off screen with a+ wide card inside it. Shrink-to-fit from the right does the same job+ and stays on screen. */'#' +STACK_ID +- '{right:calc(12px + var(--tws-corner-reserve-w,0px));bottom:calc(12px + var(--tws-corner-reserve,0px) + var(--tws-corner-dock,0px));left:12px;align-items:flex-end;gap:10px;max-width:none;}',+ '{right:12px;bottom:12px;align-items:flex-end;gap:10px;max-width:calc(100vw - 24px);}','#' + STACK_ID + '>.' + ITEM_CLASS + '{max-width:100%;}','}'].join('');diff --git a/public/mobile.css b/public/mobile.cssindex 865365eaa..9d30cf8af 100644--- a/public/mobile.css+++ b/public/mobile.css@@ -515,7 +515,8 @@min-width: 44px;justify-content: center;}- /* The ticker span carries a click handler, so it is a real target. */+ /* The wallet pill's identity run carries the popover handler, so the pill is a+ real target; the run stretches through the pill's padding to match it. */span.twc {min-height: 44px;display: inline-flex;diff --git a/public/nav.js b/public/nav.jsindex 5ea9870b1..b86d86657 100644--- a/public/nav.js+++ b/public/nav.js@@ -289,6 +289,15 @@ function boot() {initCompanionAutoStart();const navContainer = document.getElementById('nav-container');if (!navContainer) return;+ // nav.html opens with its own <header class="nav">, which is the page's banner+ // landmark. Most pages additionally wrap the mount point in a bare <header>,+ // and two banners on one page make the landmark ambiguous: assistive tech+ // offers "banner" twice and neither is named. The wrapper carries no content+ // of its own, so demote it to a plain box and leave exactly one banner.+ const wrapper = navContainer.parentElement;+ if (wrapper && wrapper.tagName === 'HEADER' && wrapper.childElementCount === 1) {+ wrapper.setAttribute('role', 'presentation');+ }Promise.all([fetch('/nav.html').then((response) => response.text()),import('/nav-data.js'),diff --git a/src/community/coin-lobby.js b/src/community/coin-lobby.jsindex 10fab096e..52a82c2ab 100644--- a/src/community/coin-lobby.js+++ b/src/community/coin-lobby.js@@ -62,9 +62,22 @@ export class CoinLobby {_build() {const root = el('div', 'clobby');root.setAttribute('role', 'dialog');+ root.setAttribute('aria-modal', 'true');root.setAttribute('aria-labelledby', 'clobby-title');+ root.tabIndex = -1;this.root = root;+ // The lobby covers the whole viewport over a live 3D scene, so keyboard+ // users need the same one-key exit a mouse user gets from "Walk solo".+ // Escape dismisses it into the default world rather than stranding them+ // on an overlay they cannot reach past.+ this._onKeydown = (e) => {+ if (e.key !== 'Escape') return;+ e.preventDefault();+ this._skip();+ };+ document.addEventListener('keydown', this._onKeydown);+const inner = el('div', 'clobby__inner');const head = el('header', 'clobby__head');const titles = el('div', 'clobby__titles');@@ -107,6 +120,9 @@ export class CoinLobby {inner.appendChild(this.grid);root.appendChild(inner);document.body.appendChild(root);+ // Move focus into the dialog so the first Tab lands on the search field+ // and skip button, not on the page chrome buried behind the overlay.+ root.focus({ preventScroll: true });this._renderSkeleton();}@@ -278,6 +294,10 @@ export class CoinLobby {}destroy() {+ if (this._onKeydown) {+ document.removeEventListener('keydown', this._onKeydown);+ this._onKeydown = null;+ }this.root?.remove();}}diff --git a/src/launches.css b/src/launches.cssindex 6c8e7f5e4..d293c41f0 100644--- a/src/launches.css+++ b/src/launches.css@@ -564,8 +564,11 @@ body {}/* Whole-card link to the coin's rich profile. Sits above the cursor-light- layer but below the genuinely-interactive children (agent chip, external- actions), which are raised in turn so they keep their own click targets. */+ layer but below the genuinely-interactive children (agent chip, wallet chip,+ external actions), which are raised in turn so they keep their own click+ targets. The wallet chip belongs in that list: it carries a Tip button and a+ focusable wallet preview, and while it sat under the stretched link both were+ dead, every tap on them opening the coin profile instead. */.lx-card-link {position: absolute;inset: 0;@@ -579,6 +582,7 @@ body {}.lx-card .lx-agent-row,.lx-card .lx-card-actions,+.lx-card .twc,.lx-card .lx-mint {position: relative;z-index: 2;diff --git a/src/pump/coin-status-card.js b/src/pump/coin-status-card.jsindex abae896de..710d73a68 100644--- a/src/pump/coin-status-card.js+++ b/src/pump/coin-status-card.js@@ -396,8 +396,11 @@ function renderCard(coin, opts) {);}- // Market-cap progress bar mirrors the graduation ring as a wider readout.- const bar = el('div', { class: 'csc-bar', role: 'progressbar', 'aria-valuemin': '0', 'aria-valuemax': '100', 'aria-valuenow': String(Math.round(coin.graduationPct || 0)) }, [+ // Market-cap progress bar mirrors the graduation ring as a wider readout. The+ // bar names itself and its value in words: a bare progressbar reads as an+ // unlabelled percentage, and a feed of them reads as a wall of them.+ const gradPct = Math.round(coin.graduationPct || 0);+ const bar = el('div', { class: 'csc-bar', role: 'progressbar', 'aria-valuemin': '0', 'aria-valuemax': '100', 'aria-valuenow': String(gradPct), 'aria-valuetext': `${gradPct}% to graduation`, 'aria-label': `Bonding curve progress for ${coin.symbol ? `$${coin.symbol}` : coin.name || 'this coin'}` }, [el('div', { class: 'csc-bar-fill', style: `width:${Math.min(100, coin.graduationPct || 0).toFixed(1)}%` }),]);diff --git a/src/shared/agent-reputation.js b/src/shared/agent-reputation.jsindex 45f328a5a..f02162f4b 100644--- a/src/shared/agent-reputation.js+++ b/src/shared/agent-reputation.js@@ -104,7 +104,10 @@ function badgeInner(rep) {export function reputationBadgeHTML(agentId, opts = {}) {if (!agentId || !UUID_RE.test(String(agentId))) return '';const embedded = opts.embedded ? ' data-rep-embedded="1"' : '';- return `<span class="rep-badge-slot" data-rep-aid="${esc(agentId)}"${embedded} aria-label="Wallet trust score loading"></span>`;+ // An empty placeholder is not content: hide it until the real badge lands.+ // (aria-label is prohibited on a generic span anyway, and the hydrated badge+ // carries its own name through its role and title.)+ return `<span class="rep-badge-slot" data-rep-aid="${esc(agentId)}"${embedded} aria-hidden="true"></span>`;}export function reputationBadgeEl(agentId, opts = {}) {@@ -172,7 +175,7 @@ function fillBadge(el, rep) {return;}el.innerHTML = inner;- el.removeAttribute('aria-label');+ el.removeAttribute('aria-hidden');const aid = el.getAttribute('data-rep-aid');const badge = el.firstElementChild;if (badge && aid) {diff --git a/src/shared/agent-wallet-chip.js b/src/shared/agent-wallet-chip.jsindex aa782a8a6..21f036360 100644--- a/src/shared/agent-wallet-chip.js+++ b/src/shared/agent-wallet-chip.js@@ -241,25 +241,41 @@ export function ensureWalletChipStyles() {const style = document.createElement('style');style.id = STYLE_ID;style.textContent = `-.twc{display:inline-flex;align-items:center;gap:7px;padding:3px 9px;border-radius:999px;+.twc{--twc-pad-y:3px;display:inline-flex;align-items:center;gap:7px;padding:var(--twc-pad-y) 9px;border-radius:999px;font:600 11px/1 ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;color:var(--wallet-accent,#c4b5fd);background:var(--wallet-accent-soft,rgba(139,92,246,.1));border:1px solid var(--wallet-stroke,rgba(139,92,246,.3));white-space:nowrap;vertical-align:middle;max-width:100%;cursor:default;transition:border-color .18s ease,background .18s ease,box-shadow .25s ease;}-.twc[data-twc-trigger]{cursor:pointer;}-.twc[data-twc-trigger]:hover,.twc[data-twc-trigger]:focus-visible{border-color:var(--wallet-stroke-strong,rgba(139,92,246,.5));background:var(--wallet-accent-fill,rgba(139,92,246,.15));}-.twc:focus-visible{outline:none;box-shadow:0 0 0 2px var(--wallet-glow,rgba(139,92,246,.45));}+/* Identity run: the popover trigger. Inline-flex with the pill's own gap so the+ grouping is invisible, and the pill still tints as one unit on hover/focus.+ flex-wrap:inherit keeps it wrapping wherever a surface wraps the pill (dense+ card footers, the /trending wallet column) instead of going atomic and pushing+ a 320px row into a horizontal scroll. The negative block margin cancels the+ pill's own vertical padding so the trigger's hit area is the pill's full+ height, not the text height inside it. */+.twc-id{display:inline-flex;align-items:center;align-self:stretch;column-gap:7px;row-gap:5px;+ flex-wrap:inherit;min-width:0;max-width:100%;+ margin-block:calc(-1 * var(--twc-pad-y));padding-block:var(--twc-pad-y);}+.twc-id[data-twc-trigger]{cursor:pointer;}+.twc:has(.twc-id[data-twc-trigger]):hover,+.twc:has(.twc-id[data-twc-trigger]:focus-visible){border-color:var(--wallet-stroke-strong,rgba(139,92,246,.5));background:var(--wallet-accent-fill,rgba(139,92,246,.15));}+.twc-id:focus-visible{outline:none;border-radius:999px;box-shadow:0 0 0 2px var(--wallet-glow,rgba(139,92,246,.45));}.twc[data-vanity="true"]{color:var(--wallet-accent-strong,#a78bfa);background:var(--wallet-accent-fill,rgba(139,92,246,.15));border-color:var(--wallet-stroke-strong,rgba(139,92,246,.5));}.twc[data-owner="1"]{border-color:var(--wallet-stroke-strong,rgba(139,92,246,.5));}/* Dense mode: fill a narrow card footer and wrap badges onto a second line insidethe same rounded container instead of overflowing the card into its neighbours. */-.twc[data-dense="1"]{display:flex;flex-wrap:wrap;width:100%;max-width:100%;box-sizing:border-box;white-space:normal;- border-radius:12px;column-gap:7px;row-gap:5px;padding:6px 10px;align-items:center;}+.twc[data-dense="1"]{--twc-pad-y:6px;display:flex;flex-wrap:wrap;width:100%;max-width:100%;box-sizing:border-box;white-space:normal;+ border-radius:12px;column-gap:7px;row-gap:5px;padding:var(--twc-pad-y) 10px;align-items:center;}.twc[data-dense="1"] .twc-addr{min-width:0;overflow:hidden;text-overflow:ellipsis;}.twc[data-dense="1"] .twc-bal,.twc[data-dense="1"] .twc-make,.twc[data-dense="1"] button.twc-make{border-left:0;padding-left:0;margin-left:0;}+/* Screen-reader-only label. The balance and trust slots are plain spans, and+ aria-label is prohibited on a generic element, so they carry their name as+ real text instead of an attribute assistive tech is told to ignore. */+.twc-sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;+ clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0;}.twc-ico{width:11px;height:11px;flex:none;opacity:.8;}.twc-addr{font-family:var(--font-mono,ui-monospace,SFMono-Regular,Menlo,monospace);letter-spacing:.01em;display:inline-flex;gap:1px;}.twc-hi{color:var(--ink-bright,#fff);font-weight:700;}@@ -444,14 +460,14 @@ export function walletChipHTML(agent, opts = {}) {// from the real reputation score. Only meaningful for a real agent row.const repSlot =reputation && isRealAgent- ? `<span class="rep-badge-slot" data-rep-aid="${esc(status.agentId)}"${link ? '' : ' data-rep-embedded="1"'} data-twc-rep aria-label="Wallet trust score loading"></span>`+ ? `<span class="rep-badge-slot" data-rep-aid="${esc(status.agentId)}"${link ? '' : ' data-rep-embedded="1"'} data-twc-rep aria-hidden="true"></span>`: '';// Live balance slot — renders a skeleton, then hydrates to "$1.2K +2.3%" on// viewport-enter via POST /api/agents/balances. Read-only display, safe inside// card anchors (it's a <span>, no nested <a>).const balanceSlot = wantBalance- ? `<span class="twc-bal" data-twc-bal aria-label="Wallet value loading"><span class="twc-bal-sk"></span></span>`+ ? `<span class="twc-bal" data-twc-bal aria-hidden="true"><span class="twc-bal-sk"></span></span>`: '';const copyBtn = link@@ -498,11 +514,20 @@ export function walletChipHTML(agent, opts = {}) {: '';const title = `Agent wallet ${status.address}${status.isVanity ? ' (vanity)' : ''}`;+ // The popover trigger sits on the identity run (icon + address + owner badge),+ // never on the outer pill. Everything after it (trust badge, rarity tag,+ // explorer link, copy, vanity, tip) is focusable in its own right, and a+ // role="button" wrapping those is a nested interactive control: assistive tech+ // announces one button and hides the ones inside it. Keeping the trigger to the+ // non-focusable run leaves every action independently reachable, and the pill+ // still lights up as a whole on hover/focus through the :has() rules below.return (- `<span class="twc" data-vanity="${status.isVanity}" data-owner="${isOwner ? '1' : '0'}"${dense ? ' data-dense="1"' : ''}${triggerAttrs}${hydrateAttrs} title="${esc(title)}">` ++ `<span class="twc" data-vanity="${status.isVanity}" data-owner="${isOwner ? '1' : '0'}"${dense ? ' data-dense="1"' : ''}${hydrateAttrs} title="${esc(title)}">` ++ `<span class="twc-id"${triggerAttrs}>` +WALLET_SVG +addressLabelHTML(status) +ownerBadge ++ `</span>` +repSlot +vanityTag +balanceSlot +@@ -538,7 +563,7 @@ export function walletChipEl(agent, opts = {}) {export function wireWalletChips(root) {if (!root || typeof root.querySelectorAll !== 'function') return;const chips = new Set();- for (const el of root.querySelectorAll('.twc[data-twc-aid],.twc[data-twc-trigger],[data-twc-rep],[data-twc-copy],[data-twc-stop],[data-twc-tip]')) {+ for (const el of root.querySelectorAll('.twc[data-twc-aid],.twc-id[data-twc-trigger],[data-twc-rep],[data-twc-copy],[data-twc-stop],[data-twc-tip]')) {chips.add(el.classList?.contains('twc') ? el : el.closest('.twc'));}for (const chip of chips) if (chip) wireWalletChip(chip);@@ -575,8 +600,10 @@ function wireWalletChip(node) {// Live balance hydration: register with the shared observer/poller.if (node.hasAttribute?.('data-twc-aid')) registerForHydration(node);- // Rich preview popover.- if (node.hasAttribute?.('data-twc-trigger')) wirePopoverTrigger(node);+ // Rich preview popover. The trigger is the chip's identity run, not the chip+ // itself, so accept either as the entry point.+ const trigger = node.matches?.('[data-twc-trigger]') ? node : node.querySelector?.('[data-twc-trigger]');+ if (trigger) wirePopoverTrigger(trigger);// Wallet-trust badge: lazily hydrate the placeholder from the real score.const repSlot = node.querySelector?.('[data-twc-rep]');if (repSlot && !repSlot.__repObserved) {@@ -730,8 +757,11 @@ function applyHydration(agentId, entry) {? `<span class="twc-tierdot" style="--twc-tier:${esc(computeWalletVisual({ usdTotal: entry.usd, mix: { sol: 1 }, hasThree: false }).accent)}" title="${esc(tier.label)} tier"></span>`: '';node.dataset.tier = tier.key;- slot.innerHTML = `${dot}<span class="twc-usd">${esc(usdLabel)}</span>${chg}`;- slot.setAttribute('aria-label', `Wallet value ${usdLabel}${pct != null ? `, ${formatPct(pct)} over ${entry.pnl?.windowHours || 24} hours` : ''}`);+ const winH = entry.pnl?.windowHours || 24;+ const winLabel = winH < 1 ? `${Math.max(1, Math.round(winH * 60))} minutes` : `${Math.round(winH)} hours`;+ const srLabel = `Wallet value${pct != null ? `, ${formatPct(pct)} over ${winLabel}` : ''}`;+ slot.innerHTML = `<span class="twc-sr">${esc(srLabel)}</span>${dot}<span class="twc-usd">${esc(usdLabel)}</span>${chg}`;+ slot.removeAttribute('aria-hidden');}if (increased) pulseChip(node, entry.usd - prev);}@@ -745,8 +775,8 @@ function markBalanceUnavailable(agentId) {for (const node of set) {const slot = node.querySelector?.('.twc-bal');if (slot && slot.querySelector('.twc-bal-sk')) {- slot.innerHTML = '<span class="twc-bal-na" title="Balance temporarily unavailable">—</span>';- slot.setAttribute('aria-label', 'Wallet value unavailable');+ slot.innerHTML = '<span class="twc-sr">Wallet value unavailable</span><span class="twc-bal-na" title="Balance temporarily unavailable" aria-hidden="true">\u2014</span>';+ slot.removeAttribute('aria-hidden');}}}@@ -815,10 +845,9 @@ function wirePopoverTrigger(node) {});// Touch: a standalone chip (not embedded in a clickable card, not inside an// anchor) toggles the popover. Embedded/card chips leave the tap to the card's- // own navigation — the popover stays a hover/focus enhancement there.+ // own navigation, where the popover stays a hover/focus enhancement.if (!node.closest('a') && !node.hasAttribute('data-twc-embedded')) {node.addEventListener('click', (e) => {- if (e.target.closest('[data-twc-stop],[data-twc-copy],[data-twc-tip]')) return;e.preventDefault();e.stopPropagation();_openPopover?.trigger === node ? closePopover(node) : open();diff --git a/src/shared/money-pulse.js b/src/shared/money-pulse.jsindex 2973962b2..9c26d29ac 100644--- a/src/shared/money-pulse.js+++ b/src/shared/money-pulse.js@@ -142,6 +142,7 @@ function injectStyles() {/* Ticker variant */.mp-ticker { --mp-accent: var(--wallet-accent, #c4b5fd); position: relative; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }.mp-ticker-track { display: inline-flex; gap: 26px; white-space: nowrap; will-change: transform; animation: mp-marquee var(--mp-dur, 60s) linear infinite; }+.mp-tick-item { display: inline-flex; align-items: center; }.mp-ticker:hover .mp-ticker-track { animation-play-state: paused; }@keyframes mp-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }.mp-tick { display: inline-flex; align-items: center; gap: 7px; font-size: var(--text-sm,.8rem); color: var(--ink-dim,#9aa); text-decoration: none; }@@ -388,7 +389,14 @@ function tickEl(ev) {tradeTok +(amt ? ` <span class="mp-amount">${esc(amt)}</span>` : '') +(ev.kind === 'launch' && ev.symbol ? ` <span class="mp-amount">$${esc(ev.symbol)}</span>` : '');- return a;+ // The track is a role="list", which reports nothing unless every child is a+ // listitem. The role goes on a wrapper rather than on the anchor itself, so+ // each tick stays a link assistive tech can follow.+ const item = document.createElement('span');+ item.className = 'mp-tick-item';+ item.setAttribute('role', 'listitem');+ item.appendChild(a);+ return item;}// A tiny, opt-in "money sound": a soft two-note chime synthesized on the fly.diff --git a/tests/corner-stack.test.js b/tests/corner-stack.test.jsindex d61b3956c..1a9cb72d1 100644--- a/tests/corner-stack.test.js+++ b/tests/corner-stack.test.js@@ -207,12 +207,25 @@ describe('corner stack — reservations', () => {});describe('corner stack — stylesheet contract', () => {- it('drives both the desktop and the narrow-viewport offset from the reserve', () => {- // Two rules set `bottom`: the base rule and the <=640px rule that goes- // full-width. A reservation honoured by only one of them still buries the- // cards on the other, which is exactly how this shipped broken before.- const bottoms = SOURCE.match(/bottom:calc\([^)]*var\(--tws-corner-reserve[^)]*\)[^)]*\)/g) || [];- expect(bottoms.length).toBe(2);+ it('drives the offset from the reserve on one rule that both viewports share', () => {+ // The reservation used to be spelled into `bottom` twice, once on the base+ // rule and once on the <=640px rule, and a reservation honoured by only+ // one of them buried the cards on the other. One transform on the base+ // rule covers both viewports, so the two can no longer disagree.+ const lifts = SOURCE.match(/transform:translate3d\([^;]*--tws-corner-reserve[^;]*\);/g) || [];+ expect(lifts.length).toBe(1);+ expect(lifts[0]).toContain('--tws-corner-reserve-w');+ expect(lifts[0]).toContain('--tws-corner-dock');+ });++ it('never animates a layout property, because that is reported as a layout shift', () => {+ // `bottom` and `right` are layout properties: transitioning them re-lays+ // the element out per frame and every one of those frames reaches the+ // layout-instability API, even though the stack is fixed and no page+ // content moved. Docks are re-measured on a settle timer and on body+ // mutations, so each re-measure cost a real CLS entry on production.+ expect(SOURCE).toContain('transition:transform .35s');+ expect(SOURCE).not.toMatch(/transition:[^;]*\b(bottom|right|left|top|width|height)\b/);});it('caps its height against the reserve so a tall stack cannot overflow', () => {@@ -221,13 +234,12 @@ describe('corner stack — stylesheet contract', () => {);});- it('offsets both rules by the measured page dock as well as the reserve', () => {+ it('offsets by the measured page dock as well as the reserve', () => {// A page's own bottom chrome (the /app chat composer, a viewer action// bar) is not a reservation (nobody declares it), so the stack measures- // it. Both the desktop and the narrow rule have to honour that lift or- // the phone layout keeps parking helper widgets on the composer.- const docked = SOURCE.match(/bottom:calc\([^;]*--tws-corner-dock/g) || [];- expect(docked.length).toBe(2);+ // it. The narrow rule inherits the base rule's transform, so honouring+ // the dock in one place now covers the phone layout too.+ expect(SOURCE).toMatch(/transform:translate3d\([^;]*--tws-corner-dock,0px\)/);});it('sizes members to their content on a phone instead of stretching them', () => {@@ -236,9 +248,15 @@ describe('corner stack — stylesheet contract', () => {expect(SOURCE).not.toContain('align-items:stretch');});- it('offsets both rules horizontally too, so stepping aside works at any width', () => {- const rights = SOURCE.match(/right:calc\([^)]*var\(--tws-corner-reserve-w[^)]*\)[^)]*\)/g) || [];- expect(rights.length).toBe(2);+ it('steps aside horizontally at any width, and stays on screen when it does', () => {+ // The step-aside is the X half of the same transform, so it applies at+ // every width. It also means the phone rule can no longer pin the stack+ // to BOTH edges: a box anchored left and right slides its left edge off+ // screen when the transform moves it, taking a wide card with it. The+ // room to grow leftward is a max-width instead.+ expect(SOURCE).toMatch(/transform:translate3d\(calc\(-1 \* var\(--tws-corner-reserve-w,0px\)\)/);+ expect(SOURCE).not.toMatch(/left:12px/);+ expect(SOURCE).toContain('max-width:calc(100vw - 24px)');});it('honours prefers-reduced-motion for the lift', () => {