Skip to content

Commit 3c68b6d

Browse files
committed
fix(multiple): resolve host binding issues (#30570)
Resolves the following issues with host bindings that weren't caught due to a lack of type checking: * The `aria-describedby` binding on `mat-chip-listbox` was doing nothing, because the `_ariaDescribedBy` property does not exist. * The `focus` handler on `mat-chip-row` was passing an event to `_handleFocus` even though one isn't required. * `MatListOption` was referencing a private method. * `mat-sort-header` was setting an invalid value to the `_recentlyCleared` signal. (cherry picked from commit eef7d66)
1 parent c31c7fe commit 3c68b6d

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/material/chips/chip-listbox.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ export const MAT_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR: any = {
6868
'class': 'mdc-evolution-chip-set mat-mdc-chip-listbox',
6969
'[attr.role]': 'role',
7070
'[tabIndex]': '(disabled || empty) ? -1 : tabIndex',
71-
// TODO: replace this binding with use of AriaDescriber
72-
'[attr.aria-describedby]': '_ariaDescribedby || null',
7371
'[attr.aria-required]': 'role ? required : null',
7472
'[attr.aria-disabled]': 'disabled.toString()',
7573
'[attr.aria-multiselectable]': 'multiple',

src/material/chips/chip-row.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export interface MatChipEditedEvent extends MatChipEvent {
5959
'[attr.aria-label]': 'null',
6060
'[attr.aria-description]': 'null',
6161
'[attr.role]': 'role',
62-
'(focus)': '_handleFocus($event)',
62+
'(focus)': '_handleFocus()',
6363
'(dblclick)': '_handleDoubleclick($event)',
6464
},
6565
providers: [

src/material/list/list-option.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export interface SelectionList extends MatListBase {
100100
imports: [NgTemplateOutlet, CdkObserveContent],
101101
})
102102
export class MatListOption extends MatListItemBase implements ListOption, OnInit, OnDestroy {
103-
private _selectionList = inject<SelectionList>(SELECTION_LIST);
103+
protected _selectionList = inject<SelectionList>(SELECTION_LIST);
104104
private _changeDetectorRef = inject(ChangeDetectorRef);
105105

106106
@ContentChildren(MatListItemLine, {descendants: true}) _lines: QueryList<MatListItemLine>;

src/material/sort/sort-header.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ interface MatSortHeaderColumnDef {
8484
'class': 'mat-sort-header',
8585
'(click)': '_toggleOnInteraction()',
8686
'(keydown)': '_handleKeydown($event)',
87-
'(mouseleave)': '_recentlyCleared.set(false)',
87+
'(mouseleave)': '_recentlyCleared.set(null)',
8888
'[attr.aria-sort]': '_getAriaSortAttribute()',
8989
'[class.mat-sort-header-disabled]': '_isDisabled()',
9090
},

tools/public_api_guard/material/list.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ export class MatListOption extends MatListItemBase implements ListOption, OnInit
183183
get selected(): boolean;
184184
set selected(value: BooleanInput);
185185
readonly selectedChange: EventEmitter<boolean>;
186+
// (undocumented)
187+
protected _selectionList: SelectionList;
186188
_setSelected(selected: boolean): boolean;
187189
_setTabindex(value: number): void;
188190
// (undocumented)

0 commit comments

Comments
 (0)