A11yScanEngine

class A11yScanEngine(rules: List<A11yRule>, config: ScannerConfig)

Core orchestrator: runs a fixed set of accessibility rules over a list of nodes and streams scan progress as a Flow of ScannerState.

Emission sequence: Scanning(0f) → Scanning(1/n) → … → Scanning(1f) → Complete(result) or Complete(emptyResult) when no enabled rules / no nodes. or Error(message) if a rule throws an unexpected exception.

The entire flow body runs on Dispatchers.Default via flowOn; collectors receive emissions on their own dispatcher.

Parameters

rules

All candidate rules. Only those whose A11yRule.ruleId appears in config.enabledRules will be evaluated — defensive against callers that pass the full rule set regardless of config.

Constructors

Link copied to clipboard
constructor(rules: List<A11yRule>, config: ScannerConfig)

Functions

Link copied to clipboard
fun scan(nodes: List<A11yNode>): Flow<ScannerState>

Runs enabled rules over nodes and emits progress followed by a terminal state.