Modal Specialist logo

Modal Specialist

Organization
Community-Access
modal-specialist

Dialogs, drawers, popovers and overlays: focus trap, return and dismissal.

Overview

PublisherCommunity-Access
Repositoryaccessibility-agents
Skill namemodal-specialist
Stars
429
Forks
51
Bundled files
5
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Community-Access on GitHub. Read the source before you install it.

Installation

Install the Modal Specialist AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Community-Access/accessibility-agents/tree/main/skills/modal-specialist
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Community-Access/accessibility-agents.git /tmp/accessibility-agents
mkdir -p .claude/skills
cp -r /tmp/accessibility-agents/skills/modal-specialist .claude/skills/modal-specialist
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Modal Specialist in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Modal Specialist on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Modal Specialist is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

Your Scope

You own everything that overlays the page:

  • Modal dialogs
  • Alert dialogs / confirmation prompts
  • Drawers and sheets (side panels)
  • Popovers and disclosure panels
  • Filter modals
  • Settings panels
  • Any content that appears above the page and requires dismissal

Required Structure

Always use the native <dialog> element. Never build modals from <div> elements unless there is a documented technical constraint.

html
<button id="trigger" aria-haspopup="dialog">Open Settings</button>

<dialog id="settings-modal" role="dialog" aria-modal="true" aria-labelledby="modal-title">
  <button id="close-btn" aria-label="Close">
    <svg aria-hidden="true">...</svg>
    Close
  </button>
  
  <h2 id="modal-title">Settings</h2>
  
  <!-- Modal content -->
</dialog>

Alert Dialogs

For confirmations that require a decision:

html
<dialog role="alertdialog" aria-modal="true" 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>
  • Use role="alertdialog" instead of role="dialog"
  • Focus lands on the least destructive action (Cancel, not Delete)
  • aria-describedby links to the explanation text
  • Screen reader will announce both the title and description on open

Drawers and Sheets

Side panels follow the same rules as modals:

  • Use <dialog> with showModal()
  • Focus lands on Close button
  • Focus trapped inside
  • Escape closes
  • Focus returns to trigger

The only difference is visual positioning (CSS). The accessibility requirements are identical.

Non-Modal Dialogs

Non-modal dialogs allow interaction with content behind them. They close when the user clicks outside or presses Escape.

html
<dialog id="tooltip-dialog" role="dialog" aria-labelledby="tooltip-title">
  <h3 id="tooltip-title">Field Help</h3>
  <p>Enter your company registration number.</p>
</dialog>

Requirements:

  • Do NOT use aria-modal="true" -- content behind must remain accessible
  • Open with dialog.show() (not showModal())
  • Close when the dialog loses focus (click outside or Tab away)
  • Escape closes the dialog
  • No focus trapping -- Tab can move out of the dialog
  • Focus returns to trigger on close

Popover API

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.

html
<button popovertarget="help-popover">Help</button>
<div id="help-popover" popover>
  <p>This field accepts your company registration number.</p>
</div>
  • Popovers are non-modal by default -- no focus trapping
  • Browser handles Escape to dismiss and light-dismiss (click outside)
  • Use popover="manual" to disable light-dismiss when needed
  • Popovers are promoted to the top layer, avoiding z-index issues
  • Prefer popover for simple overlays; prefer <dialog> with showModal() for true modal dialogs

Validation Checklist

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. Does the trigger have aria-haspopup="dialog"?
  9. Is aria-modal="true" present on modal dialogs?
  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?

Common Mistakes You Must Catch

  • Modal built from <div> with role="dialog" but no focus trapping
  • Focus landing on the heading instead of Close button
  • Missing focus return on close (focus drops to top of page)
  • Nested modals (modal opens another modal) without proper focus stack
  • Backdrop click closes modal but does not return focus
  • aria-hidden="true" left on the modal container after opening
  • Scrollable modal content not reachable by keyboard

Reference files

Read one only when the task reaches it. Do not read them all up front.

  • references/non-negotiable-rules.md - Non-Negotiable Rules
  • references/filter-modal-pattern.md - Filter Modal Pattern
  • references/structured-output-for-sub-agent-use.md - Structured Output for Sub-Agent Use

Output contract

Return only JSON matching skills/a11y-core/schemas/findings.schema.json. No prose, no summary, no restated instructions. One object, one array of findings.

Shared rules, dispatch contract and schemas: skills/a11y-core/SKILL.md. Authoritative specifications for this skill: skills/a11y-core/references/sources.md.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Modal Specialist AI skill do?

Dialogs, drawers, popovers and overlays: focus trap, return and dismissal.

Why use Modal Specialist on TypingMind?

Because you install it once and use it with any model. Modal Specialist is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Modal Specialist in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Community-Access/accessibility-agents/tree/main/skills/modal-specialist. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Modal Specialist?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Modal Specialist?

As many as you like. As long as a model supports skills, you can use Modal Specialist with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Modal Specialist AI skill free?

Yes. It is published on GitHub by Community-Access under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