Overview
Quartz owns the accessible row — role="treeitem", roving tabindex, every aria-*
attribute, and click/keydown/focus handling all live on this component's own host, not on
a template-internal wrapper. That way a custom nodeTemplate only ever supplies inner
content/visuals; it renders inside the already-semantic <qz-tree-node> element instead
of replacing it, so a consumer reskinning a node never has to reimplement its
accessibility. (Before this, supplying a custom template silently dropped all of the
above — see docs/ai/STABILITY_AUDIT.md.)
Selector
qz-tree-node
| Input |
Type |
Default |
Required |
Description |
node |
TreeNode<unknown> |
|
Yes |
|
level |
number |
0 |
|
|
template |
TemplateRef<TreeNodeContext> | null |
null |
|
|
setsize |
number |
1 |
|
Number of sibling nodes at this level (for aria-setsize). |
posinset |
number |
1 |
|
1-based position among siblings (for aria-posinset). |
isFirst |
boolean |
false |
|
True for the very first node in the tree — seeds the roving tabindex. |
Properties
| Name |
Type |
Description |
readonly isExpanded |
Signal<boolean> |
|
readonly isSelected |
Signal<boolean> |
|
readonly hasChildren |
Signal<boolean> |
True for loaded children and for a node that declares hasChildren before loading. |
readonly loadState |
Signal<TreeNodeLoadState> |
|
readonly isLoading |
Signal<boolean> |
|
readonly loadError |
Signal<unknown> |
|
readonly toggleGlyph |
Signal<"⋯" | "↻" | "▼" | "▶"> |
Default-template affordance only: consumers with a nodeTemplate render their own. |
readonly tabindex |
Signal<0 | -1> |
Roving tabindex: only the active node (or the first, before any interaction) is tabbable. |
Public methods
onClick
onClick(_event: MouseEvent): void
| Parameter |
Type |
Optional |
Description |
_event |
MouseEvent |
|
|
onToggleClick
onToggleClick(event: MouseEvent): void
| Parameter |
Type |
Optional |
Description |
event |
MouseEvent |
|
|
onFocus
onFocus(): void
onKeydown
onKeydown(event: KeyboardEvent): void
| Parameter |
Type |
Optional |
Description |
event |
KeyboardEvent |
|
|
getContext
getContext(): TreeNodeContext