Skip to content
Ravi Chaudhary

AI · Backend

AI Accessibility Engine

A scanner can tell an image has alt text, not whether the text describes it. This engine uses GPT for five rules like that, and suggests a fix for each.

Role
Architecture & backend
Company
TestMu AI
Year
2024 — 25
Layers
APIs, Services, Models, Infrastructure
Stack
PythonFastAPIGoOpenAI APIAWS
5WCAG criteria judged by the model

Context

A rule-based scanner can confirm that an image has alt text. It can’t tell you that “banner_final_v2.png” describes nothing, or that a page titled “Home” doesn’t say what the page is. Rules like these need a judgement call.

I built the engine’s services in Python (FastAPI) and Go, with an OpenAI GPT pipeline that makes that call for five rules. I also owned the architecture of the product around it.

The five rules it judges

  1. HTML page language subtag should match default language
  2. HTML page title should be descriptive
  3. Element marked as decorative should not be exposed
  4. HTML images should not contain text
  5. Image accessible name should be descriptive

Public W3C accessibility test rules.

How it works

screenshotspromptstructuredapplyconfirmPage under testrendered + DOMScannerdetects violationsPrompt contextDOM · markup · issueOpenAI GPTdirect APIRemediationmarkup · ARIA · whyRe-scandid it clear?
  • Page under testscreenshotsScanner

Step 1 / 5

  1. I tuned the screenshot capture so the model sees the page the way a user does, not just the DOM.

  2. Static rules handle what the markup can prove. Only the five rules above go to the model.

  3. The DOM structure, the violation and the markup around it go straight into the prompt. Plain API calls, kept simple on purpose.

  4. Each violation comes back with corrected markup, ARIA attributes and a short reason for the change.

  5. We apply the fix and scan again to check the issue is really gone. QA reviews the rest, and failures we track feed back into the prompt: tighter instructions, few-shot examples and a fixed output format.

Outcome

  • Runs on a schedule with no one watching.
  • Every fix the model suggests is checked with a re-scan.

Next case study

Offline Mode for Real Devices

Lets testers switch off the network on real iPhones and Android phones to see how their app behaves offline.