Skip to main content
cngx-src documentation

CngxMatTabAggregatorContentContext

Interface

projects/ui/mat-tabs/decorations/mat-tab-aggregator-content.directive.ts

Import#

import { CngxMatTabAggregatorContentContext } from '@cngx/ui/mat-tabs'

Description#

Context passed to the *cngxMatTabAggregatorContent template. Drives the SR-descriptor content rendered inside the <span class="cngx-sr-only"> decoration that [cngxMatTabs] appends to a Material tab button when its bound aggregator wants reveal. The surrounding span (with its cngx-sr-only class, its stable id, and the aria-describedby wiring on the button) stays library-owned - the slot only customises the descriptor text or markup so consumers can swap the announcement phrasing (counter pills, localised templates, branded prefixes) without fighting the AT contract.

count mirrors the bound aggregator's errorCount() at the moment the decoration was applied; label is the human-readable label of the tab (the Material MatTab.textLabel); announcement is the resolved AT phrase (the same string the imperative textContent fallback would write). All three are snapshotted into the decorated entry - re-emissions of the underlying signals re-fire the projector's effect, which re-applies the decoration with the fresh context.

Index#

Instance Properties#

announcement#string
Readonly

Resolved AT announcement phrase the imperative fallback path would write verbatim - the bound aggregator's announcement() value at the moment the decoration was applied. Use this when the consumer template wants to render the canonical phrase alongside its own decoration (counter pill, branded prefix) without re-injecting the aggregator.

count#number
Readonly

Aggregated error count for this tab (≥ 1 when shown).

label#string
Readonly

Resolved tab label (Material textLabel).