How to Build a General-Purpose Accessibility Agent for Your Codebase

Introduction

Creating an AI-powered accessibility agent is a practical way to embed inclusive design into your development workflow. This guide walks you through building a general-purpose accessibility agent, based on the principles and lessons learned from GitHub's experimental pilot. The agent serves two main functions: providing just-in-time answers to accessibility questions and automatically catching and fixing simple, objective issues before they reach production. By the end, you'll have a clear roadmap to augment your team's accessibility efforts without expecting a silver bullet.

How to Build a General-Purpose Accessibility Agent for Your Codebase
Source: github.blog

What You Need

Step-by-Step Guide

Step 1: Define Your Agent’s Core Goals

Start by deciding what your accessibility agent will do. The original pilot had two primary goals:

  1. Provide on-demand accessibility answers – Integrate with developer tools so engineers can ask questions and get reliable, just-in-time responses (e.g., “How should I label this button?”)
  2. Automatically remediate simple issues – Scan pull requests that modify front-end code for objective accessibility errors and fix them before shipping.

Write your own goal statements. Keep them focused – don't try to solve everything at once. A narrow scope speeds up launch and builds trust.

Step 2: Choose Integration Points

To be genuinely useful, the agent must live where developers work. The pilot used two surfaces:

Identify your primary development environment and pick one or two integration channels. For example, a GitHub Actions bot that comments on PRs or a Slack command that triggers scans.

Step 3: Set Up Automated PR Review

For the remediation goal, the agent must automatically evaluate every pull request that changes front-end code. Configure your CI pipeline to trigger the agent on pull request events. The agent should:

GitHub’s own agent reviewed 3,535 pull requests with a 68% resolution rate – set your targets accordingly.

Step 4: Identify and Categorize Issue Types

Based on your codebase’s history, list the most frequent accessibility issues. The pilot found these top five (in order):

  1. Making structure and relationships clear to assistive technologies (e.g., missing landmarks, improper heading hierarchy)
  2. Providing clear and concise names for interactive controls (e.g., missing aria-labels or button names)
  3. Ensuring users are aware of important announcements (e.g., live region updates)
  4. Ensuring text alternatives for non-text content (e.g., missing alt attributes)
  5. Moving keyboard focus through pages in a logical order (e.g., tabindex misuse)

Map each issue to a set of rules the agent can check programmatically. For trickier decisions, let the agent flag the issue for human review.

Step 5: Build the Agent Architecture

Design a modular system:

Keep in mind that multi-agent workflows can fail. Start with a single agent and only split tasks if performance demands it. Use the agents.md pattern to document behavior (see resources).

How to Build a General-Purpose Accessibility Agent for Your Codebase
Source: github.blog

Step 6: Adopt the Right Mindset

This is a critical, human-focused step. The social model of disability teaches that barriers are created by the environment, not by individuals. Your agent is not a silver bullet – it augments human effort, not replaces it. Communicate this to your team:

When the scope is clear, your team will embrace the agent as a helpful teammate rather than an imposing audit tool.

Step 7: Launch, Monitor, and Iterate

Start with a small subset of repositories or issue types. Track metrics:

Use the feedback to fine-tune your detection rules and LLM prompts. The pilot achieved a 68% resolution rate – you can improve by iterating on the agent’s context window and rule set.

Tips for Success

Resources for Learning More

Tags:

Recommended

Discover More

GIMP 3.2.4: Key Bug Fixes and Improvements in the Latest Maintenance ReleaseThe Marathon Infection Chain of ClipBanker: How a Simple Search Leads to a Cryptocurrency-Stealing Trojan10 Key Insights Into Cursor’s $60 Billion Bet on the HarnessStudy Reveals Warm-Tuned AI Chatbots Sacrifice Accuracy for PolitenessFlutter and Dart Websites Rebuilt with Jaspr – Unified Stack Ends Fragmented Tooling