27 lines
1.7 KiB
Markdown
27 lines
1.7 KiB
Markdown
---
|
|
applyTo: 'mediawiki/skins/**/*.mustache,mediawiki/skins/**/*.css,mediawiki/skins/**/*.less,mediawiki/extensions/**/*.php,mediawiki/extensions/**/*.js'
|
|
---
|
|
|
|
# Accessibility Rules For This Repository
|
|
|
|
Treat WCAG 2.1 AA as required. Apply WCAG 2.1 AAA criteria where they do not conflict with other requirements; flag AAA violations as advisory recommendations, not blocking issues.
|
|
|
|
## Required checks in code changes
|
|
|
|
- Use semantic elements for page landmarks and structure.
|
|
- Ensure all controls are keyboard operable.
|
|
- Keep visible focus indicators.
|
|
- Provide labels for form controls and clear error messages.
|
|
- Ensure informative images have descriptive alt text. Decorative images must have empty alt attributes (alt='') or role='presentation'. Flag any image missing an explicit alt attribute.
|
|
- Avoid color-only communication.
|
|
- Maintain AA contrast ratios for text and UI components.
|
|
- For dynamic UI changes in JavaScript, verify ARIA live regions are used for status updates and that focus is programmatically managed when content is inserted or removed from the DOM.
|
|
- If contrast compliance cannot be determined statically (e.g., values depend on runtime theme variables), flag the change with a note that manual contrast verification is required and specify the token or variable that must be checked.
|
|
|
|
## Review behavior
|
|
|
|
- Call out WCAG failures with exact remediation.
|
|
- Prefer MediaWiki/Codex conventions over custom inaccessible patterns.
|
|
- Recommend tests for any UI change that can regress accessibility.
|
|
- If a WCAG failure exists in a third-party dependency or cannot be immediately remediated, document it with a GitHub issue reference and a short-term workaround if one exists.
|