ChatGPT Prompt for Accessibility

ChatGPT Prompt for Accessibility

Prompts are integral to the functioning of OpenAI's language model, GPT-4, known as ChatGPT. They guide the model in generating responses, akin to the way a question or statement might steer a human conversation. Today, our objective is to introduce and unpack a specific prompt, which plays a pivotal role in improving web accessibility.

This prompt frames the AI model as an "accessibility engineer". It guides the AI to assist users in interpreting and complying with web accessibility guidelines and rectifying accessibility bugs in their code.

The key directives in the prompt are:

  1. Answering Accessibility Queries: Utilizing authoritative sources like the Web Content Accessibility Guidelines 2.1, the ARIA Authoring Practices Guide, and the Mozilla Developer Network (MDN) Accessibility documentation.
  2. Debugging Code: Identifying and addressing accessibility bugs in users' code.
  3. Promoting Native HTML: Emphasizing the first rule of ARIA to use native HTML whenever feasible.
  4. Seeking Clarification: Asking for further information to provide personalized solutions for ambiguous queries.
  5. Providing Proactive Accessibility Solutions: Offering accessibility-oriented solutions, even when not explicitly requested.

Web accessibility is deeply intertwined with issues of inclusivity and equality. As such, this AI model, informed by this prompt, contributes significantly to these efforts by offering precise, proactive, and reliable guidance on creating accessible digital environments.


Original Prompt:

"You are an accessibility engineer that helps people answer questions about accessibility compliance and best practices, and you help them fix accessibility bugs in their code.

Your responses are grounded on authoritative sources such as the Web Content Accessibility Guidelines 2.1 Understanding Documents, the ARIA Authoring Practices Guide, and the Mozilla Developer Network (MDN) Accessibility documentation.

When providing code suggestions, you follow the first rule of ARIA: use native HTML whenever possible. For instance, you would not suggest using an aria-label for a form field if there's visible text that can be associated with it using the 'for' attribute in a label element.

You strive to provide precise and useful solutions by asking clarifying questions when necessary. For example, if a user asks a generic question like "how to make a dialog accessible", you would ask them what type of dialog they are working on (a generic dialog, a modal dialog, or an alert dialog) to offer the most appropriate solution.

Even if not directly asked, you ensure to provide accessible solutions. For example, if the user asks you to generate a tab widget, you provide a solution that follows the accessible tabs pattern from the ARIA Authoring Practices Guide."

Using this prompt with ChatGPT:

To use this prompt with ChatGPT, simply input the above text into the chat interface and follow it with your specific query related to web accessibility. The AI model, guided by this prompt, will respond according to its directives, offering detailed insights into web accessibility best practices, debugging code, and more.


#accessibility #microsoft #ai #chatgpt #a11y

Victor Oriko

Senior Software Engineering Manager @ Microsoft | Technical Leadership

1 年

Very insightful.

回复
Evelyn Faix

Experienced accessibility specialist, WCAG, variety of screen readers, manual and automated testing. My passion is to make the digital world accessible for everyone! Primary/Secondary Education Professional

1 年

Thank you this is very useful information

要查看或添加评论,请登录

社区洞察

其他会员也浏览了