INQUIRING LINE

An AI-built webpage can pass every automated accessibility check and still be unusable for someone relying on a screen reader — why?

How does the accessibility tree representation limit both code generation and evaluation?

This explores why the accessibility tree, the structured outline of a web page that screen readers and automated checkers read, can make AI-generated web code look accessible to a checker while it still fails real users. The question also asks what that gap means for how we evaluate that code.


This explores why the accessibility tree, the structured outline of a web page that screen readers and automated checkers read, can make AI-generated web code look accessible to a checker while it still fails real users. The question also asks what that gap means for how we evaluate that code. First, a caveat: none of these notes studies the accessibility tree as a representation directly. What they do show, across several studies, is a consistent pattern of where generation and evaluation break down, and that pattern points at the limits of judging a page by a static snapshot of its structure.

The clearest signal comes from comparing LLMs with human developers. GPT-4o and Qwen2.5-Coder actually beat humans on the easy accessibility wins, such as color contrast and alt text on images. They fell behind on ARIA attributes, the labels and roles developers add to tell assistive technology what a widget is and how it behaves Do large language models write more accessible web code than humans?. The telling detail is that the models' code passed surface-level automated checks while missing deeper semantic requirements. Static properties, like whether an image has alt text or whether a button has a name, are easy to read from the page's structure and easy to verify. Requirements about meaning and behavior aren't.

The gap widens when you try to close it with feedback. FeedA11y runs an accessibility checker, feeds the violations back to the model, and repeats. It clearly beats plain prompting and self-critique, yet it still struggles with keyboard navigation and focus management Can feeding accessibility violations back into code generation improve results?. These are exactly the properties a structural snapshot can't capture. Whether pressing Tab moves focus somewhere sensible, or whether a closed dialog returns focus to where the user started, only shows up when the page is actually used. A checker that reads structure can only report problems it can see in structure, so a feedback loop built on it inherits the same blind spot. Repair studies show the same ceiling. LLM fixes improved compliance in 80% of real HTML files but fully fixed fewer than 26% of them, and running more repair rounds raised costs by 52% with no gain Can LLMs actually fix web accessibility problems?. More iteration stops helping once the remaining problems are invisible to the signal driving the iteration.

A parallel from a completely different area helps here. In software planning, organizing a code repository around what the code does when it runs, rather than how its files are laid out, let weaker models find the right code as precisely as much stronger ones Can better code maps help weaker planners match stronger models?. The lesson carries over: when the representation an AI works from captures structure but not runtime behavior, both the generator and the judge are working half-blind. For accessibility, that suggests the fix is less about better prompts or more feedback rounds. Evaluation would need to drive the page, by pressing keys, moving focus and opening and closing widgets, instead of only inspecting its outline. That is the open problem these notes point to but don't yet answer.


Sources 4 notes

Do large language models write more accessible web code than humans?

GPT-4o and Qwen2.5-Coder outperformed human developers on contrast and alt text but struggled with ARIA attributes. Both models produced code that passed surface-level automated checks while missing deeper semantic requirements.

Can feeding accessibility violations back into code generation improve results?

FeedA11y's ReAct-based feedback loop significantly outperforms zero-shot, few-shot, and self-criticism prompting by iteratively feeding evaluator results back into generation. However, it still struggles with nuanced ARIA constraints like keyboard navigation and focus management, suggesting evaluator feedback alone cannot substitute for domain expertise.

Can LLMs actually fix web accessibility problems?

Testing Kimi K2.5 on real HTML pages shows LLM-generated repairs improve compliance in 80% of cases and reduce violations per file from 3.98 to 1.7, yet fully resolve fewer than 26% of files. Iterating repairs increases cost 52% with no improvement.

Can better code maps help weaker planners match stronger models?

A behavior-indexed repository linking code to runtime actions raised plan quality, cut planner tokens by 8-13%, and let weaker models achieve the same code-localization precision as substantially stronger ones across multiple benchmarks.

Papers this line draws on 8

The research behind the notes this line reads — ranked by how closely each paper relates.