Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/material-experimental/mdc-chips/chip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,12 @@ export class MatChip extends _MatChipMixinBase implements AfterContentInit, Afte
},
hasLeadingIcon: () => { return !!this.leadingIcon; },
setAttr: (name: string, value: string) => {
// MDC is currently using this method to set aria-checked on choice and filter chips,
// which in the MDC templates have role="checkbox" and role="radio" respectively.
// We have role="option" on those chips instead, so we do not want aria-checked.
if (name === 'aria-checked') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you file an issue on the MDC repo about this? I would consider it overzealous.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return;
}
this._elementRef.nativeElement.setAttribute(name, value);
},
// The 2 functions below are used by the MDC ripple, which we aren't using,
Expand Down