Skip to main content
cngx-src documentation

CngxTabRejectionIconContext

Interface

projects/common/tabs/slots/tab-rejection-icon.directive.ts

Referenced by#

Import#

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

Description#

Context for the *cngxTabRejectionIcon template. Renders only on the tab matching presenter.lastFailedIndex(); the visibility gate stays library-owned. originLabel is the safe-harbour tab, derived from presenter.originIndexDuringCommit() - undefined for the synchronous-rejection edge case. Sibling shape to CngxStepRejectionContext.

Index#

Instance Properties#

failedIndex#number
Readonly

Flat-index of the rejected tab (presenter.lastFailedIndex()).

originLabel#string | undefined
Readonly

Resolved label of the safe-harbour tab, when derivable.

CngxTabRejectionIcon

The slot replaces only the visible rejection decoration on the tab the commit rolled back from. The outcome is communicated to assistive tech by the library, so the template stays decorative.

  • Visibility is library-gated. The slot renders only on the tab matching presenter.lastFailedIndex(); the consumer never gates it.
  • The SR channel is library-owned. The built-in glyph is aria-hidden; the rollback is announced through the group's live region.
  • originLabel carries SR context. It names the safe-harbour tab the active state rolled back to (undefined for the synchronous-rejection edge case). Surface it inside a cngx-sr-only span when you want it spoken alongside the icon.
  • Keep the template decorative. Do not signal rejection by colour alone; pair with an icon or shape. No interactive elements.