Audit Figma designs for WCAG accessibility issues — color contrast, minimum font size, touch target sizing, and missing text alternatives. Use when asked to check accessibility, audit contrast ratios, find a11y issues, verify WCAG compliance, or review designs for accessibility problems. Scans nodes, analyzes offline, and annotates issues in Figma.
Scan Figma frames for WCAG 2.2 accessibility violations and annotate issues directly. Be fast — scan, analyze, present, annotate.
scripts/figma_cmd.mjs <channel> <command> [paramsJSON] — single command.github/skills/a11y-audit/scripts/a11y_check.py — offline analysis.github/skills/a11y-audit/references/wcag-criteria.mdFIGMA_TIMEOUT_MS=30000 for scan commands, FIGMA_TIMEOUT_MS=60000 for large treesGet the selection, then scan all text nodes:
FIGMA_TIMEOUT_MS=30000 node scripts/figma_cmd.mjs <ch> scan_text_nodes '{"nodeId":"<id>"}' > /tmp/a11y_text_scan.json
Returns {textNodes: [{id, name, characters, fontSize, fontFamily, fontStyle, width, height, x, y, path, depth}]}.
Scan for component instances and frames (potential buttons/controls):
FIGMA_TIMEOUT_MS=30000 node scripts/figma_cmd.mjs <ch> scan_nodes_by_types '{"nodeId":"<id>","types":["INSTANCE","COMPONENT"]}' > /tmp/a11y_components.json
Returns {matchingNodes: [{id, name, type, bbox: {x, y, width, height}}]}.
Batch-fetch details including fills and parent background colors:
FIGMA_TIMEOUT_MS=60000 node scripts/figma_cmd.mjs <ch> get_nodes_info '{"nodeIds":["<id1>","<id2>",...]}' > /tmp/a11y_node_details.json
For each text node, also fetch its parent node(s) to find the background color. Walk up the tree: get the text node's parent from get_node_info, check if it has a solid fill. If not, get that node's parent. Stop at 3 levels or when a solid fill is found.
Efficient approach: Use get_node_info on the root frame with full children — the nested children array includes fills for all descendants, so you can walk the tree in one call for background resolution.
Run the analysis script:
python3 .github/skills/a11y-audit/scripts/a11y_check.py \
/tmp/a11y_text_scan.json \
/tmp/a11y_components.json \
--details /tmp/a11y_node_details.json \
--out /tmp/a11y_issues.json
The script performs all checks offline and outputs categorized issues. It prints a summary to stdout.
Show a table to the user:
| # | Node | Issue | Current | Required | Severity | |---|------|-------|---------|----------|----------|
Group by severity (errors first, then warnings). Include:
Wait for user to review. They may choose: annotate all, annotate selected, or skip.
On user approval, apply annotations:
FIGMA_TIMEOUT_MS=30000 node scripts/figma_cmd.mjs <ch> set_multiple_annotations '{"nodeId":"<rootId>","annotations":<annotations_array>}'
The annotations array comes from the annotations field in /tmp/a11y_issues.json.
| Level | Normal text | Large text (>=18px or >=14px bold) | |-------|-------------|-------------------------------------| | AA (error) | >= 4.5:1 | >= 3:1 | | AAA (warning) | >= 7:1 | >= 4.5:1 |
#FFFFFF if none foundfontSize < 12px as warningfontSize < 10px as errorbutton, btn, link, icon, toggle, checkbox, radio, switch, tab, chip, action, fabcharacters is empty or whitespace-onlytype: "IMAGE") that have no annotationsget_node_info (or from the root tree)#FFFFFF (white)**A11y: <Issue Type>** — <Description>
Examples:
**A11y: Contrast** — Ratio 2.8:1 (need 4.5:1 for AA)**A11y: Font Size** — 10px is below 12px minimum**A11y: Touch Target** — 32×28px is below 44×44px minimum**A11y: Empty Text** — Text node has no content**A11y: Image Alt** — Image has no annotation (add alt text description)scan_text_nodes and scan_nodes_by_types automatically.scan_text_nodes with {"useChunking": true, "chunkSize": 200}.Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer