-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
AccessibilityThis issue is related to accessibility (a11y)This issue is related to accessibility (a11y)P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentfeatureThis issue represents a new feature or feature request rather than a bug or bug fixThis issue represents a new feature or feature request rather than a bug or bug fix
Description
Currently, the autoFocus
option of MatDialogConfig
is a boolean, with the values meaning:
false
- default value, focused therole="dialog
" elementtrue
- focuses the first tabbable element inside the dialog
This API is kind of confusing, since the dialog automatically focuses something regardless of what you do, so autoFocus: false
doesn't really make sense.
Instead, we should change autoFocus
to accept these values:
dialog
- focus therole="dialog"
elementfirst-tabbable
- focus the first tabbable elementfirst-header
- focus the first header (h1 - h6) element in the dialog. It's still an open question whether this should forcetabIndex = -1
.- A CSS selector- arbitrary CSS selector, the dialog would focus the first matching element (vis
querySelector
). Again an open question if this should forcetabIndex = -1
.
zelliott
Metadata
Metadata
Assignees
Labels
AccessibilityThis issue is related to accessibility (a11y)This issue is related to accessibility (a11y)P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentfeatureThis issue represents a new feature or feature request rather than a bug or bug fixThis issue represents a new feature or feature request rather than a bug or bug fix