Live Verification
ux-live-verify implements ux.a11y-live at stage 6 of flow-ux-studio.
Live UX verification
Prompt-first procedure: Describe the outcome you want in your agent conversation. The agent should select and load the appropriate AIWG assets, explain material changes, request any needed approval, and report verification evidence. Exact commands and flags appear only in the CLI reference.
`ux-live-verify` implements `ux.a11y-live` at stage 6 of `flow-ux-studio`. Deploy `ux-complete` and the existing `browser-control` addon through the agent-owned use operation. Discover and load `ux-live-verify`, `browser-driver` and `browser-control-safety`. The addon's setup/doctor remain draft guidance; a successful deployment does not prove that a callable browser is connected.
Test a locally served page or an explicitly authorized preview. The same browser-control origin authorization, sensitive-action gates, audit logging and cleanup apply to local, external and headless sessions. Do not copy raw host-specific MCP tool names into UX flows. Never bypass CSP, expose browser storage, or install packages/browsers just to make verification appear complete.
| Evidence | Required review | Handoff effect |
|---|---|---|
| Screenshots, 375/768/1280 × 900 | Open each image; check clipping/overlap/overflow | Layout breaks block |
| Keyboard trace and named flows | Focus visibility/order, Tab/Shift+Tab, Escape, arrow keys, all controls | Traps/unreachable controls block |
| axe-core WCAG 2.2 AA tags | Rule, severity, targets; unresolved manual checks | Critical/serious block; unavailable/incomplete scan leaves a gap |
| Console and uncaught errors | Capture before load and after interactions | Errors fail the live check |
| Reduced-motion emulation | Observe the page with the preference enabled | Ignored preference fails; missing review leaves a gap |
Axe first resolves project-installed `axe-core`, then optionally uses `https://cdnjs.cloudflare.com/ajax/libs/axe-core/4.10.2/axe.min.js`. The second path needs documented network access to cdnjs.cloudflare.com and is disabled by default in the helper. If injection fails (including CSP), capture and review the rendered accessibility tree and mark the scan incomplete. Tree review does not establish a clean axe result or full WCAG conformance.
Browser-control helper
Existing MCP hosts run the skill through `browser-driver`. For a bounded Playwright script, import these modules from `$AIWG_ROOT/agentic/code/addons/browser-control/scripts/`:
- `ux-playwright-driver.mjs`: `playwrightDriver({page, mode, close})` wraps an
authorized Playwright page. `headlessDriver({projectRoot, channel: 'chrome'})` resolves project-installed `playwright` or `playwright-core` and opens an isolated browser with a bounded launch. Neither function installs anything.
- `ux-live-verify.mjs`: `verifyLivePage(options)` runs checks, always closes
its owned session and writes `live-verify.md` plus `live-verify.json`.
Pass `driver`, `url`, `projectRoot`, and `outputDir` (the resolved run directory). Supply `authorize({origin, url, action})`, returning true only after existing browser-control policy allows that operation, and `audit({origin, action, outcome})` to record sanitized activity. The helper checks authorization before each driver operation. The caller must enforce redirect/new-origin navigation authorization on the supplied browser session as it does for normal browser control; an initial origin grant does not grant cross-origin navigation.
Supply `inspectScreenshot({width, file, overflow})`, `inspectKeyboard(evidence)` and `inspectMotion(evidence)`. Each callback must actually review the evidence and return `{status: 'pass' | 'fail', details: '<specific observation>'}`. Do not hard-code passing callbacks. Keyboard evidence contains controls, focus trace and unreachable names; optional `flows` are `{name, keys: [...]}` sequences. Motion evidence contains the emulated query result and remaining running animation count; visually inspect the authorized page before returning. Omitted reviews leave the result incomplete. Screenshot inspection requires an image-capable reviewer; text-only hosts return a pending review, never a pass.
Control names use `aria-labelledby` references in ID order, then `aria-label`, associated labels (including wrapping labels), `title`, `placeholder`, text content, `name`, and finally the tag name. Whitespace is normalized and names are limited to 100 characters. These evidence names aid review; they are not a complete implementation of the accessible name computation algorithm.
The initial Tab walk and every named flow (including the built-in reverse and dismiss flow) start at the document root. The helper temporarily focuses the root with `tabindex="-1"` and restores its prior attribute. A first `Tab` starts forward navigation from the document start; `Shift+Tab` starts backward navigation. Flows do not inherit the previous sequence's focus. They do retain page state (such as open dialogs or changed values); the helper does not reload the page.
Only set `allowNetworkAxe: true` when the CDN dependency is permitted and documented. Offline callers leave it false. A missing project library, browser launch failure or unconnected MCP means driver unavailable. Catch a failed `headlessDriver` creation and invoke `verifyLivePage` without a driver to write an incomplete stage result; do not substitute a static-page pass.
Stage 6 and handoff
Merge the helper's table and observations into `06-verify.md`, alongside the stage's critique/design review. Keep exactly one aggregate `Blocking:` line; replace a prior live section on rerun, preserving all other unresolved blockers. `Blocking: none` is valid only when every required check has evidence and passed. The `ux-handoff-index` skill consumes this line and leaves the run incomplete for anything else. Return blockers to stage 5 and stop after two failed repairs; review-only reports findings without editing the product.
Offline tests use a local HTML fixture and synthetic browser-control/Playwright surfaces. They validate orchestration and failure behavior, not browser rendering or actual axe conformance. A project run still requires live screenshots and human visual/keyboard/motion reviews.