-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dialog] add options to allow adjustments to focus-trap behavior #11345
Comments
Components to consider as part of the focus trap behavior tweaks:
|
…cus-trap (#11453) **Related Issue:** #11345 ## Summary Adds `focusTrapOptions` option to allow additional customization of focus-trapping components. It supports the following options from https://github.com/focus-trap/focus-trap#createoptions: * `initialFocus` – would replace popover's internal initialFocusTrapFocus prop * `allowOutsideClick` – supports #10682 * `returnFocusOnDeactivate` – supports #10682 And the following custom prop: * `extraContainers` – allows specifying extra elements (nodes or selectors) to focus trap (e.g., anything appending to the body, etc) when creating/activating the trap. **Note**: if specified, elements must exist when the focus trap is activated, if extra containers are created afterwards, users can use `updateFocusTrapElements(extraContainers)` This also enhances `updatesFocusTrapElements()` to accept extra containers to allow in the focus trap if these are created after the trap is activated. ### Notes * A subset of https://github.com/focus-trap/focus-trap#createoptions options are exposed as certain configurations might break component functionality. * `extraContainers` gets used both when creating and updating the focus trap target containers * Tidies up types
Installed and assigned for verification. |
Allowing focus within containers external to the focus trap (e.g.,
Allowing clicks on non-focusable elements external to the focus trap (e.g., Use |
) **Related Issue:** #11345 ## Summary Adds missing type to newly added `focusTrapOptions` props.
Verified with @rpanichakit9541 via an internal issue with |
…cus-trap (#11453) **Related Issue:** #11345 ## Summary Adds `focusTrapOptions` option to allow additional customization of focus-trapping components. It supports the following options from https://github.com/focus-trap/focus-trap#createoptions: * `initialFocus` – would replace popover's internal initialFocusTrapFocus prop * `allowOutsideClick` – supports #10682 * `returnFocusOnDeactivate` – supports #10682 And the following custom prop: * `extraContainers` – allows specifying extra elements (nodes or selectors) to focus trap (e.g., anything appending to the body, etc) when creating/activating the trap. **Note**: if specified, elements must exist when the focus trap is activated, if extra containers are created afterwards, users can use `updateFocusTrapElements(extraContainers)` This also enhances `updatesFocusTrapElements()` to accept extra containers to allow in the focus trap if these are created after the trap is activated. ### Notes * A subset of https://github.com/focus-trap/focus-trap#createoptions options are exposed as certain configurations might break component functionality. * `extraContainers` gets used both when creating and updating the focus trap target containers * Tidies up types
) **Related Issue:** #11345 ## Summary Adds missing type to newly added `focusTrapOptions` props.
Check existing issues
Description
When using
calcite-dialgo
withmodal
prop, it currently prevents the user from clicking on anything that's not contained within the dialog. In the current case we're running into an issue with this is we're using CKEditor inside the calcite-dialog which has certain options that render its own version of a pop over to allow adding link URL. Because this input is being rendered directly on the document body instead of inside the DOM within the dialog content, the user is not able to click to input the URL text or click the cancel or save button within this 3rd party pop over. (Screenshot below)Blocked issues: #11416, #11420
Acceptance Criteria
I would like to see if there's a prop that can be exposed to allow customizing the calcite-dialog to still maintain focus trap while the user uses keyboard navigation, but allow the user to use the mouse to click on UI elements like this 3rd party pop over even though the DOM elements are not rendered within the calcite-dialog.
Relevant Info
No response
Which Component
calcite-dialog with
modal
propExample Use Case
https://devtopia.esri.com/WebGIS/arcgis-metadata-editor/issues/1537
Priority impact
impact - p3 - not time sensitive
Calcite package
Esri team
ArcGIS Online
The text was updated successfully, but these errors were encountered: