mcpField
E
experience-lwc-accessibility-validate

experience-lwc-accessibility-validate

github.com/forcedotcomTesting & quality1.1k1.1k installsUpdated 1d ago
Repository

About experience-lwc-accessibility-validate

An accessibility-review skill for web components, intended for work on their visible or interactive HTML, JavaScript, and CSS. It focuses on actionable WCAG 2.2 findings and fixes, while excluding unrelated code-review concerns.

Key features

  1. 01WCAG 2.2-focused review
  2. 02Coverage of applicable success criteria
  3. 03Actionable issue fixes
  4. 04Guidance on restrained WAI-ARIA use
  5. 05Screenshot-based visual review

Use cases

  1. 01Reviewing component markup for accessibility violations
  2. 02Checking keyboard interaction and focus behavior
  3. 03Evaluating forms, labels, and error feedback
  4. 04Assessing screenshots for contrast and reflow

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/forcedotcom/sf-skills --skill experience-lwc-accessibility-validate

After installing, type/experience-lwc-accessibility-validatein Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

references/reviewers/
sc-1-1-1-non-text-content.md
sc-1-3-1-i-lists.md
sc-1-3-1-ii-tables.md
sc-1-3-1-iii-form-labels.md
sc-1-3-1-iv-regions.md
sc-1-3-1-v-groups.md
sc-1-3-5-identify-input.md
sc-1-4-3-contrast.md
sc-2-1-1-keyboard.md
sc-2-4-4-link-purpose.md
sc-2-4-6-headings-labels.md
sc-2-5-1-pointer-gestures.md
sc-2-5-2-pointer-cancellation.md
sc-2-5-3-label-in-name.md
sc-2-5-7-dragging-movement.md
sc-3-2-1-on-focus.md
sc-3-2-2-on-input.md
sc-3-3-1-error-identification.md
sc-3-3-2-labels-instructions.md
sc-3-3-3-error-suggestion.md
sc-4-1-2-i-name.md
sc-4-1-2-ii-role.md
sc-4-1-2-iii-value.md
references/vision/
sc-1-1-1-non-text-content.md
sc-1-4-1-use-of-color.md
sc-1-4-10-resize-reflow.md
sc-1-4-11-non-text-contrast.md
sc-1-4-3-contrast.md
scripts/
contrast-ratio.py

Details

From the project README

Web Component Accessibility

Accessibility (a11y) patterns and remediation guidance for web components. Reference any time work involves the visible or interactive surface of a component — generating, modifying, reviewing, or styling HTML, JS, or CSS — to apply WCAG 2.2 standards.

Review Context

Conduct a review specifically focused on enhancing web accessibility, guided by the WCAG (Web Content Accessibility Guidelines).

In order to mark code as a violation, it must have a direct correlation to the WCAG rule cited such that it is a clear violation of the criteria.

Key Review Criteria:

  1. Focus Exclusively on Accessibility:
  • Evaluate the component solely for accessibility.
  • Only consider compliance with the cited WCAG Success Criteria, ignoring violations that can be attributed to other criteria.
  • Avoid addressing general code style, patterns, or issues unrelated to accessibility.
  1. Ensure Minimum and Sufficient Accessibility:
  • Identify accessibility issues that prevent the component from meeting the minimum requirements outlined by WCAG.
  • Avoid suggesting enhancements that go beyond the scope of WCAG compliance unless strictly necessary.
  1. WAI-ARIA Usage:
  • Use WAI-ARIA attributes only when strictly required to achieve accessibility that cannot otherwise be addressed with semantic HTML.
  • Avoid unnecessary complexity or potential regressions caused by incorrect or overuse of ARIA attributes.
  1. Component Library Usage
  • Assume that well-known component libraries (e.g., Salesforce Lightning, Material UI, Chakra UI) are accessible out of the box when correctly implemented. Unless they are used specifically in conflict with WCAG, library-provided components can be ignored for this review, as they are implemented in an accessible way beneath the abstraction.

Focus: Provide actionable feedback to ensure the component meets the necessary WCAG accessibility requirements, avoiding extraneous feedback unrelated to the prompt's scope. Identify issues in code only if there is an immediate fix. You MUST conduct the review, and subsequently suggest the code fix that solves this issue.

Success Criteria Reviewers

Identify which Success Criteria apply to the code under review, then open the reference files relevant to that code. Each reference is a self-contained reviewer with analysis framework, examples, and remediation guidance.

Perceivable
Operable
Understandable
Robust
Vision-Assisted Review

When component screenshots or design mocks are available, augment the source-code review with these vision-level reviewers. Each reference covers image-based evaluation for the corresponding Success Criterion — contrast ratios, color dependence, resize/reflow behavior, and non-text content identification from pixels rather than from the DOM.

Review Output

For each Success Criterion you evaluated, report violations found. If no violations exist for a criterion, return an empty list for that criterion.

Comments

Markdown supported