# checks.md — Accessibility Pack
---
## Scope
This pack audits JSX and TSX source files for common accessibility (a11y) defects: missing
`alt` attributes on images, click handlers on non-interactive elements without keyboard
support, `target="_blank"` anchors lacking `rel="noopener noreferrer"`, animations and
transitions without a `prefers-reduced-motion` guard, and interactive elements in Tailwind
v4 projects that rely on default cursor styles (Tailwind v4 no longer sets `cursor:pointer`
on buttons globally). Checks self-scope to `.jsx` and `.tsx` files; a JavaScript
back-end project with no JSX will match the `language:javascript` gate but produce zero
findings, which is the expected graceful behaviour. This pack does NOT audit semantic HTML
correctness (heading order, landmark regions, colour contrast ratios) or ARIA attribute
validity — those require specialised tooling beyond grep and LLM scanning.
**Pack ID:** `ccgm/accessibility`
**Applies when:** `language:javascript`
---
## applies_when Rationale
| Condition | Reason |
|-----------|--------|
| `language:javascript` | The ecosystem detector emits `javascript` for any repository that has a `package.json`. JSX/TSX files only appear in JavaScript (or TypeScript) projects; there is no signal to produce on Go, Python, or other non-JS codebases. Using `language:javascript` is the broadest correct gate: it covers plain-JS React, TypeScript React, and Next.js projects alike. Checks then internally scope themselves to `.jsx`/`.tsx` files, so a Node API with no JSX produces zero findings rather than false positives. |
---
## Checks
---
### `a11y/img-missing-alt`
**Severity:** `medium`
**Confidence:** `medium`
**Detection:** `llm`
#### Detection
The LLM agent scans JSX/TSX source files for `` elements (and `` from
next/image or similar) that are missing an `alt` attribute, or where `alt` is an empty
string on a non-decorative image.
**Tool (if detection = tool or hybrid):**
n/a
Rule / rule-id: n/a
Fallback when tool absent: llm
**LLM instruction (if detection = llm or hybrid):**
```
READ AND APPLY: ~/.claude/skills/audit/reference/fix-patterns.md
Use the Fix Type Reference table from that file to assign fix_type and fix_confidence to
each finding. Do not rely on memory — open and apply the file.
Scan JSX and TSX source files (.jsx, .tsx) for image elements missing an `alt` attribute
or using `alt=""` on what appears to be a non-decorative image.
Flag as findings:
1. elements with no `alt` attribute at all
2. elements (Next.js next/image, or similar framework wrappers) with no `alt` prop
3. or elements where alt="" but the surrounding context (captions, filename,
aria-label, or descriptive class names) suggests the image conveys meaningful content
Do NOT flag:
- when there is an explicit comment, aria-hidden="true", or role="presentation"
indicating the image is purely decorative
- Auto-generated or vendored component files (node_modules, .gen.tsx, generated/)
- SVG inline elements (use