Skip to main content
cngx-src documentation

CngxAccordionItemSubtitle

Directivev0.1.0WCAG AA

projects/ui/accordion/accordion-item-subtitle.directive.ts

Import#

import { CngxAccordionItemSubtitle } from '@cngx/ui/accordion'

Description#

Projected-subtitle marker for a CngxAccordionItem. Put it on the secondary line that sits below the title inside the header button. The item projects it under the title but keeps it OUT of the button's accessible name (the name is pinned to the title via aria-labelledby); the subtitle is instead announced through the button's aria-describedby, so an informative subtitle is not lost to assistive tech while the name stays title-only.

<cngx-accordion-item>
  <span cngxAccordionItemTitle>Billing</span>
  <span cngxAccordionItemSubtitle>Invoices and payment methods</span>
  Body…
</cngx-accordion-item>

Metadata#