Skip to content
BigBang

Popular

    ↑↓Navigate↵OpenEscClose
    TR

    Components

    Popconfirm

    A small confirmation panel next to a button that asks yes or no before a light action.

    Storybook
    Storybook
    Source
    Source

    The panel has the alertdialog role; the title names it and the description describes it. The trigger carries aria-expanded.

    Key Behaviour
    Enter, Space Open the panel from the trigger; press a button.
    Tab, Shift + Tab Move between the cancel and confirm buttons.
    Escape Cancel and close; focus returns to the trigger.

    When the panel opens, focus moves to cancel, the safe choice; on close it returns to the trigger.

    Example Output
    Panel “Delete this card?, alert dialog, This cannot be undone.”
    Focus “Cancel, button”

    Text has 4.5:1 on the raised surface; the buttons carry the Button contrast.

    Criterion How Popconfirm meets it What the product team does
    3.3.4 Error prevention It asks before the action. Use AlertDialog for heavy actions.
    2.4.3 Focus order Focus moves to cancel and back on close. -
    4.1.2 Name, role, value alertdialog, named by the title. Write the title as a question.