Skip to main content
cngx-src documentation

CngxTabGroupAnnouncements

Interface

projects/common/tabs/announcements/tab-group-announcements.ts

Referenced by#

Import#

import { CngxTabGroupAnnouncements } from '@cngx/common/tabs'

Description#

Resolved bundle returned by createTabGroupAnnouncements. Host bindings and template outlets read these directly. Owns one internal linkedSignal slot (prior-active-index tracker driving the success-arm direction prefix); consumers never touch it.

Index#

Instance Properties#

liveAnnouncement#Signal
Readonly

Polite live-region content — declarative, never an imperative announce(). Empty between transitions so the region stays quiet on no-op ticks.

Error arm: commitRolledBackTo(originLabel) when origin resolves; otherwise commitFailedRetry.

Success arm: ${previousTab|nextTab}: selectedTab(...) when the index moved; bare selectedTab(...) when it didn't (initial mount, or commit-success that lands on the same tab).

resolvedAriaLabel#Signal
Readonly

Wrapper aria-label. Resolution: per-instance Input → ariaLabels.tabsRegioni18n.tabsLabel. Returns null when aria-labelledby is bound (mutually exclusive per WAI-ARIA).

tabPanelRoleDescription#Signal
Readonly

Tab-panel aria-roledescription. Cascades through CngxTabsFallbackLabels.tabPanelRoleDescription'tab panel'.

tabsRoleDescription#Signal
Readonly

Tablist aria-roledescription. Cascades through CngxTabsFallbackLabels.tabRoleDescription'tab list'. Distinct from i18n.tabsLabel (which feeds aria-label) so AT does not read the same word twice.

Methods#

statusPhrase#string
statusPhrase(tab: CngxTabHandle)

SR descriptor phrase for a tab's cngx-sr-only span. Gated on the folded tab.hasError() so a direct [error] tab announces without an aggregator. Resolution: aggregator.announcement()tab.errorMessage() (the direct-channel message) → i18n.tabHasErrors(errorCount). Empty string when the tab has no error. The span itself is always rendered (cngx ARIA-by-value rule); this returns its content.

@paramtabCngxTabHandle
tabAriaLabel#string
tabAriaLabel(tab: CngxTabHandle, position: number)

Verbose tab-button aria-labelselectedTab(label, position, count) so AT hears "Tab 2 of 5: Settings" instead of inferring position from tablist enumeration. The visual span keeps the bare label.

@paramtabCngxTabHandle
@parampositionnumber