TLDR: AccessGuru is a new research method that leverages Large Language Models (LLMs) and existing tools to automatically detect and correct web accessibility violations in HTML code. It classifies violations into syntactic, semantic, and layout categories, and has demonstrated superior performance in reducing accessibility errors compared to previous methods, making web content more inclusive for all users.
The internet is a vast resource, but for many, it remains inaccessible. A significant number of web pages fail to meet established accessibility guidelines, effectively excluding users with diverse abilities. This widespread issue often stems from a lack of specialized expertise and the considerable manual effort required to identify and correct these violations in HTML code. Addressing this challenge, researchers Nadeen Fathallah, Daniel Hernández, and Steffen Staab have introduced AccessGuru, a novel method designed to automatically detect and correct web accessibility violations.
Understanding Web Accessibility Violations
To tackle the problem systematically, AccessGuru introduces a new taxonomy that classifies web accessibility violations into three main categories: Syntactic, Semantic, and Layout.
-
Syntactic violations occur when essential HTML elements or attributes for accessibility are missing or malformed. An example would be an image without proper ‘alt text’ (alternative text) or a table lacking necessary header tags, which makes it difficult for screen readers to interpret the content.
-
Layout violations relate to the visual and spatial arrangement of content. This includes issues like insufficient color contrast between text and background, making content unreadable for some users, or preventing users from zooming in on a page.
-
Semantic violations are more nuanced. These happen when HTML accessibility elements are present but fail to convey meaningful content. For instance, an image might have ‘alt text’, but if it’s a generic phrase like ‘image’ instead of a descriptive one, it’s a semantic violation because it doesn’t provide useful information to assistive technologies.
How AccessGuru Works
AccessGuru operates in two primary stages: detection and correction.
Detection (AccessGuruDetect)
AccessGuruDetect combines traditional accessibility testing tools with Large Language Models (LLMs). For syntactic and layout violations, it uses tools like Axe-Playwright, which are effective at identifying rule-based issues. For semantic violations, which are harder for automated tools to catch, AccessGuru employs an LLM. This LLM is given the HTML document and a screenshot of the rendered web page, allowing it to understand the visual context and identify if elements like alt text truly describe the image content.
Correction (AccessGuruCorrect)
Once violations are detected, AccessGuruCorrect steps in. It uses a pre-trained LLM to generate corrected HTML code. The LLM is guided by sophisticated prompting strategies, including ‘role-play prompting’ (where the LLM acts as a web accessibility expert), ‘contextual prompting’ (providing specific details about the violation), and ‘metacognitive prompting’ (encouraging the LLM to self-reflect and refine its corrections). If an initial correction isn’t perfect, a ‘corrective re-prompting’ strategy provides feedback to the LLM, allowing it to improve its output. The goal is to minimize a ‘violation score’, ensuring the generated code is fully compliant with Web Content Accessibility Guidelines (WCAG).
Key Achievements and Impact
The researchers developed a new benchmark dataset of 3,500 real-world web accessibility violations, covering over 112 distinct types across all three categories. This is the most comprehensive publicly available dataset of its kind. When evaluated against this benchmark, AccessGuru demonstrated remarkable effectiveness, achieving up to an 84% average violation score decrease. This significantly outperforms existing methods, which typically achieve at most a 50% decrease.
For semantic corrections, AccessGuru’s LLM-generated attributes were compared to corrections made by human developers. The results showed an average semantic similarity of 77%, indicating that the AI-produced solutions closely matched the phrasing, structure, and meaning of human-written corrections. This highlights AccessGuru’s ability to understand and address complex, meaning-based accessibility issues.
This research represents a significant step forward in automating web accessibility. By lowering the effort required to make web pages accessible, AccessGuru promotes greater inclusiveness, ensuring that more people, regardless of their abilities, can interact with and contribute to the web effectively. You can find more details about this innovative work in the full research paper available here.
Also Read:
- Ericsson’s Journey into AI-Powered Code Review Automation
- Enhancing Human Feedback for Language Models with Interactive Text Breakdown
Future Directions
While AccessGuru shows great promise, the authors acknowledge areas for future development. These include the complex task of fully reconstructing a corrected HTML document from individual corrected snippets, improving the LLM’s reliability for semantic detection, and handling dynamic web content and very long HTML documents more effectively. Future work will also explore incorporating measures beyond just compliance checks, such as task completion and usability, to ensure a truly accessible user experience.


