-
Notifications
You must be signed in to change notification settings - Fork 22
feat: Add comprehensive AI agent instructions for accessibility devel… #335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| ### Documentation (Markdown) | ||
| - All documentation files go in `/public/content/documentation/` | ||
| - Follow the structure: `<section>/<category>/<filename>.md` | ||
| - Use the provided templates: `criteria` or `how-to-test` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the templates are output by src/scripts/createMarkdown.sh which we might want to mention since that is where the actual templates are as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added :)
AGENTS.md
Outdated
| - Follow the structure: `<section>/<category>/<filename>.md` | ||
| - Use the provided templates: `criteria` or `how-to-test` | ||
| - Use the script: `npm run create-md -- <filename> "<relative-path>" <template-type>` | ||
| - Reference the MARKDOWN_GUIDE.md for formatting standards |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use the relative path to where this GUIDE is? Does it need that?
| ## Testing Requirements | ||
| - Write unit tests for all new components | ||
| - Update snapshots when component structure changes intentionally | ||
| - Run tests before committing: `npm test` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run linting: npm run lint and npm run lint:scss
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added :)
| 5. Add to navigation if needed using `npm run create-md` | ||
|
|
||
| ### Updating Documentation | ||
| 1. Never manually create markdown files - use the script |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we restate the script command and documentation here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added :)
AGENTS.md
Outdated
|
|
||
| ### Updating Documentation | ||
| 1. Never manually create markdown files - use the script | ||
| 2. Keep examples accessible and code snippets valid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Valid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rewrote this to make a bit more sense
AGENTS.md
Outdated
| You are an expert full-stack accessibility developer. MagentaA11y V2 is an accessibility accessibility accpeptance criteria documentation platform built with React and TypeScript. The project provides comprehensive accessibility guidelines, testing procedures, and best practices for web and native applications. | ||
|
|
||
| ## Core Principles | ||
| 1. **Accessibility First**: All code and documentation must follow WCAG guidelines and accessibility best practices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we specify WCAG 2.2 and the WAI-ARIA version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Brought in versions
| - `npm run parse-md-files` - Update markdown files | ||
| - `npm test` - Run tests | ||
|
|
||
| ## Important Notes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we mention the easily AI readable content.json file somewhere to learn about the project?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added :)
AGENTS.md
Outdated
| Avoid generating content that reflects implicit bias or outdated patterns. Critically assess accessibility choices and flag uncertain implementations. | ||
|
|
||
| - **Verification-Oriented Responses** | ||
| When suggesting accessibility implementations or decisions, include reasoning or references to standards (e.g., WCAG, platform guidelines). If uncertainty exists, the assistant should state this clearly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we actually say, "always reference standards and resources used" in this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! Edited
|
|
||
| ### Anti-Patterns and Mistakes to Avoid | ||
| - Using only placeholders to label inputs | ||
| - Suppressing visible focus with CSS resets or browser overrides |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about use Semantic HTML over ARIA roles whenever possible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edited :)
AGENTS.md
Outdated
| ``` | ||
| - Avoid overuse of sectioning elements and ARIA landmarks | ||
| - Don't add any ARIA attributes unless asked to, rely on web standards first | ||
| - Using generic containers when semantic elements would be more appropriate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need a "Don't" or "Avoid" in front of this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm or maybe it should preface the whole section?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes and Yes - reworked this
silverli
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great start!! A couple questions and comments added. I think we should get one more AI review maybe from Lawrence or Jules
AGENTS.md
Outdated
| ```html | ||
| <button>Click me</button> | ||
| ``` | ||
| - Don't apply role="link" to a Link <a> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This tag without an attribute is making the following headings look like links.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed :)
|
Item #1) Line 252 |
|
Item #2) Had a content idea to consider including Tables. Maybe we could start with consideration of simple data tables versus presentation layout tables: |
|
@jtweb23 @MyLightIsOn @silverli We could pull in some some content from these instructions too: @jtweb23 There's some good |
70a743d to
2529736
Compare
|
|
I've folded in all feedback!
@jtweb23 I've rewritten this to be a little more readable and just went with px. pt conversions are complex. I also moved it up into it's own little section.
@jtweb23 I've added Tables to the bottom of the file :) Great callout I think we are good when everyone Resolves there feedback items if happy. We can iterate on this as we get in there and Dev with it. I think especially when it comes to some of the React specific stuff. @silverli @MyLightIsOn ps. I was also sure to rebase so merge should be cool. |
Adds instructions for AI agents to adhere to.
AGENTS.mdis the newer industry standard to support multiple IDEs with a single instructions file. AI Agents will pull these instructions into every chat context.Two key sections: Project-specific rules based the this project and Accessibility rules that AIs should respect.
https://github.com/openai/agents.md
https://code.visualstudio.com/docs/copilot/customization/custom-instructions