Skip to content

Commit 8643c9c

Browse files
committed
fix(material/chips): use checkmark graphic for single-selection (#25890)
For mat-chip-listbox, use the checkmark component for single-selection. Fixes issue where selected state is communicated visually only using color (#25886). (cherry picked from commit a999a52)
1 parent ec116ab commit 8643c9c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/material/chips/chip-option.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,10 @@ export class MatChipOption extends MatChip implements OnInit {
164164
}
165165

166166
_hasLeadingGraphic() {
167-
// The checkmark graphic is built in for multi-select chip lists.
168-
return this.leadingIcon || (this._chipListMultiple && this.selectable);
167+
// The checkmark graphic communicates selected state for both single-select and multi-select.
168+
// Include checkmark in single-select to fix a11y issue where selected state is communicated
169+
// visually only using color (#25886).
170+
return this.leadingIcon || this.selectable;
169171
}
170172

171173
_setSelectedState(isSelected: boolean, isUserInput: boolean, emitEvent: boolean) {

0 commit comments

Comments
 (0)