Provide a general summary of the feature here
DialogContainer accepts and forwards isDismissable and isKeyboardDismissDisabled to the Modal overlay it renders, but it does not destructure or forward disableFocusManagement. As a result, a consumer that needs to opt out of the modal's internal FocusScope has no supported way to do so through DialogContainer — the prop is silently dropped, the FocusScope activates, and it steals focus on open.
disableFocusManagement is already supported on Modal/the underlying overlay; the only missing link is DialogContainer not passing it through. It is also absent from the SpectrumDialogContainerProps type, so there's no type-safe way to pass it even if it were forwarded.
🤔 Expected Behavior?
DialogContainer forwards disableFocusManagement to its Modal, mirroring how it already forwards isDismissable and isKeyboardDismissDisabled, and the prop is declared as an optional boolean on SpectrumDialogContainerProps.
😯 Current Behavior
The prop is neither typed nor forwarded. Passing disableFocusManagement to DialogContainer is a no-op: the value never reaches Modal, the FocusScope always runs, and focus is moved into the dialog on mount regardless.
💁 Possible Solution
Two small changes (this is exactly what we currently apply as a patch-package patch):
In @react-spectrum/dialog DialogContainer, destructure and forward the prop:
let {
children,
type = 'modal',
onDismiss,
isDismissable,
isKeyboardDismissDisabled,
disableFocusManagement // add
} = props;
// ...
<Modal
state={state}
type={type}
isDismissable={isDismissable}
isKeyboardDismissDisabled={isKeyboardDismissDisabled}
disableFocusManagement={disableFocusManagement}> // add
In @react-types/dialog, add it to SpectrumDialogContainerProps:
export interface SpectrumDialogContainerProps {
// ...
isKeyboardDismissDisabled?: boolean,
/** Whether to disable focus management for the dialog (e.g. when an embedding host
manages focus itself). */
disableFocusManagement?: boolean
}
🔦 Context
We embed a host SDK that renders its own dialogs via DialogContainer and manages focus itself; it passes disableFocusManagement={true} so the dialog does not trap/steal focus on open. Because DialogContainer drops the prop, keyboard navigation (Tab / Enter / Space / Arrow keys) is broken for actions inside the dialog — a WCAG 2.1 AA keyboard-accessibility regression. We are working around it with a patch-package patch today and would like a native fix so we can remove the patch.
💻 Examples
Minimal repro:
<DialogContainer disableFocusManagement onDismiss={() => {}}>
<Dialog aria-label="Example">content</Dialog>
</DialogContainer>
// FocusScope still activates and moves focus into the dialog; disableFocusManagement is ignored.
🧢 Your Company/Team
Adobe/PandoraUI
🕷 Tracking Issue
No response
Provide a general summary of the feature here
DialogContaineraccepts and forwardsisDismissableandisKeyboardDismissDisabledto theModaloverlay it renders, but it does not destructure or forwarddisableFocusManagement. As a result, a consumer that needs to opt out of the modal's internalFocusScopehas no supported way to do so throughDialogContainer— the prop is silently dropped, theFocusScopeactivates, and it steals focus on open.disableFocusManagementis already supported onModal/the underlying overlay; the only missing link isDialogContainernot passing it through. It is also absent from theSpectrumDialogContainerPropstype, so there's no type-safe way to pass it even if it were forwarded.🤔 Expected Behavior?
DialogContainerforwardsdisableFocusManagementto itsModal, mirroring how it already forwardsisDismissableandisKeyboardDismissDisabled, and the prop is declared as an optionalbooleanonSpectrumDialogContainerProps.😯 Current Behavior
The prop is neither typed nor forwarded. Passing
disableFocusManagementtoDialogContaineris a no-op: the value never reachesModal, theFocusScopealways runs, and focus is moved into the dialog on mount regardless.💁 Possible Solution
Two small changes (this is exactly what we currently apply as a
patch-packagepatch):In
@react-spectrum/dialogDialogContainer, destructure and forward the prop:In
@react-types/dialog, add it toSpectrumDialogContainerProps:🔦 Context
We embed a host SDK that renders its own dialogs via
DialogContainerand manages focus itself; it passesdisableFocusManagement={true}so the dialog does not trap/steal focus on open. BecauseDialogContainerdrops the prop, keyboard navigation (Tab / Enter / Space / Arrow keys) is broken for actions inside the dialog — a WCAG 2.1 AA keyboard-accessibility regression. We are working around it with apatch-packagepatch today and would like a native fix so we can remove the patch.💻 Examples
Minimal repro:
🧢 Your Company/Team
Adobe/PandoraUI
🕷 Tracking Issue
No response