Controls an agent can use
Part 7 · Acting on a site4 minFix a page’s markup line by line and see what an agent finds: unnamed buttons, a search with no address, controls that need a mouse, frames, forms as tools and card fields.
- button ""
- textbox ""
A button with a name
A browser agent finds controls by name, as a screen reader does. A cart icon with no text is a button called nothing.
A scan runs the rules that name buttons and fields. Press each line on the page to fix it.
- Accessible name
- What a control is called to software: its text, its label, or an aria-label.
Why it matters. Every button and field needs a name in the markup. An icon alone is a name only for people who can see it.
A search it can build
An agent that can write the search address itself, /search?q=v60, skips the form and gets results in one request.
That works only when search is a GET with a named parameter. A search sent by a script as a POST has no address to write.
Why it matters. Search with a plain GET and a named parameter, and an agent can search without touching the form.
Controls it can’t operate
Some controls take a gesture: a box that opens a list you must pick from, an item you drag, a calendar drawn in divs.
Agents report getting stuck on exactly these. Native controls take a typed value, which an agent can always give.
Why it matters. Use native controls. A select, a date input or a button works for an agent; a custom widget often does not.
In another site’s frame
A booking form in an iframe from another site is a page inside the page. Many browser agents cannot reach into it.
A scan opens the page in a browser, counts the controls inside frames from other sites, and names their hosts.
Why it matters. Put the forms that matter in the page itself, not in a frame from another site.
Forms as tools
WebMCP lets a form say what it is: a toolname, a tooldescription, and a description for each field.
An agent calls it like a function. It is in origin trial in Chrome; a scan judges each tool as the browser does.
- WebMCP
- A proposed standard for a page to offer its forms and actions to agents as tools.
Why it matters. Two attributes turn a form into a tool an agent can call, with no guessing at the fields.
Card fields
Agents that pay fill card fields the way a browser’s autofill does: by autocomplete tokens.
A field named card, with no token, could be anything. cc-number, cc-exp and cc-csc say exactly what goes where.
Why it matters. Mark card fields with cc-* autocomplete, and an agent or a wallet fills them without guessing.
What to aim for
Every control named, native where it can be, and in the page itself.
Fix all three lines, and the agent finishes the task.
Why it matters. Named, native controls, a search with an address, and forms in the page: an agent can do the job.