Home > widget-integration > InstantSearchController > announceResults

InstantSearchController.announceResults() method

Announce search result count to screen readers via an ARIA live region.

Creates a visually-hidden role="status" live region on first call and reuses it on subsequent calls. The text is cleared then set so that repeated identical counts still trigger an announcement.

**WCAG**: SC 4.1.3 Status Messages (Level AA)

Signature:

protected announceResults(count: number): void;

Parameters

Parameter

Type

Description

count

number

Number of products found

Returns:

void