aria-describedby passthrough for hint/error text — same shape of gap as the name.
Accessible name for the combobox (#3860). Without one — and with no visible label wired via
AriaLabelledBy — the control announces as an UNNAMED combobox, which fails WCAG 2.1
4.1.2 (Name, Role, Value): "combobox, collapsed" with no hint of what it selects. Applied as
aria-label on the trigger AND on the popup listbox, so both halves announce the same name.
The id of a VISIBLE label element that names this control — the preferred wiring when a label
already exists on screen (an aria-label would duplicate its text and drift on rename). This,
not <label for>, is the visible-label path: the trigger is a div[role=combobox], and the
label-for association only names labelable form elements. aria-labelledby beats AriaLabel
in the accessible-name computation where both are present. Applied to trigger AND listbox.
Readonlyhostid for the combobox trigger, so other markup can REFERENCE it — aria-controls, hint text,
test hooks. It is deliberately not documented as a <label for> target: the trigger is a div,
which label[for] neither names nor focuses. To name the control from a visible label, put an
id on the LABEL and pass it as AriaLabelledBy.
The single gate on Toggle() / Open() — true when EITHER the Disabled input or Angular
Forms says so. Never assign it directly; go through syncDisabled() so both sources are
always composed and a lock closes an open panel.
Host-driven disable. Composed with Angular Forms' setDisabledState() into IsDisabled
(the actual gate) — see syncDisabled. A setter, not a bare field, because this input is
routinely bound to an expression that changes over the control's lifetime
([Disabled]="!draft.CompanyID"), and the gate has to follow it every time.
aria-label for the filter box in the no-visible-label case.
The "filter" guard is not cosmetic: this repo's house habit is AriaLabel="Filter roles", and
an unconditional prefix announces that box as "Filter Filter roles". A name that already begins
with the word is used as-is.
aria-labelledby for the filter box when the dropdown is named by a VISIBLE label: "Filter"
plus that label's own text, composed by the accessibility tree. Empty when there is no such
label, in which case FilterLabel supplies a string instead.
Id of the hidden "Filter" word, composed into the filter box's name via an id list.
Id of the popup listbox, so the trigger can point aria-controls at it while open — the half of
the combobox pattern that makes "collapsed/expanded" refer to something a screen reader can
find. Generated per instance from the same static nextId counter dialog, window and
accordion use in this package.
A callback method that performs custom clean-up, invoked immediately before a directive, pipe, or service instance is destroyed.
The callback function to register
Registers a callback function that is called when the control's value changes in the UI.
This method is called by the forms API on initialization to update the form model when values propagate from the view to the model.
When implementing the registerOnChange method in your own value accessor,
save the given function so your class calls it at the appropriate time.
The following example stores the provided function as an internal method.
registerOnChange(fn: (_: any) => void): void {
this._onChange = fn;
}
When the value changes in the UI, call the registered function to allow the forms API to update itself:
host: {
'(change)': '_onChange($event.target.value)'
}
The callback function to register
Registers a callback function that is called by the forms API on initialization to update the form model on blur.
When implementing registerOnTouched in your own value accessor, save the given
function so your class calls it when the control should be considered
blurred or "touched".
The following example stores the provided function as an internal method.
registerOnTouched(fn: any): void {
this._onTouched = fn;
}
On blur (or equivalent), your class should call the registered function to allow the forms API to update itself:
host: {
'(blur)': '_onTouched()'
}
Optionalevent: Event
mj-dropdown — Dropdown select component using CDK Overlay.
Replaces
<kendo-dropdownlist>.Every dropdown needs an ACCESSIBLE NAME, or it announces as "combobox, collapsed" with no hint of what it selects (WCAG 2.1 4.1.2). Use AriaLabelledBy when a visible label already exists —
<label for>cannot name adiv[role=combobox]— and AriaLabel when none does.Example: With a visible label (preferred)
Example: With no visible label