a11y-review
Review custom element HTML for accessibility issues. Use when the user asks to "review accessibility", "check a11y", "audit accessibility", "find accessibility issues", or mentions "WCAG", "screen reader", "keyboard navigation", or "ARIA" in the context of custom elements.
What this skill does
# Accessibility Review
Review HTML that uses custom elements for accessibility compliance, guided by manifest-documented accessibility patterns.
## Workflow
### Phase 1: Gather Context
1. Read the accessibility resource for the project's manifest-documented a11y patterns:
```text
cem://accessibility
```
2. Identify the target HTML to review. Either:
- The user provides an HTML snippet directly
- The user points to a file — read it with the Read tool
- Search for HTML files with custom elements using Glob/Grep
3. For each custom element found in the HTML, read its element resource:
```text
cem://element/{tagName}
```
And its slot guidelines:
```text
cem://element/{tagName}/slots
```
Pay special attention to the element's description and to its slot descriptions - Does the element have an implicit role? Do slots require a specific role to be slotted into them?
### Phase 2: Validate with MCP Tool
Call `validate_html` with the target HTML to get manifest-compliance results. This catches:
- Unknown attributes and typos
- Invalid enum values
- Slot content guideline violations
- Attribute conflicts (e.g. `disabled` + `interactive`)
### Phase 3: Manifest-Driven Accessibility Analysis
Cross-reference the HTML against manifest data. Check for:
#### Slot Content Accessibility
- Read each slot's description carefully for content requirements ("must contain", "must not contain", "expects", "requires")
- Check if slot descriptions specify a required role (e.g. "expects an element with role `listitem`")
- Do slotted elements preserve heading hierarchy?
- Are interactive elements placed in slots that expect them?
- Is text content provided for slots that need accessible labels?
#### Attribute Accessibility
- Are ARIA-related attributes used correctly per the manifest?
- Are required attributes present (especially those with accessibility implications)?
- Do boolean attributes like `disabled` have matching ARIA state considerations?
#### Element Composition
- Are elements nested in ways that maintain accessibility?
- Are label/description associations correct?
- Are focusable elements reachable and in logical tab order?
#### Content Patterns
- Do elements that act as landmarks have appropriate labels?
- Are images/icons inside custom elements accompanied by text alternatives?
- Are live regions used appropriately?
#### Element Roles
- Check the element's description for implicit role information (e.g. "acts as a button", "has role `navigation`", "implicit role `listbox`")
- If the element description states an implicit role, do not recommend adding an explicit `role` attribute
Do not issue a recommendation to add an explicit role on an element which already has an implicit role.
Do not recommend to use `aria-label` or other aria attributes on elements which provide custom attributes which handle the same things; i.e. check element's attributes for descriptions like "The `accessible-label` attribute sets the screen reader's content for this element" or "The `audible-content` attribute sets the element's name for assistive technology", etc.
### Phase 4: Report
Output a structured report:
```markdown
## Accessibility Review
### Summary
- Elements reviewed: X
- Issues found: X (Y critical, Z warnings)
- Manifest patterns applied: X
### Critical Issues
[Issues that will cause accessibility failures]
### Warnings
[Issues that may cause problems for some users]
### Manifest Compliance
[How well the HTML follows element authors' documented accessibility patterns]
### Recommendations
[Specific fixes with corrected HTML examples]
```
## Important Principles
- **Trust element authors**: When the manifest documents accessibility behavior, follow it rather than adding generic ARIA advice
- **Don't add undocumented ARIA**: Custom elements often manage ARIA internally — adding external ARIA can conflict
- **Check descriptions**: Accessibility requirements are often embedded in element and attribute descriptions in the manifest
- **Be specific**: Reference the actual manifest data in your findings, not generic a11y rules
- **Show fixes**: Always provide corrected HTML alongside each issue
Related in Web Dev
generating-lwc-components
IncludedLightning Web Components with PICKLES methodology and 165-point scoring. Use this skill when the user creates or edits LWC components, builds wire service patterns, or writes Jest tests for LWC. TRIGGER when: user creates/edits LWC components, touches lwc/**/*.js, .html, .css, .js-meta.xml files, or asks about wire service, SLDS, or Jest LWC tests. DO NOT TRIGGER when: Apex classes (use generating-apex), Aura components, or Visualforce.
tanstack-query
IncludedManage server state in React with TanStack Query v5. Set up queries with useQuery, mutations with useMutation, configure QueryClient caching strategies, implement optimistic updates, and handle infinite scroll with useInfiniteQuery. Use when: setting up data fetching in React projects, migrating from v4 to v5, or fixing object syntax required errors, query callbacks removed issues, cacheTime renamed to gcTime, isPending vs isLoading confusion, keepPreviousData removed problems.
document-processor-api
IncludedProcess documents with Nutrient DWS. Use when the user wants to generate PDFs from HTML or URLs, convert Office/images/PDFs, assemble or split packets, OCR scans, extract text/tables/key-value pairs, redact PII, watermark, sign, fill forms, optimize PDFs, or produce compliance outputs like PDF/A or PDF/UA. Triggers include convert to PDF, merge these PDFs, OCR this scan, extract tables, redact PII, sign this PDF, make this PDF/A, or linearize for web delivery.
nutrient-document-processing
IncludedProcess documents with Nutrient DWS. Use when the user wants to generate PDFs from HTML or URLs, convert Office/images/PDFs, assemble or split packets, OCR scans, extract text/tables/key-value pairs, redact PII, watermark, sign, fill forms, optimize PDFs, or produce compliance outputs like PDF/A or PDF/UA. Triggers include convert to PDF, merge these PDFs, OCR this scan, extract tables, redact PII, sign this PDF, make this PDF/A, or linearize for web delivery.
tanstack-query
IncludedManage server state in React with TanStack Query v5. Covers useMutationState, simplified optimistic updates, throwOnError, network mode (offline/PWA), and infiniteQueryOptions. Use when setting up data fetching, fixing v4→v5 migration errors (object syntax, gcTime, isPending, keepPreviousData), or debugging SSR/hydration issues with streaming server components.
accelint-nextjs-best-practices
IncludedNext.js performance optimization and best practices. Use when writing Next.js code (App Router or Pages Router); implementing Server Components, Server Actions, or API routes; optimizing RSC serialization, data fetching, or server-side rendering; reviewing Next.js code for performance issues; fixing authentication in Server Actions; or implementing Suspense boundaries, parallel data fetching, or request deduplication.