The dialog's panel. It needs tabIndex={-1} so it can hold the
focus itself.
Whether the dialog is shown (and its panel is on the page).
Where the focus goes first; see ModalFocusOptions.
While open: the panel takes the focus (or its first field, when asked to),
Tab and Shift+Tab stay among the panel's controls, and when the dialog
closes the focus returns to the control that opened it — the one that had
the focus, or, where that is gone or the browser gave none (Safari, a menu's
item), the control pressed just before. Of several open modals only the one
opened last answers Tab. When the control that holds the focus leaves the
page while the modal stays (a sheet's next step), the panel takes the focus.
A focus that has moved out of the panel on purpose
(into a menu over it) is not pulled back, and with keepTyping a text field
elsewhere that somebody is typing in keeps the focus when the modal opens.
Keeps the keyboard inside an open modal dialog and puts it back afterwards.