agentleFS
muon-m2muon-m2/magento2-tools/skills/a11y-audit/SKILL.md

a11y-audit

Skill6 starsChanged 28 days agoMITView on GitHub

Audit a module's or theme's storefront templates for WCAG 2.1 Level AA accessibility issues and emit ranked findings. This is a read-only, static-first audit skill — it never modifies templates and does not require a running Magento instance. - STATIC-FIRST. The default pass analyzes .phtml / .html templates and .less / .css files with no running Magento, no Docker, no credentials. See references/wcag-rules.md for the static check catalog. - RUNTIME OPT-IN. The pa11y pass is strictly opt-in (--runtime). It requires…

We split this skill into the rules it gives an agent

8 rules. 0 are common, 2 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 24 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    READ-ONLY: Never modifies templates, never installs packages, never uploads.

    line 33
  2. Very specific:

    WCAG CRITERION MAPPING: Every finding records the WCAG 2.1 success criterion it violates (e.g.

    line 34
  3. Very specific:

    HONEST GAPS: If no templates are found, state so.

    line 39
  4. Very specific:

    Default: auto — agents when the plugin's context-budget hook reports this conversation above its threshold, inline otherwise.

    line 44
  5. Very specific:

    When conditions are met, run pa11y <url> (or pa11y-ci) and merge runtime findings with static findings.

    line 110
  6. Very specific:

    When any condition is unmet, add a scanner_errors entry:

    line 113
  7. Distinctive:

    Never invent runtime findings.

    line 117
  8. Very specific:

    Run build-findings.sh with DOCS_ROOT=<output_root> (the resolved --docs-root value, or .docs by default) so both artifacts land under …

    line 137

“Common” is measured: kept by at least 6 in 10 of the 24 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Magento 2 Accessibility Audit

Audit a module's or theme's storefront templates for WCAG 2.1 Level AA accessibility issues and emit ranked findings. This is a read-only, static-first audit skill — it never modifies templates and does not require a running Magento instance.

Core Rules

  • STATIC-FIRST. The default pass analyzes .phtml / .html templates and .less / .css files with no running Magento, no Docker, no credentials. See references/wcag-rules.md for the static check catalog.
  • RUNTIME OPT-IN. The pa11y pass is strictly opt-in (--runtime). It requires (1) a storefront URL the user provides, and (2) pa11y present in {ctx.tools}. When either is absent the runtime pass is skipped with an honest "runtime pass unavailable" note in scanner_errors — the result is never invented. See references/runtime-pa11y.md.
  • THEME-AWARE. Resolve the active theme via context ({ctx.theme}). Hyva projects (Tailwind + Alpine x-*) and Luma projects (RequireJS/Knockout data-bind) produce different template patterns; the scan adapts. See references/theme-discovery.md.
  • READ-ONLY. Never modifies templates, never installs packages, never uploads.
  • WCAG CRITERION MAPPING. Every finding records the WCAG 2.1 success criterion it violates (e.g. 1.1.1, 4.1.2) as a subcategory or tag.
  • SHARED SEVERITY SCALE. Calibrate to context/references/severity.md. Missing alt on a product image = high; color-contrast heuristic = medium; purely advisory structural suggestion = low/info.
  • HONEST GAPS. If no templates are found, state so. If the runtime pa11y pass is unavailable, record a scanner_errors entry — never emit fabricated findings.

Execution Mode

Default: auto — agents when the plugin's context-budget hook reports this conversation above its threshold, inline otherwise. In agents mode (--agents flag, or execution_mode in .claude/m2.json surfaced as {ctx.execution_mode} — selection contract in context/references/execution-modes.md) the judgement passes of this skill are dispatched to the read-only reviewer agent with a frontend/accessibility dimension brief, and this skill owns synthesis. The scripted scanners (scripts/build-findings.sh) are deterministic and run identically in both modes.

Severity Calibration (a11y-specific)

SeverityA11y example
High<img> missing alt; form input with no label/aria-label
High<a>/<button> with no accessible text
MediumHeading order skip (h1→h3); positive tabindex; missing skip-link
MediumARIA role misuse (e.g. role="button" on <div> without keyboard)
MediumColor-contrast heuristic flag in LESS/CSS (1.4.3 — heuristic only)
LowMissing lang attribute on root <html>
LowMissing <title> on partial layouts
InfoRuntime pa11y pass skipped (no URL or pa11y absent)

Workflow

Phase 0 — Context Resolution

Invoke context. Capture {ctx} including {ctx.theme}, {ctx.tools}, and {ctx.magento_root}. Hard-stop if the target module or theme directory cannot be resolved.

Phase 1 — Scope

Determine the audit target:

  • Module scope (--module=<Vendor>_<Module>): scan {magento_root}/app/code/{Vendor}/{Module}/view/frontend/templates/**/*.phtml and any app/design/frontend/**/{Vendor}_{Module}/**.
  • Theme scope (--theme=<Vendor>/<Theme>): scan {magento_root}/app/design/frontend/{Vendor}/{Theme}/**.
  • Default: infer the first custom module or the active {ctx.theme} path.

See references/theme-discovery.md for template location rules.

Phase 2 — Static Scan

Run ${CLAUDE_SKILL_DIR}/scripts/scan-templates.sh:

  • Scans .phtml and .html for the WCAG check catalog in references/wcag-rules.md.
  • Scans .less and .css for color-contrast heuristics (WCAG 1.4.3 — heuristic only; note this cannot fully verify contrast without rendering).
  • Outputs a JSON array of finding objects conforming to context/references/findings-schema.md. Each finding's category is one of the documented buckets (alt-text, aria, semantic-html, keyboard, contrast, forms) so findings summarize by bucket.
  • Adapts to Hyva vs. Luma template patterns via {ctx.theme}.
  • For module scope, pass any resolved theme-override roots (e.g. app/design/frontend/{ctx.theme}/{Vendor}_{Module}/templates, per references/theme-discovery.md) via EXTRA_SCAN_ROOTS (os.pathsep- or newline-separated) so the single scan covers both the module's own templates and the overrides that render.

Phase 3 — Optional Runtime pa11y Pass (OPT-IN)

Skipped by default. Only runs when all of:

  1. --runtime flag is passed.
  2. The user provides a --url=<storefront-url>.
  3. pa11y is present in {ctx.tools}.

When conditions are met, run pa11y <url> (or pa11y-ci) and merge runtime findings with static findings. See references/runtime-pa11y.md for the merge strategy.

When any condition is unmet, add a scanner_errors entry:

{"scanner": "pa11y", "stderr": "runtime pass skipped — <reason>"}

Never invent runtime findings.

Phase 4 — Report

Produce three deliverables:

  1. Markdown audit report (LLM deliverable, NOT automated): {output_root}/accessibility/{Vendor}_{Module}-a11y-{date}.md (module scope; theme/site scope: a11y-{scope}-{date}.md). Sections: target identity + scope summary, findings by WCAG criterion (Critical/High/Medium/Low/Info), static-only caveat, runtime pass status, skipped checks, recommended next steps (each naming the executing skill: frontend for template fixes).
  2. JSON + SARIF (automated via ${CLAUDE_SKILL_DIR}/scripts/build-findings.sh). The automated basename uses the underscore module name (e.g. Acme_Storefront → Acme_Storefront-a11y-{date}):
    {output_root}/accessibility/{Vendor}_{Module}-a11y-{date}.json   # OUTPUT_KIND=accessibility
    {output_root}/accessibility/{Vendor}_{Module}-a11y-{date}.sarif
    Run build-findings.sh with DOCS_ROOT=<output_root> (the resolved --docs-root value, or .docs by default) so both artifacts land under {output_root}/accessibility/.

WCAG Checks (Summary)

See references/wcag-rules.md for the full static check catalog.

RuleWCAG SCSeverity
<img> missing alt1.1.1high
Form input without label/for/aria-label1.3.1, 4.1.2high
<a> / <button> with no accessible text2.4.4, 4.1.2high
Heading-order skip (e.g. h1→h3)1.3.1medium
Missing lang on <html>3.1.1low
Invalid or abused ARIA roles / aria-*4.1.2medium
Positive tabindex / keyboard traps2.4.3medium
Missing skip-link2.4.1medium
Color-contrast heuristic in LESS/CSS1.4.3medium

Scripts

  • ${CLAUDE_SKILL_DIR}/scripts/scan-templates.sh — read-only static scan; outputs a JSON array of findings conforming to context/references/findings-schema.md.
  • ${CLAUDE_SKILL_DIR}/scripts/build-findings.sh — aggregates scan output and emits via the shared context/scripts/emit-findings.sh pipeline (JSON + SARIF). OUTPUT_KIND=accessibility, SKILL_NAME=a11y-audit.

Reference Files

  • references/wcag-rules.md — static check catalog, each mapped to a WCAG SC.
  • references/theme-discovery.md — template location rules; Luma vs. Hyva differences; how to use {ctx.theme}.
  • references/runtime-pa11y.md — the OPT-IN runtime pa11y pass specification.
  • context/references/severity.md — shared severity scale.
  • context/references/findings-schema.md — JSON document structure and finding object shape.
  • context/references/theme-detection.md — {ctx.theme} resolution algorithm.

Inputs

/magento2-tools:a11y-audit [--module=<Vendor>_<Module>]
    [--theme=<Vendor>/<Theme>]
    [--runtime --url=<storefront-url>]
    [--format=markdown|json|sarif]
    [--scope=module|theme]
    [--docs-root=<path>]

Outputs

Module scope (basename uses the underscore module name, e.g. Acme_Storefront):

{output_root}/accessibility/{Vendor}_{Module}-a11y-{date}.md    # LLM deliverable (Phase 4)
{output_root}/accessibility/{Vendor}_{Module}-a11y-{date}.json  # automated (build-findings.sh)
{output_root}/accessibility/{Vendor}_{Module}-a11y-{date}.sarif # automated (build-findings.sh)

Theme/site scope:

{output_root}/accessibility/a11y-{scope}-{date}.md
{output_root}/accessibility/a11y-{scope}-{date}.json
{output_root}/accessibility/a11y-{scope}-{date}.sarif

{output_root} defaults to .docs ({ctx.docs_root}); see the --docs-root/DOCS_ROOT recipe in context/references/artifact-layout.md.

Output root (--docs-root)

This skill accepts --docs-root=<path> (see context/references/artifact-layout.md). When set, run the emitter with DOCS_ROOT=<path> so artifacts land under <path>/accessibility/; otherwise they default to {ctx.docs_root}/accessibility/. Orchestrators such as feature pass this to collect a run's artifacts under one folder.

Related Skills

ConcernSkill
Build accessible frontend templates / componentsfrontend
General module quality/architecture reviewreview
Context resolution (Phase 0)context
Deep static-analysis gate (phpcs, phpstan)lint

Download now (ZIP)

  • Other versions30 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 30

    1. gitkraken/vscode-gitlens★ 9.9ksame name
    2. plugin87/ux-ui-agent-skills★ 3ksame name
    3. SwitchbackTech/compass★ 227same name
    4. Hassaan146/claude-skills★ 18same name
    5. helderberto/agent-skills★ 17same name
    6. renfei-design/Figma-AI-Bridge★ 16same name
    7. Mozurok/fhorja.dev★ 10same name
    8. greglas75/zuvo★ 8same name
    9. scayver/marketing-skills★ 8same name
    10. viknesh20-20/claude-code-tool-kit★ 7same name

    20 more not listed

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • Used alongsideProjects with it also use dependency-audit, design-tokens and 5 more.

    Other files people use alongside this one.

    Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
    • francogalfreSkill

      dependency-audit

      Audits package.json dependencies for outdated packages, security vulnerabilities, unnecessary deps, and version issues. Use when the user says "audit my dependencies", "check my packages", "what deps should I update", "clean up package.json", "are there security issues in my deps", or pastes a package.json.

      Also in 3 projects that use this

    • ilikescienceSkill

      design-tokens

      Expert in design tokens using the DTCG specification. Use this skill when users ask about design tokens, DTCG format, token validation, formatting, transformation, color spaces (sRGB, Display P3, OKLCH), references and aliasing, resolvers, theming with modifiers/contexts, multi-platform design systems, accessibility, or working with tools like jq, jsonata, and terrazzo. Helps with token file creation, resolver configuration, structure, naming conventions, and best practices.

      Also in 3 projects that use this

    • GitHubSkill

      refactor

      Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

      Also in 5 projects that use this

    • dillonluiSkill

      design-review

      Review a view or flow for UX and UI issues. Provides severity-ranked, actionable findings grounded in established design heuristics. Use when the user asks for design feedback, UX review, or UI critique.

      Also in 3 projects that use this

    • AnthropicSkill

      design-system

      Audit, document, or extend your design system. Use when checking for naming inconsistencies or hardcoded values across components, writing documentation for a component's variants, states, and accessibility notes, or designing a new pattern that fits the existing system.

      Also in 3 projects that use this

    • HashiCorpSkill

      changelog

      Add a `.changelog/<PR_NUMBER>.txt` entry for a GitHub Pull Request, commit, and push.

      Also in 3 projects that use this

  • In this repository35 other files it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.