Skip to main content
cngx-src documentation

CngxTabCloseIconContext

Interface

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

Import#

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

Description#

Context for the *cngxTabCloseIcon template. Rendered inside each closable tab's close button (the button itself owns the aria-label); the template paints only the glyph, so it carries the tab handle in case the visual varies per tab.

Index#

Properties

Instance Properties#

Readonly

The tab handle whose close button this icon paints.

CngxTabCloseIcon

The slot paints only the glyph inside each closable tab's close button. The button shell owns the name, the keyboard, and focus restoration, so the template stays decorative.

  • Accessible name is library-owned. The close button carries aria-label from closeButtonLabel(tab) ("Close
  • Keyboard close is library-owned (APG). Delete on a focused closable tab requests its close; the slot wires no keys.
  • Focus is restored on close. After the consumer removes the tab, focus moves to the new active tab, then the add button, then the group element - it never falls to <body>.
  • Keep the template decorative. Icon only; no nested interactive elements, no SR-only text (the button already announces). Decorative glyphs should be aria-hidden.