Skip to main content
cngx-src documentation

createSliderDisabledReason

Functioncommon/interactive/slider

projects/common/interactive/slider/slider-disabled-reason.ts

Description#

Internal disabled-"why" mechanism shared by CngxSliderTrack and CngxRangeSliderTrack. Appends an sr-only description span to the host via Renderer2 (the tracks are headless directives on consumer markup, so there is no template to project into - same constraint and same shape as CngxChipInteraction). Always-in-DOM per Pillar 2; both the span's aria-hidden and the emitted id reference are gated on disabled() && reason() (Toggle/Radio convergence): accname 1.2 ยง2A traverses a directly referenced hidden node, so the id must only be emitted while the description applies.

Must run in an injection context (field initializer / constructor). Not exported from public-api.ts - decompose glue, not a consumer contract.

Signature#

createSliderDisabledReason(opts)

Parameters#

@paramopts

Returns#

CngxSliderDisabledReason