Use native controls in the View
Use<button> for actions and labeled form controls for input. Give icon-only buttons an accessible name. This keeps controls operable with a keyboard and exposes their role and name to assistive technology.
message to a short result such as Page 2 loaded or Could not load orders. A status region announces routine updates without moving keyboard focus. For a form error, also put a visible message next to the affected field and connect it with aria-describedby. Keep error handling for both a tool result with isError: true and a rejected View request; see callServerTool().
Keep focus visible and predictable
Do not remove the browser’s focus outline without adding a replacement. The host can supply a focus-ring color, but your View needs a fallback when it does not:aria-disabled keeps the button focusable during loading; guard the click handler so it cannot start another request. When your View opens its own dialog, move focus into it, keep keyboard focus inside while it is modal, and return focus to the trigger when it closes. See the WAI-ARIA dialog pattern for the full interaction rules.
The Host owns focus outside the View’s iframe. Test the transition into and out of the iframe in every real Host you support; do not assume your View can focus the Host’s chat controls or that every Host uses the same focus order.
Fit the host container
The Host may render the View inline, fullscreen, or in picture-in-picture mode. It can also change the container dimensions after initialization. Use a layout that can shrink without hiding controls, and respond to host context changes rather than assuming a fixed width.decorative-motion only to nonessential animation; keep progress and state understandable when that motion is removed. The browser’s prefers-reduced-motion media query handles motion preference inside the View without a Host API.
Test the rendered View
Thesunpeak/test Inspector fixture returns a locator inside the app iframe. Use role-based queries to check names and keyboard actions against the rendered View: