Skip to content

Dialog: no DialogDescription — stacked title + description requires a hand-rolled wrapper #219

Description

@krnvch

Summary

DialogHeader is DrawerHeader re-exported and lays its children out in a row (title + close ✕). There is no DialogDescription component, so a dialog with a description under the title (a common Figma pattern, e.g. the delete-account confirm in Platform Auth 553:1556) forces every consumer to hand-roll the stacking:

<DialogHeader>
  {/* DialogHeader lays children out in a row; stack title + description
      in a column so they sit tight instead of the description landing
      in the header row. */}
  <div className="flex flex-col gap-4">
    <DialogTitle>Delete account?</DialogTitle>
    <Text size="sm" color="secondary">You will lose access…</Text>
  </div>
</DialogHeader>

Live occurrence: core-frontend DeleteAccountDialog (flagged in core-frontend MR !156 review as tricky consumer-side code that belongs in the DS).

Proposal

  • Add DialogDescription (secondary sm text; ideally wired through Ark UI's Dialog.Description so aria-describedby on the dialog comes for free).
  • Let DialogHeader support the stacked title + description layout without a consumer wrapper (e.g. title row keeps the close button, description renders full-width below).

Acceptance

  • <DialogHeader><DialogTitle>…</DialogTitle><DialogDescription>…</DialogDescription></DialogHeader> renders title with close button on the row and description stacked under it, no consumer flex wrapper.
  • Dialog root gets aria-describedby pointing at the description.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions