Skip to content

Commit c79dc6f

Browse files
authored
docs(tree): fix typo in tree template (#20231)
A bunch of tree examples were copied off of each other and were referecing a non-existent property which resulted in an incorrect `aria-label`. Fixes #20216.
1 parent beaf072 commit c79dc6f

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

src/components-examples/cdk/tree/cdk-tree-flat/cdk-tree-flat-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
[style.display]="shouldRender(node) ? 'flex' : 'none'"
1313
class="example-tree-node">
1414
<button mat-icon-button cdkTreeNodeToggle
15-
[attr.aria-label]="'toggle ' + node.filename"
15+
[attr.aria-label]="'Toggle ' + node.name"
1616
(click)="node.isExpanded = !node.isExpanded"
1717
[style.visibility]="node.expandable ? 'visible' : 'hidden'">
1818
<mat-icon class="mat-icon-rtl-mirror">

src/components-examples/cdk/tree/cdk-tree-nested/cdk-tree-nested-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</cdk-nested-tree-node>
88
<!-- This is the tree node template for expandable nodes -->
99
<cdk-nested-tree-node *cdkTreeNodeDef="let node; when: hasChild" class="example-tree-node">
10-
<button mat-icon-button [attr.aria-label]="'toggle ' + node.name" cdkTreeNodeToggle>
10+
<button mat-icon-button [attr.aria-label]="'Toggle ' + node.name" cdkTreeNodeToggle>
1111
<mat-icon class="mat-icon-rtl-mirror">
1212
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
1313
</mat-icon>

src/components-examples/material/tree/tree-checklist/tree-checklist-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
<mat-tree-node *matTreeNodeDef="let node; when: hasChild" matTreeNodePadding>
1919
<button mat-icon-button matTreeNodeToggle
20-
[attr.aria-label]="'toggle ' + node.filename">
20+
[attr.aria-label]="'Toggle ' + node.item">
2121
<mat-icon class="mat-icon-rtl-mirror">
2222
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
2323
</mat-icon>

src/components-examples/material/tree/tree-dynamic/tree-dynamic-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</mat-tree-node>
66
<mat-tree-node *matTreeNodeDef="let node; when: hasChild" matTreeNodePadding>
77
<button mat-icon-button
8-
[attr.aria-label]="'toggle ' + node.filename" matTreeNodeToggle>
8+
[attr.aria-label]="'Toggle ' + node.item" matTreeNodeToggle>
99
<mat-icon class="mat-icon-rtl-mirror">
1010
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
1111
</mat-icon>

src/components-examples/material/tree/tree-flat-overview/tree-flat-overview-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<!-- This is the tree node template for expandable nodes -->
99
<mat-tree-node *matTreeNodeDef="let node;when: hasChild" matTreeNodePadding>
1010
<button mat-icon-button matTreeNodeToggle
11-
[attr.aria-label]="'toggle ' + node.name">
11+
[attr.aria-label]="'Toggle ' + node.name">
1212
<mat-icon class="mat-icon-rtl-mirror">
1313
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
1414
</mat-icon>

src/components-examples/material/tree/tree-loadmore/tree-loadmore-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<!-- expandable node -->
99
<mat-tree-node *matTreeNodeDef="let node; when: hasChild" matTreeNodePadding>
1010
<button mat-icon-button
11-
[attr.aria-label]="'toggle ' + node.filename"
11+
[attr.aria-label]="'Toggle ' + node.item"
1212
(click)="loadChildren(node)"
1313
matTreeNodeToggle>
1414
<mat-icon class="mat-icon-rtl-mirror">

src/components-examples/material/tree/tree-nested-overview/tree-nested-overview-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<li>
1313
<div class="mat-tree-node">
1414
<button mat-icon-button matTreeNodeToggle
15-
[attr.aria-label]="'toggle ' + node.name">
15+
[attr.aria-label]="'Toggle ' + node.name">
1616
<mat-icon class="mat-icon-rtl-mirror">
1717
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
1818
</mat-icon>

src/material/schematics/ng-generate/tree/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<mat-tree-node *matTreeNodeDef="let node; when: hasChild" matTreeNodePadding>
1111
<button mat-icon-button matTreeNodeToggle
12-
[attr.aria-label]="'toggle ' + node.name">
12+
[attr.aria-label]="'Toggle ' + node.name">
1313
<mat-icon class="mat-icon-rtl-mirror">
1414
{{treeControl.isExpanded(node) ? 'expand_more' : 'chevron_right'}}
1515
</mat-icon>

0 commit comments

Comments
 (0)