southleft/skills-for-figma

audit-accessibility-figma

Deep accessibility scorecard for a single Figma component or component set — state coverage (default/hover/focus/disabled/error/active/loading), focus-indicator quality and contrast, non-color state differentiation, target size, annotation completeness, and…

ソースを見る
リポジトリの原文

見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。

audit-accessibility-figma — per-component a11y scorecard

Run a deep accessibility audit on a single component or component set and get a weighted 0–100 scorecard with prioritized fixes. Where lint-design-figma sweeps a whole tree for many rule violations, this skill goes deep on one component: it understands variant axes, classifies the component as interactive vs presentational, and scores each a11y dimension accordingly.

All via use_figma, on any plan — it inspects the real variant tree, fills, strokes, effects, and the component description.

Skill boundaries

  • `use_figma` rules — load the official `figma-use` skill first; it is the full Figma Plugin API reference. Essentials these scripts rely on: plain JS with top-level await + return (no IIFE, no figma.closePlugin(); console.log is not returned), inputs inlined as const at the top of each script, colors in 0–1 range, load fonts before any text op, await figma.getNodeByIdAsync(...), and atomic errors (a failed script applies nothing — read the error, fix, retry).
  • Tree-wide WCAG + design-system lint → use lint-design-figma.
  • CODE-side a11y (axe-core over HTML) → use scan-code-accessibility-figma.
  • Design-vs-code drift → use check-design-parity-figma.

Workflow

  1. Target a component. Set NODE_ID to a COMPONENT_SET, COMPONENT, or INSTANCE id (the script

walks INSTANCE → main component → parent set automatically). Leave it null to audit the current single selection.

  1. Set the tap-target minimum. TARGET_SIZE defaults to 24 (WCAG 2.5.8 minimum); pass 44 or 48

for stricter mobile targets.

  1. Run `scripts/audit-accessibility.js` via use_figma

(skillNames: "audit-accessibility-figma").

  1. Read the scorecard. overallScore is a classification-weighted blend of the six category

scores. See references/audit-categories.md for each category, its weight, and how to raise it.

  1. Work the recommendations. recommendations[] is already sorted by priority

(high/medium/low) with the WCAG SC named. Fix, then re-run to confirm the score moved.

Key rules

  • Interactive vs presentational is auto-detected from the component name and variant axes. It

changes which categories are scored and their weights — a badge is not penalized for lacking a focus state; a button is.

  • Colors are 0–1 floats. Contrast uses sRGB luminance; color-blind simulation uses

Brettel/Viénot dichromat matrices.

  • Coverage means interaction states for interactive components, and variant-axis completeness

(actual variants ÷ expected combinations) for presentational ones.

  • The audit is read-only — apply fixes with manage-variables-figma / figma-use, then re-audit.
同じリポジトリから

関連する Skills

すべての Skills
southleft
コミュニティ

analyze-component-set-figma

Analyze a Figma COMPONENTSET as a state machine for code generation — extract variant axes (state/size/etc.), map state variants to CSS pseudo-classes (hover→:hover, focus→:focus-visible, disabled→:disabled, error→[aria-invalid]), and compute per-variant visual diffs (only what changes per state). Use when generating an interactive component from a Figma variant set — triggers: 'analyze this component set', 'turn these variants into CSS states', 'generate a button/input/checkbox from Figma variants', 'what changes between the hover and default state', 'map Figma variants to component props', 'extract the state machine for this component'. Resolves bound variables to token names. NOT covered by the native MCP's getdesigncontext/getmetadata, which don't give you a variant-axis→CSS-state machine.

導入数
1
GitHub Stars
14
更新日
6月1日
southleft
コミュニティ

annotations-figma

Read and write designer annotations on Figma nodes — node-level design specs that pin properties (fills, width, fontSize, etc.) and carry plain or markdown notes. Use when the user wants to document or inspect interaction specs, animation timings, easing, accessibility requirements, or implementation notes attached directly to a node. Triggers: 'add an annotation', 'annotate this node/component', 'read the annotations on…', 'what specs are pinned to this element', 'list annotation categories', 'document the focus behavior on this button in Figma'. Annotations are distinct from comments (they pin to design properties) and from the description field. Requires the Figma Desktop app (Plugin API).

導入数
1
GitHub Stars
14
更新日
6月1日
southleft
コミュニティ

check-design-parity-figma

Compare a Figma node's actual specs against a code spec (the values your component renders) and get a 0–100 parity score, a list of discrepancies, and fix suggestions. Use to detect design-to-code DRIFT: triggers 'check design parity', 'does my code match the Figma', 'compare this component to the design', 'is my implementation faithful', 'find differences between design and code', 'verify the build matches Figma', 'design QA against code', 'parity score'. Reads the node's visual / typography / spacing / token / accessibility specs via usefigma (any plan) and diffs them against a codeSpec you provide. Complements the native getdesigncontext: instead of GENERATING code, it VALIDATES that existing code stayed in sync with the design.

導入数
1
GitHub Stars
14
更新日
6月1日
southleft
コミュニティ

component-properties-figma

Add, edit, and delete Figma component properties (TEXT, BOOLEAN, INSTANCESWAP, VARIANT) on a COMPONENT or COMPONENTSET, and instantiate a component then set its instance properties. Use when authoring or wiring up a component's API in Figma — triggers: 'add a component property', 'add a boolean prop to this component', 'make this text a component property', 'add an instance-swap slot', 'create a variant property', 'rename/delete a component property', 'place an instance of this component', 'instantiate this component and set its label/state', 'set properties on this instance'. Properties must be added to the parent COMPONENTSET, not individual variants. NOT covered by the native MCP's read-only getdesigncontext/getmetadata.

導入数
1
GitHub Stars
14
更新日
6月1日