forcedotcom/sf-skills / skills/experience-accessibility-validate
experience-accessibility-validate
VerifiedUse this skill to determine whether a Lightning Web Component (LWC) is accessible and meets WCAG accessibility guidelines. TRIGGER when the user asks "is my component accessible?", "does my LWC meet accessibility guidelines?", "is this component WCAG compliant?", "find accessibility problems in this LWC", "is this LWC keyboard accessible?", "does this component work with a screen reader?", "does this component have sufficient color contrast?", "check ARIA usage in this LWC", or "WCAG 2.2 accessibility check". Also TRIGGER when the user wants to fix or improve accessibility (a11y, WCAG, ARIA) in an LWC's HTML, JS, or CSS — semantic markup, focus, keyboard nav, contrast, screen-reader labels, WCAG 2.2 SC. Produces `a11y-review.md` with WCAG-cited findings. DO NOT TRIGGER for general LWC generation (use `experience-lwc-generate`) or SLDS visual/design review not focused on accessibility (use `design-systems-slds-validate`).
references/reviewers/sc-3-3-2-labels-instructions.md
View on GitHub## SC 3.3.2 - Labels or Instructions (Level A)
Labels or instructions are provided when content requires user input.
## SC: 3.3.2 - Labels or Instructions
Analyze the given files using the following framework:
Review the provided HTML and JS files for accessibility violations per WCAG 2.2 SC 3.3.2, 'Labels or Instructions'. For all form fields and controls that require user input, ensure that a clear, descriptive label or instruction is provided.
You should analyze all elements in the HTML and identify any controls that require user input, such as inputs, selects, checkboxes, comboboxes, and so on. For each of these controls identified, ensure that a clear and sufficiently contextual label or instruction is provided. These must provide the user with enough information to understand how to successfully input data into the field.
Issues to look for on the page that might signal that labels or instructions are not sufficient, and thus a violation of SC 3.3.2:
- Lack of visible labels on controls
- Missing instructions regarding the expected format for inputs with very specific requirements
- Missing guidance about about allowed characters or constraints for fields with strict requirements
- Labels or instructions conveyed only via placeholder text, which is not visible during input
- Missing required field indicators
- Related field groups lacking proper group labels or individual field identification
The best practice to solve a violation is to **provide descriptive labels/instructions** and do one of the following\*\*:
- Use `aria-describedby` to provide a descriptive label
- Use `aria-labelledby` to concatenate a label from several text nodes
- Use grouping roles to identify related form controls
- Provide expected data format and example
- Providing text instructions at the beginning of a form or set of fields that describes the necessary input
Some common implementations of the aforementioned patterns are:
- Visible text labels using `<label>` with proper `for`/`id` relationships
- Specific text instructions for controls with specific requirements/constraints
- Mark required fields clearly with visual indicators (\*, Required) in the label or instructions
- Group related fields using `fieldset`/`legend` or appropriate ARIA grouping roles
- For design-constrained situations, use appropriate combinations of `title`, `aria-label`, or `aria-labelledby`
- These could be situations where a visible label can not be specifically assigned to each control in a grouped interface
Rules to follow:
- Find all violations of SC 3.3.2 'Labels or Instructions' in the provided HTML and JS files.
- If no changes are needed, then produce an empty list.
- For each issue found, provide a separate, detailed report.
- Keep issues concise, avoid duplicated issues or unnecessary or non-applicable problems.
- Assume that any imported functionality works as expected and was already analyzed.
- Components do not supplement or provide global functionalities.
- Attach instructions to the actual focusable control. An `aria-describedby` on a disabled control cannot expose the instructions on focus, and an association on a non-focusable wrapper does not reach a composite editor's internal control unless the wrapper forwards it. Use adjacent visible instructions or the control's supported association API instead.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| brainstormingobra/superpowersYou MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation). | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| brand-guidelinesanthropics/skillsApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| frontend-designanthropics/skillsGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| mcp-builderanthropics/skillsGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK). | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |