Focus management
Moving keyboard focus on purpose when something on the page changes, so people using a keyboard or screen reader end up in the right place.
Example
A made-up shop opens a 'Remove this item?' dialog and focus jumps into it. If you press Cancel, focus goes back to the Remove button; if you confirm, that button is gone, so focus moves to the next item in the basket.
When to use it
Whenever something opens, closes or appears, decide where focus should go next. W3C's pattern for dialogs: move focus into the dialog when it opens, and back to the button that opened it when it closes. If that button no longer exists, move focus to the next logical place.
Watch out
In W3C's design guide, 'managing focus' has a narrower meaning: moving focus between the parts of one widget, such as the items in a menu.
The evidence 4 sourced claims
Every sentence on this card traces back to one of these claims, each linked to its source. How we research
When a modal dialog opens, focus moves to an element inside the dialog.
When a dialog closes, focus returns to the element that invoked it, with exceptions; if the invoking element no longer exists, focus goes to another element that gives a logical work flow.
WCAG's Focus Order explanation describes modal dialogs: focus moves into the dialog, and when it is dismissed, focus returns to the button or the element following it.
In the ARIA Authoring Practices Guide, 'managing focus' means controlling focus movement inside a composite widget.