Summary: In this step, you'll learn how to create specialized GitHub Copilot chat modes for accessibility testing. You'll implement a custom assistant that identifies accessibility issues in web applications, suggests improvements based on WCAG standards, and helps integrate accessibility checks into your development workflow. Explore advanced customization options for GitHub Copilot chat.
Custom chat modes in GitHub Copilot allow you to tailor the assistant for specialized development tasks. By creating a mode dedicated to accessibility testing, you ensure Copilot focuses exclusively on identifying and resolving accessibility issues in your code.
To build this mode, we'll use the Awesome GitHub Copilot Customizations repository—a curated collection of prompts, instructions, and chat modes that extend Copilot across languages, domains, and workflows.
This repository provides three main resources you can use when defining your custom chat mode:
– Task-specific prompts for generating code, documentation, or solving targeted problems.
– Project-wide or file-specific coding standards and best practices.
– Ready-to-use personas and conversation modes tailored for different developer roles and contexts.
We'll implement the accessibility assistant mode using the Accessibility mode from the GitHub repository.
-
Open Copilot Chat by clicking the Copilot icon in the VS Code sidebar.
-
In the Copilot Chat panel, select ⚙️ Configure Chat > Modes > Create new custom chat mode file. By default, chat mode files are located in the
.github/chatmodesfolder. -
Name the chat mode
accessibility. It will appear in the chat mode dropdown list. -
Once the
accessibility.chatmode.mdfile is created, copy its content from the Accessibility mode repository using the "Copy raw file" option. -
Open the Copilot Chat panel and select
accessibilityfrom the chat mode dropdown list. -
Ask Copilot to check your
index.htmlfile.Check the accessibility in index.html -
Review the suggestions from the Accessibility chat assistant. Use Agent mode to update your
index.htmlfile and fix any identified accessibility issues.
| ← Adding Form Validation | Next: Commit and Code Review with GitHub Copilot → |
|---|


