Skip to main content

design-a-modal-dialog

Decide whether a modal fits and design its accessible interaction. Use when a focused decision or short task may interrupt the current page and needs safe focus, dismissal, and recovery behavior.

Source facts

Repository
protosphinx/sphinxstack
Last source activity
July 29, 2026 at 13:55
Detected SKILL.md language
English
Stars
3
Forks
0

Install options

The review-first prompt is selected by default. You can switch to a direct command or download a local copy.

Review the source files

Read SKILL.md and any companion files shown by SkillsMP before deciding whether to install.

File Explorer
2 files

Showing SKILL.md

SKILL.md
Source instructions · Read-only preview
name
design-a-modal-dialog
category
design
description
Decide whether a modal fits and design its accessible interaction. Use when a focused decision or short task may interrupt the current page and needs safe focus, dismissal, and recovery behavior.
# design-a-modal-dialog ## Procedure 1. Confirm the task truly requires blocking background interaction; prefer inline or separate-page flows otherwise. 2. Define trigger, purpose, title, content, actions, default focus, and destructive consequences. 3. Keep the task short and preserve context or input on cancel. 4. Mark dialog semantics and accessible name correctly. 5. Move focus inside on open, contain keyboard focus, and return it logically on close. 6. Support Escape and a visible close action unless safety requires an explicit decision. 7. Prevent background interaction and make it inert without hiding the dialog. 8. Handle small screens, zoom, long content, nested errors, loading, and asynchronous completion. 9. Test keyboard, screen reader, touch, cancel, repeated open, and focus-origin deletion. ## Guardrails - Do not nest modal dialogs without a compelling tested requirement. - Never make outside-click the only dismissal method. - Avoid using a modal for information that should remain referenceable. ## Done - A dialog specification records rationale, semantics, focus, actions, dismissal, and states - Keyboard, screen-reader, zoom, mobile, and recovery tests pass - Destructive and failure behavior is verified
View on GitHub