LLM Based Web Accessibility Repair: An Empirical Study of Detection, Remediation, and Cost

Paper · arXiv 2605.27716 · Published May 26, 2026
Human-Centered Design

Ensuring web accessibility at scale remains a significant challenge, as rule-based tools provide limited coverage while manual remediation is costly and errorprone. This paper investigates the effectiveness of large language models (LLMs), specifically the Kimi K2.5 model, for automated accessibility detection and repair in comparison to traditional rule-based approaches. For detection, LLMs achieve performance comparable to rule-based tools (F1 ≈0.65), with strong semantic understanding (F1 = 0.83) but lower reliability in syntactic (0.62) and layout-related (0.48) violations. For remediation, LLM-generated fixes are syntactically valid in over 99.7% of cases and improve accessibility compliance in 80.2% of instances, reducing violations from 3.98 to 1.7 per-file. However, fewer than 26% of cases are fully resolved, and approximately 30% of patches introduce structural changes. We further evaluate efficiency and find that iterative agent-based refinement increases computational cost by 52% and API usage by 1.64× without improving remediation outcomes. These findings indicate that while LLMs are effective for partial accessibility repair, they are insufficient for complete and reliable remediation. We conclude that scalable accessibility solutions require hybrid approaches that combine LLM capabilities with rule-based validation and constraintaware correction mechanisms. Index Terms—Web Accessibility, Large Language Models, Program Repair, WCAG Compliance, Cost Efficiency

Introduction. Web accessibility remains a critical requirement for inclusive digital systems, ensuring that web content is perceivable, operable, understandable, and robust for users with disabilities. Despite the availability of standards such as WCAG 2.2 and automated accessibility checkers (e.g., axe-core and Lighthouse), a large proportion of websites still contain accessibility violations, particularly in dynamic interfaces, forms, and multimedia content. Traditional automated tools primarily detect rule-based violations but provide limited support for repairing issues and lack semantic understanding of interface intent [5] [6]. Recent advances in large language models (LLMs) have enabled new approaches for automated accessibility detection, validation, and repair. [11] [12] [13] Several studies have explored the use of LLMs to analyze HTML structures and generate accessibility fixes. For example, AccessGuru applies LLM-based transformations to HTML elements and evaluates repairs on a large benchmark of real-world accessibility issues, reporting substantial reductions in violation scores compared with baseline methods [1]. Similarly, generative approaches have been applied to specific accessibility domains such as web forms and STEM images, where LLM-based tools generate labels, descriptions, or alternative text to reduce accessibility barriers [2] [3]. Other works investigate LLM-assisted auditing and validation, showing that language models can complement rule-based tools by interpreting accessibility requirements and refining automated assessments [5] [6]. Multi-agent accessibility repair frameworks further extend this paradigm by coordinating specialized agents (e.g., planner, fixer, validator) and preserving functional correctness during automated remediation in modern web applications [4]. However, existing LLM-based accessibility repair and validation studies share several methodological limitations. First, most approaches evaluate repair success primarily using automated accessibility checkers, which verify rule-based WCAG compliance but do not assess semantic adequacy, visual integrity, or functional correctness of the repaired interface [1] [3]. Second, prior work rarely analyzes cost–performance trade-offs of LLM-based remediation, including token consumption and iterative validation overhead [1] [4]. Third, evaluation settings vary widely in scope and datasets, ranging from static HTML snippets and domain-specific components to limited realworld pages, making results difficult to compare across studies [1] [2] [3]. Consequently, the reliability and generalizability of LLM-generated accessibility repairs in realistic web environments remain insufficiently understood. To address these gaps, this research investigates the design and evaluation of LLM-based agents (utilizing the Kimi K2.5 model) for automated web accessibility remediation with integrated validation mechanisms. Specifically, the study examines how effectively LLM agents detect and repair accessibility violations while preserving visual and structural correctness, evaluates the role of an additional custom validation layer in improving reliability, and analyzes the trade-off between token cost and remediation success under singlepass versus iterative strategies. Existing approaches typically validate LLM-generated fixes using a single automated accessibility checker, considering remediation successful when reported WCAG violations decrease [1] [3]. In contrast, this work introduces a multilayer validation framework in which LLM-generated repairs are first assessed by an accessibility checker and subsequently verified through semantic and structural validation stages before acceptance (LLM → checker →semantic validator →structural validator →accept/reject). By establishing a unified evaluation framework that jointly measures accessibility compliance, interface integrity, and cost efficiency, this work aims to advance reliable and scalable autonomous accessibility remediation for modern web systems.

