SitePoint Asks Whether AI Can Write Accessible Code
SitePoint's new article asks whether AI can write accessible code — a question that lands as teams ship generated markup that renders fine yet fails screen readers and WCAG criteria.
- AuthorSophie Lindqvist
- ChannelAccessibility
- Filed
- Read2 min

- SitePoint published an article titled "Can AI Write Accessible Code?"
- The question targets AI-generated markup that can render correctly while failing assistive technology users
- Judging output requires WCAG 2.1/2.2 success criteria such as 4.1.2 Name, Role, Value
- The emerging workflow treats AI code as a first draft pending keyboard and screen-reader testing
SitePoint has published an article asking a question that front-end teams now face weekly: can AI write accessible code? The piece lands at a moment when developers routinely accept large blocks of markup from language models, and when accessibility reviews still catch the same failures those models reproduce.
The title itself frames the industry's open problem. AI coding assistants generate functional markup quickly, but accessibility is not a property of working code. It is a property of semantics, keyboard behaviour, and screen-reader experience — areas where generated output has a documented habit of drifting toward patterns that fail assistive technology users.
Why the question reaches practitioners now
For a working developer, the stakes are concrete. A generated component that omits label associations, ARIA roles, or focus management does not look broken in a browser window. It breaks quietly, in a screen reader, for a keyboard-only user, and typically surfaces only in an audit — or a complaint.
The relevant benchmark for judging any output, human or machine, remains the Web Content Accessibility Guidelines. WCAG 2.1 and its successor WCAG 2.2 define success criteria such as 4.1.2 Name, Role, Value, which requires that interface components expose their identity and state to assistive technology. Markup that renders correctly but skips these exposures fails the criterion regardless of how it was produced.
What the article signals for design and development teams
SitePoint addressing this topic points to a shift in how accessibility work is distributed. When code arrives pre-generated, the review burden moves downstream to whoever checks semantics, contrast, and interaction patterns. That reviewer needs to know the difference between valid HTML and accessible HTML — a distinction an AI model does not reliably make on its own.
The practical pattern emerging across teams treats AI output as a first draft, not a deliverable:
- Generate the component with the assistant.
- Audit it against specific WCAG success criteria rather than general impressions.
- Test with a keyboard and a screen reader before merging.
- Correct the prompt or the code so the fix becomes repeatable.
This workflow keeps the speed benefit of generated code while placing accountability where it belongs — with the team shipping the interface.
Where this leaves the field
The honest answer to SitePoint's headline question is that AI can write accessible code under supervision, and unreliable code without it. The gap between those two outcomes is the skill of the person reviewing the output, measured against published standards rather than against how the rendered page looks.
As AI assistants become the default starting point for front-end work, expect the question to evolve from whether the tools can comply with WCAG 2.2 to how organisations verify that they do — and SitePoint raising it now suggests the verification tooling is the next conversation.
Source: Google News: WCAG accessibility
More from Sophie Lindqvist
Show full bio
Staff writer covering people, launches and day-to-day practice in Product and interaction design, design systems at Interface Wire.
64 articles