DialogContentText — spec¶
Synthesized from MUI
DialogContentText. The descriptive paragraph insideDialogContent. Provides the accessible description for the dialog viaaria-describedbyassociation.
When to use¶
- Inside every Dialog whose body has explanatory text.
- Pair with
aria-describedbyon the parent Dialog.
API¶
<Dialog aria-labelledby="t" aria-describedby="d">
<DialogTitle id="t">정말 삭제할까요?</DialogTitle>
<DialogContent>
<DialogContentText id="d">
이 작업은 되돌릴 수 없어요.
</DialogContentText>
</DialogContent>
<DialogActions>...</DialogActions>
</Dialog>
| Prop | Type | Default | Description |
|---|---|---|---|
id |
string |
— | Required for aria-describedby association on parent Dialog |
children |
ReactNode |
— | Description text |
Extends Typography — all typography props work.
Tokens consumed¶
--font-size-body
--color-fg-muted /* slightly less prominent than primary content */
--line-height-body
Accessibility¶
- Without matching
aria-describedbyon the parent Dialog, the description is just visual — screen readers won't connect it. - For dialogs with multiple paragraphs, only one needs the
id(the most informative). Or wrap multiple paragraphs in a<div id="d">and putidon that.
Edge cases¶
- Long description — wraps. For multi-paragraph, use multiple
<Typography>children with one outer container holding theid. - Markdown links inside — inline links work; ensure they're keyboard-accessible (focus moves to them inside the trapped dialog).
- Korean honorific — match the title's register. Confirmation: 합쇼체 ("되돌릴 수 없습니다"). Friendly: 해요체 ("되돌릴 수 없어요").
Code example¶
<DialogContent>
<DialogContentText id="leave-desc">
저장하지 않은 변경사항이 있어요.{' '}
<Link href="/help/auto-save" target="_blank" onClick={(e) => e.stopPropagation()}>
자동 저장이 켜져 있나요?
</Link>
</DialogContentText>
</DialogContent>
Don't¶
- Don't omit
id— defeatsaria-describedby. - Don't use as a generic paragraph — for non-described body text, use
<Typography>.
References¶
- MUI:
DialogContentText