Accessibility belongs in the primitives, because a page built from accessible primitives starts accessible, and a reviewer need only check the composition.
The instruction file contains three rules, and each has a mechanical check behind it.
Use semantic elements. The button wraps a button; the dialog wraps a dialog; the navigation is a nav with a label; the section is a section labeled by its heading. Every interactive control must be keyboard operable with a visible focus state, which the button’s styles provide. And the lint configuration includes the template accessibility rules from the angular-eslint package, which catch missing labels, missing alternative text, and click handlers on non-interactive elements before the code runs.
The runtime check is an automated scan with the open-source axe-core engine, run through a real browser in the end-to-end suite of the companion book. Harbor’s script loads each route, injects the engine, and fails the run if any rule is violated. Automated scanning finds a fraction of accessibility problems, the ones that can be decided mechanically, and nothing replaces keyboard and screen-reader testing by a person. But it finds that fraction every time, in seconds, and it has no tolerance for the agent’s confident claim that the page is accessible.
Continue with the book
Explore the full treatment, worked examples, and exercises in Local AI Agents for Angular Teams.
Companion article for Local AI Agents for Angular Teams, published by Choral Software. Article text and original examples © 2026 Choral Software. All rights reserved.
