diff --git a/.agents/skills/annotask-apply/A11Y_RULES.md b/.agents/skills/annotask-apply/A11Y_RULES.md new file mode 100644 index 0000000..8062295 --- /dev/null +++ b/.agents/skills/annotask-apply/A11Y_RULES.md @@ -0,0 +1,77 @@ +# A11Y Rules + +Read this file for `a11y_fix` tasks. If you are applying a batch of a11y tasks, read it once for the batch, not once per task. + +## Task context + +The `a11y_fix` task `context` contains: + +- `rule`: axe rule ID, or Annotask's synthetic `tab-order` rule +- `impact`, `help`, `helpUrl` +- `elements[]`: offending elements with `html`, `selector`, `fix`, source `file` / `line` / `component` +- `elements[i].a11y`: computed accessibility metadata for the specific element + +```text +elements[i].a11y = { + accessible_name, name_source, + role, role_source, + tabindex, focusable, + focus_indicator, + contrast, + aria_attrs, +} +``` + +If `screenshot_meta` is present, retrieve it via `annotask_get_screenshot` before proposing visual changes such as contrast or focus-ring fixes. + +## Rule playbook + +Match on `context.rule`. + +| Rule(s) | Fix layer | What to do | +|---|---|---| +| `color-contrast`, `color-contrast-enhanced` | Design tokens first | See **Color contrast playbook** below. | +| `label`, `form-field-multiple-labels` | Markup | Wrap input in `