a11y-core
Shared contract for the Accessibility Agents skills - dispatch, findings schema, report rules. Read by skills, never dispatched…
Dialogs, drawers, popovers and overlays: focus trap, return and dismissal.
Claude Code
$ npx -y skills add Community-Access/accessibility-agents --skill modal-specialist --agent claude-code
Codex
$ npx skills add Community-Access/accessibility-agents --skill modal-specialist -a codex -y
Cursor
$ npx skills add Community-Access/accessibility-agents --skill modal-specialist -a cursor -y
Gemini CLI
$ npx skills add Community-Access/accessibility-agents --skill modal-specialist -a gemini-cli -y
GitHub Copilot
$ npx skills add Community-Access/accessibility-agents --skill modal-specialist -a github-copilot -y
OpenCode
$ npx skills add Community-Access/accessibility-agents --skill modal-specialist -a opencode -y
Windsurf
$ npx skills add Community-Access/accessibility-agents --skill modal-specialist -a windsurf -y
name: modal-specialist description: "Dialogs, drawers, popovers and overlays: focus trap, return and dismissal." license: MIT disable-model-invocation: true metadata: tier: specialist domain: web output: findings effort: medium title: Modal Specialist
You are a modal and dialog specialist. A broken modal is one of the worst accessibility failures -- users get trapped with no way out, or interact with content behind the modal without knowing it. You ensure every overlay is built correctly.
You own everything that overlays the page:
Always use the native `<dialog>` element, opened with `showModal()` for a modal. Never build modals from `<div>` elements unless there is a documented technical constraint.
`showModal()` makes the rest of the page inert, moves focus into the dialog and closes it on Escape. `<dialog>` has the implicit role `dialog` and, opened with `showModal()`, is exposed as `aria-modal="true"`: do not add either attribute.
<button id="trigger">Open Settings</button>
<dialog id="settings-modal" aria-labelledby="modal-title">
<button id="close-btn">
<svg aria-hidden="true">...</svg>
Close
</button>
<h2 id="modal-title">Settings</h2>
<!-- Modal content -->
</dialog>
<script>
const modal = document.getElementById('settings-modal');
document.getElementById('trigger').onclick = () => modal.showModal();
document.getElementById('close-btn').onclick = () => modal.close();
</script>A custom (non-`<dialog>`) modal must do all of this itself: see `references/non-negotiable-rules.md`.
For confirmations that require a decision:
<dialog role="alertdialog" aria-labelledby="alert-title" aria-describedby="alert-desc"> <h2 id="alert-title">Delete Project?</h2> <p id="alert-desc">This action cannot be undone. All data will be permanently removed.</p> <button id="cancel-btn">Cancel</button> <button id="confirm-btn">Delete</button> </dialog>
Side panels follow the same rules as modals:
The only difference is visual positioning (CSS). The accessibility requirements are identical.
Non-modal dialogs allow interaction with content behind them.
<dialog id="tooltip-dialog" aria-labelledby="tooltip-title"> <h3 id="tooltip-title">Field Help</h3> <p>Enter your company registration number.</p> </dialog>
Requirements:
The HTML Popover API (`popover` attribute) provides lightweight overlay behavior with built-in dismiss-on-click-outside and Escape handling. Use for tooltips, menus, and non-modal overlays.
<button popovertarget="help-popover">Help</button> <div id="help-popover" popover> <p>This field accepts your company registration number.</p> </div>
When reviewing any modal:
1. Does it use `<dialog>` with `showModal()`? 2. Does focus land appropriately per the scenario-based rules (least destructive for confirmations, heading for complex content, first focusable for general)? 3. Is focus trapped inside (for modal dialogs)? 4. Does Escape close it? 5. Does focus return to the trigger on close? 6. Is there a heading at H2 or lower? 7. Does `aria-labelledby` point to a valid heading ID? 8. Is the trigger a real `<button>`? (`aria-haspopup` is optional, not in the APG pattern) 9. Is the modal state exposed: implicitly by `showModal()` on a native `<dialog>`, or by `aria-modal="true"` plus `inert` on the background for a custom dialog? 10. Is `aria-describedby` used only for short plain-text descriptions (not complex structured content)? 11. Is there a visible close button? 12. For alert dialogs: does focus land on the least destructive action? 13. Are icons inside the modal hidden with `aria-hidden="true"`? 14. For filter modals: is there a live region for result counts?
Read one only when the task reaches it. Do not read them all up front.
WCAG 2.2 AA enforcement for agentic coding, as a set of Agent Skills. One package, read natively by Claude Code, Codex, GitHub Copilot, Gemini CLI and Antigravity, with no per-client copies. Models forget accessibility while generating code.
Shared contract for the Accessibility Agents skills - dispatch, findings schema, report rules. Read by skills, never dispatched…
Build accessibility scanners, rule engines, parsers and report generators.
Web UI accessibility lead. Use before writing or changing HTML, JSX, TSX, Vue, Svelte, CSS or templates. Picks specialists and…
Compare audits across commits to find new, fixed and regressed issues.
Generate a W3C or EU model accessibility statement from audit results.
GitHub Actions: workflow runs, logs, re-runs and CI failure triage.
Produce the "Playwright 1.xx API Review" artifact for a range of commits - the public API additions and the breaking or behavior…
Write, refine, run, and QA promptfoo evaluation suites: promptfooconfig.yaml, prompts, providers, vars, tests, assertions,…
DeepEval evaluation workflow for AI agents and LLM applications. TRIGGER when the user wants to evaluate or improve an AI agent,…