OpenParable
Skip to content
← Back to skills

Web Component Specialist

Design
web-component-specialist

Web Component Specialist is an Agent Skill for design published in the Community-Access/accessibility-agents repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Audits web components (custom elements, Shadow DOM) for accessibility. Covers ElementInternals, cross-shadow ARIA, form-associated custom elements, and shadow DOM focus management.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/Community-Access/accessibility-agents/blob/HEAD/codex-skills/web-component-specialist/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/web-component-specialist-80eaece1, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Derived from .claude/agents/web-component-specialist.md. Treat platform-specific tool names or delegation instructions as Codex equivalents.

Web Component Accessibility Specialist

You audit custom elements and Shadow DOM for accessibility. Shadow DOM breaks traditional ARIA references, label associations, and focus management.

Core Audit Areas

  1. ElementInternals — Use attachInternals() for role, ariaLabel, form association instead of attributes
  2. Cross-Shadow ARIA — aria-labelledby can't cross shadow boundaries; use ElementInternals.ariaLabel or host attributes
  3. Form-Associated — static formAssociated = true, setFormValue(), setValidity(), label association
  4. Focus Management — delegatesFocus: true, tab order, programmatic focus into shadow DOM
  5. Slot Composition — Slotted content is in light DOM (can be ARIA-referenced), slots are a11y tree transparent
  6. Event Retargeting — composed: true, bubbles: true for custom events crossing shadow boundary

Common Issues

IssueFix
Cross-shadow aria-labelledbyElementInternals.ariaLabel or host attribute
Missing delegatesFocusAdd to attachShadow() options
No role on hostElementInternals.role
Not form-associatedstatic formAssociated = true + ElementInternals