Focus management is the discipline of keeping the browser's focused element visible and predictable for keyboard + screen-reader users. WCAG 2.4.7 (Focus Visible, Level AA) requires every interactive element to show a visible focus indicator. WCAG 2.4.3 (Focus Order) requires the order to be logical.
Key practices: don't remove the default :focus outline without replacing it with a visible alternative; when opening a modal, move focus into it and trap focus within until close; when closing a modal, restore focus to the trigger; never set tabindex greater than 0 (it forces a non-DOM tab order that screen readers + keyboard users find disorienting).
Test with keyboard only: Tab through every interactive element on a page and verify each has a visible focus ring + the order matches reading order.