Skip to main content
cngx-src documentation

CngxTabDismissals

Interface

projects/common/tabs/dismissals/tab-dismissals.ts

Referenced by#

Import#

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

Description#

Resolved dismissable/addable surface for <cngx-tab-group>.
The organism holds this as one field and the template reads it.

Index#

Instance Properties#

closedAnnouncement#Signal
Readonly

Live-region phrase confirming a landed close (i18n.closedTab). Derived from the registry transition - it updates when a requested close's id actually leaves the registry, so an async consumer removal announces on completion, not on request. Feed it into createTabGroupAnnouncements (options.closedAnnouncement) so the live region resolves one priority chain.

resolvedAddable#Signal
Readonly

Effective group-level add affordance (input ?? config ?? false).

resolvedClosable#Signal
Readonly

Effective group-level close affordance (input ?? config ?? false).

Methods#

closeButtonLabel#string
closeButtonLabel(tab: CngxTabHandle)

i18n accessible name for a tab's close button.

@paramtabCngxTabHandle
closeIconContextFor#CngxTabCloseIconContext
closeIconContextFor(tab: CngxTabHandle)

Stable *cngxTabCloseIcon context ({ tab }) per tab.

@paramtabCngxTabHandle
handleAdd#void

Request a new tab via the add button.

handleClose#void
handleClose(tab: CngxTabHandle, event?: Event)

Close a tab and restore focus to the new active tab / add button.

@paramtabCngxTabHandle
@paramevent?Event
handleTabKeydown#void
handleTabKeydown(tab: CngxTabHandle, event: KeyboardEvent)

Delete on a focused closable tab requests its close (APG).

@paramtabCngxTabHandle
@parameventKeyboardEvent
isTabClosable#boolean
isTabClosable(tab: CngxTabHandle)

Per-tab closable: per-tab override > group resolution.

@paramtabCngxTabHandle