Skip to content

Agents

Use the accessibility tree as the interaction contract. Scope to a named dialog, form, or region when the page has repeated controls, then locate the native role and accessible name inside it. Use data-agent-id only when accessible names still cannot distinguish the target. The host app supplies that attribute; the library does not generate IDs.

const title = page.getByRole("textbox", { name: "Work item title" });
await title.fill("Update the team site");
await page.getByRole("button", { name: "Save work item" }).click();
await expect(page.getByRole("status")).toContainText("Saved");

The example names describe controls in a host app; the library does not provide a work-item form or persistence. Controls, action buttons, labels, and disclosure rows share a 44px minimum target height. Text areas stay taller; see control sizing for customization.

Check the component guide before choosing a control. Each catalog item opens its own interactive page with a source link. The package’s components.json is the machine-readable inventory. The package does not read or save SharePoint data; use the host workflow and verify its visible result.

For agent retrieval, see the plain Markdown interaction contract.