Accessibility Trees and Screenshots
In this article
- Explain what an accessibility tree shows an agent, and what it leaves out.
- Explain what a screenshot shows that the tree cannot, and what it costs.
- Convert a model's click from screenshot pixels to screen pixels when the screenshot was scaled.
- Choose the tree, a screenshot or both for a given screen, and say why.
- Terms defined here: accessibility tree, screenshot observation, coordinate drift.
Overview
Your agent has to press "Confirm" on a dialog in a supplier's web portal. First it has to see the page, and there are two ways to give it eyes: a list of the parts on the page, each with a type and a label, or a picture of the screen. The list cannot see what is only drawn. The picture can send a click to the wrong place even when the model picked the right button.
You will see what each view tells the agent and what it hides, why a click read off a shrunk picture lands on the wrong button, and the small conversion that fixes it. Then you can pick the right view, or both, for common kinds of screen.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- The page as a list of parts
- What the tree misses
- The page as a picture
- Coordinates that drift
- Using both
- Common mistakes
- In production
- Sources
- Check yourself, 13 questions