Skip to main content

SmokeConfirm

Overview​

SmokeConfirm renders a named confirmation surface and reports cancel or confirm intent to its parent. Its native actions are safe inside a surrounding form.

Applies To​

  • Package: Mississippi.Refraction.Client
  • Namespace: Mississippi.Refraction.Client.Components.Organisms.Confirmations
  • Parent responsibility: visibility, response to callbacks, and any modal focus lifecycle

Parameters​

ParameterDefaultContract
TitlenullRequired nonblank text for the visible heading and dialog name.
CancelTextCancelRequired nonblank cancel action label.
ConfirmTextConfirmRequired nonblank confirm action label.
ConsequencenullOptional text beneath the title. Blank text is omitted.
OnCancelEmpty callbackParent callback for cancel intent. A missing delegate disables only Cancel.
OnConfirmEmpty callbackParent callback for confirm intent. A missing delegate disables only Confirm.
StateRefractionStates.LatentParent-owned visual state exposed as data-state; Latent hides the surface.
ClassnullAdditional wrapper classes.
AdditionalAttributesnullUnmatched attributes forwarded to the wrapper, subject to the owned attributes below.

Behavior​

The wrapper uses role="dialog" and points aria-labelledby to its visible title. Each instance keeps a stable, distinct title ID. A nonblank Consequence adds a stable description ID and an aria-describedby relationship. Caller aria-describedby tokens are retained without duplicates and combined with that description ID when the consequence is shown.

The wrapper retains its own class, role, data-state, aria-labelledby, and composed aria-describedby values. Caller classes are combined with the base class and Class parameter; unrelated attributes pass through.

Cancel and Confirm render as <button type="button">. Each enabled action invokes only its matching EventCallback, so neither action implicitly submits an enclosing form. A missing callback disables its action. Native buttons provide Enter and Space activation. The component does not change State or perform business work.

Action targets have a 44px minimum in each dimension. The component provides a visible keyboard focus outline, wrapping at narrow widths, and forced-colors styling. The parent remains responsible for showing or hiding the surface and for focus containment, Escape behavior, background inertness, and focus restoration if a modal interaction is required.

Failure Behavior​

A null, empty, or whitespace-only Title, CancelText, or ConfirmText throws ArgumentException during parameter application with the invalid parameter name in ParamName.

Compatibility​

The earlier prototype used Mississippi.Refraction.Client.Components.Organisms. Update the @using directive when adopting the confirmation-folder namespace above. This is a source-breaking namespace move.

The component is now sealed. Consumers that subclassed the prototype must migrate to composition: render a SmokeConfirm from a parent component and handle OnCancel and OnConfirm in that parent. The parent continues to own visibility and any modal focus lifecycle.

Summary​

SmokeConfirm is a parent-controlled confirmation surface with two independent, form-safe actions and a required accessible name.

Next Steps​