Related work. LLMs are increasingly used to improve web accessibility by detecting WCAG violations, generating repairs, and validating accessibility beyond traditional rule-based tools. They can understand HTML semantics and assist in auditing complex accessibility cases that require human judgment. Recent research also explores combining LLM analysis with user behavioral signals to capture real usability barriers and enable more comprehensive accessibility evaluation. 1) LLM for accessibility detection/repair. Recent research has explored the use of large language models (LLMs) to automatically detect and repair web accessibility violations by leveraging their ability to interpret HTML structure and accessibility semantics. Early work demonstrates that LLMs can directly modify markup to correct WCAG violations. For instance, AccessGuru applies LLM-based transformations to HTML elements and evaluates repairs on a large benchmark of real-world accessibility issues using an automated accessibility checker to measure violation scores before and after repair [1]. The study reports up to (84%) reduction in violation scores compared with lower baseline performance, establishing LLMs as effective automated remediation agents capable of generating accessibility-compliant attributes and structural corrections. Beyond general HTML repair, several studies investigate domain-specific accessibility generation tasks. In web forms and interactive components, LLM-based approaches improve labeling, input associations, and feedback messages, with evaluation typically based on WCAG compliance checks and usability assessment of generated content [2]. Similarly, LLM-based accessibility tools have been applied to STEM images, where models generate descriptive alternative text for scientific diagrams and visualizations [3]. These approaches are evaluated through human judgment studies measuring semantic accuracy, completeness, and usefulness for visually impaired users, with results showing superior accessibility quality compared to traditional captioning tools [3]. More recent work extends single-step repair toward structured remediation frameworks. Multi-agent accessibility systems coordinate specialized roles such as planning, repair, and validation to improve reliability and preserve interface functionality during automated corrections [4]. Evaluation in such systems focuses on repair correctness and functional preservation within controlled web application environments, typically through casebased validation rather than large-scale quantitative benchmarks [4]. Despite promising results, existing LLM-based accessibility detection and repair studies remain limited in scope and evaluation methodology [8] [9].

Method. The system is designed as a dual-pipeline architecture consisting of a deterministic rule-based pipeline (Axe-Core) and a probabilistic reasoningbased pipeline (LLM agent), followed by a unified evaluation layer. [15] [16] At a high level, each HTML page is processed independently by both systems. The rule-based pipeline applies predefined accessibility rules, while the LLM pipeline performs contextual reasoning over the HTML structure. The outputs of both systems are then evaluated using common metrics and analysis procedures. This architecture can be conceptualized as a layered system: Dataset →Data Loader →Two Engines →Violations →Evaluation • Data Layer (HTML input): The data layer represents the input space of the system, consisting of raw HTML documents collected from both violated and corrected web pages. Each document serves as an independent sample in the evaluation process. This layer defines the problem domain by providing structured web content that reflects real-world accessibility scenarios, including forms, navigation components, and multimedia elements.

• Preprocessing Layer (cleaning and chunking): The preprocessing layer transforms raw HTML into a model-ready format. First, non-essential elements such as <script> and <style> tags are removed to reduce noise. Then, each document is segmented into smaller chunks to satisfy LLM input constraints while preserving local structural context. analyzes the HTML using contextual reasoning and structured prompting to identify both explicit and implicit accessibility issues.

• Agentic Repair Layer (LLM-based remediation): The agentic repair layer generates corrected HTML for pages containing violations. Unlike single-pass generation, this layer operates in an iterative loop where the LLM analyzes the input, proposes fixes, and refines them based on feedback. This process mimics human debugging by enabling incremental improvement.

• Validation Layer (multi-criteria verification): The validation layer ensures that generated fixes are correct, safe, and meaningful. Each repair is evaluated across three criteria: reduction of accessibility violations, syntactic correctness of HTML, and preservation of structural integrity.

• Evaluation Layer (metrics and analysis): The evaluation layer measures system performance across detection accuracy, remediation quality, and computational efficiency. Metrics such as precision, recall, F1 score, and confusion matrices are used for detection, while remediation is evaluated through compliance improvement and structural correctness. Cost metrics capture token usage and communication overhead.

This layered design ensures modularity, reproducibility, and clear separation of responsibilities across system components.

E. Violation Taxonomy Accessibility remediation is modeled as an iterative transformation process:

A key contribution of this work is the introduction of a multi-layer validation framework that evaluates generated repairs across multiple dimensions. A repair x′ is considered valid if it satisfies the following conditions:

