Skip to content

Commit

Permalink
fix(material/chips): added role presentation to mat-chip host
Browse files Browse the repository at this point in the history
added role presentation to mat-chip host so that mobile SR users do not have to
double swipe to traverse chip

fixes b/286286473
  • Loading branch information
DBowen33 committed Jul 15, 2024
1 parent f411903 commit 4d4b33b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/material/chips/chip-row.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ describe('MDC-based Row Chips', () => {
});

it('should have the correct role', () => {
expect(chipNativeElement.getAttribute('role')).toBe('row');
expect(chipNativeElement.getAttribute('role')).toBe('presentation');
});

it('should be able to set a custom role', () => {
Expand Down
1 change: 1 addition & 0 deletions src/material/chips/chip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ export class MatChip implements OnInit, AfterViewInit, AfterContentInit, DoCheck
this._isBasicChip =
element.hasAttribute(this.basicChipAttrName) ||
element.tagName.toLowerCase() === this.basicChipAttrName;
this.role = 'presentation';
}

ngAfterViewInit() {
Expand Down

0 comments on commit 4d4b33b

Please sign in to comment.