INQUIRING LINE

AI coders ace easy accessibility fixes like color contrast but keep breaking the screen-reader tags meant to label what's on the page.

Why do LLMs introduce new ARIA violations when given explicit accessibility prompts?

This explores why asking an LLM to write accessible web code can make things worse in one area, ARIA (the attributes that tell screen readers what an element is and how it behaves), even while other accessibility checks improve.


This explores why asking an LLM to write accessible web code can backfire on ARIA, the extra attributes that tell screen readers what an element is and how it behaves. The corpus doesn't have a study that isolates exactly this effect. It doesn't show prompts adding brand-new ARIA errors and then explain the cause. What it does show is a consistent pattern that explains why ARIA is where things go wrong. When models are compared with human developers, GPT-4o and Qwen2.5-Coder win on the simple items like color contrast and image alt text, but they struggle with ARIA. Their code often passes automated checks while still missing what the markup is supposed to mean Do large language models write more accessible web code than humans?.

The most useful clue comes from the repair research. LLMs are good at fixing one element at a time and poor at rules that cover the whole page. That's why they improve about 80% of files but fully fix only about 26% Why do LLM accessibility repairs fail at the document level?. Many ARIA rules are exactly that kind of whole-page rule. One element points to another by ID. A role is only valid inside a certain kind of parent. Keyboard focus has to move through the page in a sensible order. Here is an inference the papers don't state outright: an accessibility prompt makes the model add ARIA more eagerly, one element at a time. Each addition looks fine locally but can break a relationship elsewhere on the page. In short, the prompt raises how much ARIA gets written without giving the model a view of the whole page.

The obvious fix, feeding checker results back to the model, helps less than you'd expect. FeedA11y runs generation in a loop, passing each round of violations back to the model. It clearly beats plain prompting, few-shot examples and self-critique, but keyboard navigation and focus management remain unsolved Can feeding accessibility violations back into code generation improve results?. Simply repeating the repair step raised cost by 52% and made no difference Can LLMs actually fix web accessibility problems?. The researchers' proposed direction is to match each tool to the size of the problem. The LLM handles fixes to single elements, and deterministic validators handle the rules that span the whole document.

A wider lesson comes from outside accessibility research: an instruction that sounds harmless can change a model's behavior in ways that hurt particular cases. Asking a model for simpler language sharply weakens how it handles genuinely ambiguous questions. It doesn't lose the ability. It just stops hedging and asking for clarification Does asking for simpler language break ambiguity handling in LLMs?. 'Make it accessible' may work the same way, pushing the model to look compliant by adding attributes rather than holding back where an attribute isn't needed. That's a plausible reading, but this corpus hasn't tested it for ARIA. The surprising takeaway is that 'more ARIA' isn't the same as 'more accessible'. The failure isn't a model that ignores your instruction, but one that follows it too literally, one element at a time.


Sources 5 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.

Why do LLM accessibility repairs fail at the document level?

LLMs achieve 80% partial compliance improvement but only 26% full resolution because they excel at element-level fixes but lack a global DOM view needed for document-wide rules. Scope-matched repair strategies pairing LLMs with deterministic validators could address this limitation.

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.

Does asking for simpler language break ambiguity handling in LLMs?

Across five LLMs, simplification prompts drastically hurt performance on genuinely ambiguous references but leave commonsense-resolvable cases unaffected. The damage stems from reduced hedging and clarification under simplified conditions, not from capability loss.

Papers this line draws on 8

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