window-alert-confirm

Guides usage of window.alert() and window.confirm() in web applications with accessibility and cross-browser considerations.

3|1|Updated Mar 29, 2026
One-click install
npx skills add https://github.com/ncaq/konoka --skill window-alert-confirm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: window-alert-confirm
Source: https://github.com/ncaq/konoka/tree/main/plugins/web-tasuke/skills/window-alert-confirm
Command: npx skills add https://github.com/ncaq/konoka --skill window-alert-confirm

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guides developers on appropriate usage of window.alert() and window.confirm() to avoid UX and accessibility pitfalls.

Core Features & Use Cases

  • Provides guidance on when to use alert vs confirm, and when to opt for custom modal dialogs.
  • Covers accessibility considerations (focus management, screen reader compatibility, keyboard navigation) and cross-browser caveats.
  • Includes practical examples and real-world scenarios for error notifications and destructive action confirmations.

Quick Start

Explain best practices for using window.alert() and window.confirm() in web applications, including accessibility considerations and common pitfalls.

Frequently Asked Questions about window-alert-confirm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
When should I use window.alert versus window.confirm for web application notifications?

Use window.alert for simple error notifications and window.confirm to verify destructive actions. For complex UX flows, choose custom modal dialogs to ensure better accessibility and cross-browser behavior.

How do I make browser dialogs accessible for screen reader and keyboard navigation?

To make browser dialogs accessible, ensure proper focus management and screen reader compatibility. Native alert and confirm dialogs handle focus automatically, but custom implementations require manual keyboard navigation and focus management.

What are the cross-browser behavior caveats when using JavaScript alert and confirm?

Cross-browser behavior caveats for JavaScript alert and confirm include differences in dialog styling, focus trapping, and blocking behavior. Test across browsers to ensure consistent UX for error notifications and destructive action confirmations.

Are native browser dialogs or custom modal dialogs better for UX?

Native browser dialogs are better for simple UX scenarios like basic error notifications. Custom modal dialogs are preferable for complex UX needs, offering controlled styling and consistent accessibility across browsers.

Why does window.confirm block browser execution and when should I avoid it?

window.confirm blocks browser execution because it operates synchronously. Avoid using window.confirm when you need non-blocking UX or when implementing custom modal dialogs for complex destructive action confirmations.