Skip to content

Commit 9fb0ff7

Browse files
authored
Updating dialog best practices to include nested dialog example (#6679)
1 parent 849b02e commit 9fb0ff7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

components/dialog/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ The `d2l-dialog` element is a generic dialog that provides a slot for arbitrary
3232
* Label primary actions with clear and predictable language. Use verbs like, “Add” or “Save” that indicate the outcome of a dialog rather than, “OK” or “Close”
3333
* Keep dialog titles concise
3434
* Maintain a language relationship between the action that triggered the dialog, dialog title, and dialog primary button.
35-
* When it is necessary to stack multiple dialogs, ensure the stacked dialog is nested within the DOM of the dialog containing the opener
35+
* When it is necessary to nest multiple dialogs, ensure the nested dialog is within the DOM of the dialog containing the opener
3636
<!-- docs: end dos -->
3737

3838
<!-- docs: start donts -->
3939
* Don’t use a dialog when you could reasonably use an alternative that preserves user context, like expanding options inline
4040
* Don’t use a dialog to show error, success, or warning messages. Use an inline or toast alert instead.
41-
* Avoid creating large, complex dialogs
42-
* Avoid opening a dialog from within other dialogs (stacking dialogs)
43-
* Avoid a title length that could easily wrap to two lines
41+
* Avoid opening a dialog from another dialog (nesting) since this can increase cognitive load and disorient users
42+
* Exception: confirmation dialogs that protect users from losing unsaved work
43+
* Avoid titles that are long enough to wrap onto multiple lines
4444
<!-- docs: end donts -->
4545
<!-- docs: end best practices -->
4646

0 commit comments

Comments
 (0)