Discussion. These findings challenge the prevailing assumption that iterative, autonomous LLM-based refinement inherently improves software quality, highlighting instead a critical need for constraint-aware correction mechanisms. As standalone solutions for accessibility analysis, LLMs exhibit distinct limitations across all evaluation dimensions. In detection (RQ1), LLMs achieve performance comparable to rule-based systems, demonstrating strong semantic understanding but lower precision in syntactic analysis and significant divergence in layout-related cases. In remediation (RQ2), the model reliably generates syntactically valid code and improves compliance in 80% of instances, yet fully resolves fewer than 26% of cases while frequently introducing structural alterations. In efficiency (RQ3), the iterative agent-based approach introduces substantial computational overhead requiring 1.64× more API calls and increasing costs by 52% without yielding any measurable improvement in remediation outcomes. Crucially, our qualitative analysis explains the stark gap between the high rate of partial compliance improvement (80%) and the low full-resolution rate (25%). The primary limitation of LLM-based remediation lies not in code generation, but in a profound disconnect between local fixes and global context. The data demonstrates that LLMs are highly proficient at executing localized, element-level syntactic repairs such as inserting a missing alt attribute on an image or adding an aria-label to a button. However, they consistently fail when tasked with enforcing global, document-wide constraints, such as maintaining a strictly logical heading order or ensuring the uniqueness of ARIA landmarks across the entire page. Because the agent lacks a deterministic, global view of the HTML document structure, it frequently produces locally correct patches that inadvertently introduce global inconsistencies or structural regressions in the wider DOM. This clear distinction between local proficiency and global failure illustrates exactly why relying solely on autonomous agent loops is inefficient, and it serves as the foundation for our primary recommendation: the necessity of hybrid approaches. Overall, these results prove that LLMs are most effective when utilized in single-pass, zero-shot workflows for targeted semantic corrections. To achieve reliable, scalable, and costefficient accessibility remediation, future systems must combine the localized contextual reasoning of LLMs with the global, document-wide constraint enforcement of deterministic, rule-based validation engines.

Conclusion. XI. CONCLUSION This study demonstrates that LLM-based approaches provide promising capabilities for accessibility detection and remediation, but remain limited in achieving complete and efficient solutions. The model achieves comparable detection performance to rulebased systems (F1 ≈0.65), with strong semantic understanding (F1 = 0.83) but lower reliability in syntax (0.62) and layout (0.48). In remediation, it consistently generates syntactically valid code (≥99.7%) and improves accessibility in 80.2% of cases, reducing violations from 3.98 to approximately 1.7 per-file. However, complete fixes are achieved in fewer than 26% of cases, and nearly 30% of patches alter the original structure, highlighting challenges in reliability and structural preservation. From an efficiency perspective, iterative agent-based refinement introduces significant overhead without improving outcomes, increasing API calls by 1.64×, token usage by 1.49×, and cost by 52%, while producing identical remediation results. These findings indicate that LLMs are effective for partial detection and repair, but not sufficient as standalone solutions for full accessibility compliance. Overall, this study demonstrates that effectiveness alone is insufficient for evaluating AI-driven software repair, and that cost-efficiency and reliability must be considered as first-class criteria in practical deployment. Future work should focus on developing hybrid approaches that integrate LLM reasoning with rule-based validation to improve precision and completeness, designing more actionable feedback mechanisms to support effective refinement, and incorporating runtime and visual context to address complex layout and interactiondependent issues. Additionally, optimizing interaction strategies to reduce unnecessary computational overhead will be critical for enabling scalable and costefficient deployment.

Limitations. IX. THREATS TO VALIDITY To ensure the rigour of our empirical findings, we identify and discuss the threats to the validity of our study across construct, internal, and external dimensions.

Construct validity concerns whether our evaluation metrics accurately capture the properties we intend to measure. Our primary threat in this dimension is the reliance on Axe-Core as the definitive ground truth for accessibility violations. While Axe-Core is an industry-standard deterministic engine, automated checkers can only reliably detect approximately 30% to 50% of all WCAG criteria. Complex accessibility issues requiring visual, cognitive, or manual keyboard navigation testing are inherently excluded from our baseline. Furthermore, our measurement of “structural preservation” relies on DOM tree similarity algorithms. While a high similarity score (≥0.85) strongly correlates with visual integrity, it is possible that mathematically minor structural changes could still result in visual regressions on the rendered page.

Internal validity relates to factors that might influence the causal relationships observed in our results. A significant threat lies in the prompt engineering and the hyperparameter configurations of the LLM.

Lines of inquiry this paper opens 24

Research framings built by reading the notes related to this paper — the questions it feeds into.

Can visual rendering-based rewards effectively improve code and layout quality? What perception approach enables GUI agents to work most effectively? Do AI coding tools meaningfully improve developer productivity and quality? Why does iterative refinement amplify reasoning errors instead of correcting them? How do architectural constraints limit monolithic LLM performance on complex tasks? Why do language models systematically fail at ambiguity recognition? What prevents AI agents from achieving claimed real-world autonomy?