← All analysers · JavaScript analysers

FocusManagementAnalyzer

Validates focus changes — moves to dialogs, restoration, traps.

What it detects

Focus is the single most fragile piece of state on a page. Opening a modal should move focus into it; closing should return focus to the trigger; keyboard navigation inside the modal should be trapped. This analyser walks the ActionLanguage tree, identifies focus-affecting actions, and reports patterns that drop or trap focus incorrectly.

WCAG criteria

  • 2.4.3Focus Order
  • 2.1.2No Keyboard Trap

Source

analyzers/FocusManagementAnalyzer.ts

More