When a modal is open, pressing the Tab key should cycle focus only inside the modal, not escape to the background page. Without trapping, keyboard users can navigate to hidden interactive elements.
Listens for Tab and Shift+Tab keys, finds the first and last focusable elements inside the container, and wraps focus accordingly. Prevents focus from leaving the modal.
Dialog, Modal, Drawer, Popover, Sheet, AlertDialog