Pure-functional helpers for announcement queue management, priority sorting, history tracking, and delivery. Used by AccessibilityServer.
Summary
Functions
Appends a high-priority focus announcement to both queue and history.
Returns history limited to limit entries (or all when nil).
Parses event dispatcher arguments into {old_focus, new_focus} tuples.
Returns {nil, nil} when the event cannot be parsed.
Returns {next_message, updated_announcements_state} or {nil, state} when empty.
Returns the announcement state map after processing a new announcement. Does nothing if announcements should not be processed.
Functions
Appends a high-priority focus announcement to both queue and history.
Returns history limited to limit entries (or all when nil).
Parses event dispatcher arguments into {old_focus, new_focus} tuples.
Returns {nil, nil} when the event cannot be parsed.
Returns {next_message, updated_announcements_state} or {nil, state} when empty.
Returns the announcement state map after processing a new announcement. Does nothing if announcements should not be processed.