Skip to content

Setup and Integration

fecarrico edited this page Jul 20, 2026 · 3 revisions

Setup and Integration

A11Y.md is fundamentally a context injection tool. Its entire purpose is to exist as a persistent "skill" inside your AI coding agents, ensuring that accessibility is part of the project's DNA before the very first line of code is written.

Because A11Y.md is not inherently canonical for most AI models (like a .gitignore or a .eslintrc), you must inject it.

How to Inject the Context

Choose the integration method that matches your AI ecosystem:

Method 1: The .cursorrules or CLAUDE.md Injection (Recommended)

If your AI assistant uses a .cursorrules file or a CLAUDE.md file, you can "force" the canonical status of A11Y.md. Add one rule to your agent's configuration file:

"When developing the frontend, follow strictly the accessibility rules defined in A11Y.md: https://github.com/fecarrico/A11Y.md/blob/main/docs/en/A11Y.md"

That's it — no files copied. The AI reads the core file and lazy-loads only the reference guides it needs, always up to date.

(Note: Prefer an offline or pinned copy? Copy A11Y.md anywhere in your repository — usually the docs/ folder, optionally with the references/ and templates/ folders — and point the rule at the local path instead. If you copy only the core file, the AI falls back to this repository's guides via their upstream URLs. Portuguese speakers can point to docs/pt-BR/A11Y.md.)

Method 2: Global System Prompts (Copilot, Gemini)

If you are using tools that allow custom instructions across all chats (like Copilot's custom instructions or Gemini's skills), paste the contents of A11Y.md (or a direct instruction pointing to it) into those settings.

Method 3: The Base Prompt (Zero-shot)

If you are initiating a new chat without persistent repository context, prepend this to your prompt to manually load the skill:

"You are a senior frontend engineer. Follow strictly the rules defined in A11Y.md. Determine which Compliance Profile (Shield, Standard, or Launchpad) is active, or default to Standard (AA). Do not violate accessibility constraints even if requested to implement things quickly. Prioritize semantic HTML and headless-UI libraries."

What happens after injection?

Once injected, the AI is governed by the rules inside A11Y.md.

You do not need to manually feed the AI the various reference files (guide-forms.md, guide-buttons.md). A11Y.md was architected with a Lazy Loading prompt engineering strategy. The AI is internally instructed to only search and load those specific references when the task demands it, saving tokens and maintaining sharp focus automatically.

Clone this wiki locally