Skip to content

Commit e4c8056

Browse files
authored
docs: Update Alert Dialog docs to describe the default autofocus behavior (#1735)
1 parent 82dbbd8 commit e4c8056

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/content/components/alert-dialog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ Disabling focus trap may reduce accessibility. Use with caution.
212212

213213
### Open Focus
214214

215-
By default, when a dialog is opened, focus will be set to the `AlertDialog.Cancel` button if it exists, or the first focusable element within the `AlertDialog.Content`. This ensures that users navigating my keyboard end up somewhere within the Dialog that they can interact with.
215+
By default, when a dialog is opened, focus will be set to the `AlertDialog.Content`. This is needed to allow screen readers to properly read the content. Focusing the `AlertDialog.Content` also ensures that people navigating with their keyboard end up somewhere within the Dialog that they can interact with.
216216

217217
You can override this behavior using the `onOpenAutoFocus` prop on the `AlertDialog.Content` component. It's _highly_ recommended that you use this prop to focus _something_ within the Dialog.
218218

0 commit comments

Comments
 (0)