Complex interactions require managing focus programmatically.
Modal dialogs:
Move focus into modal when opened
Trap focus inside modal (Tab cycles within)
Return focus to trigger when closed
Route changes: Move focus to main content or heading.
Dynamic content: After adding content, consider if focus should move.
Implementation:
modalRef.current.focus();
Interview tip: Discuss focus management for modals and multi-step flows.