Skip to content

Commit 94e6c94

Browse files
authored
fix(material/chips): remove spans from top level of component (#26689)
Uses `div` instead of `span` for the top-level chip wrappers since some a11y tools flag nesting `div` inside of `span` as invalid.
1 parent 2b43945 commit 94e6c94

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/material/chips/chip-grid.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ const _MatChipGridMixinBase = mixinErrorState(MatChipGridBase);
9191
@Component({
9292
selector: 'mat-chip-grid',
9393
template: `
94-
<span class="mdc-evolution-chip-set__chips" role="presentation">
94+
<div class="mdc-evolution-chip-set__chips" role="presentation">
9595
<ng-content></ng-content>
96-
</span>
96+
</div>
9797
`,
9898
styleUrls: ['chip-set.css'],
9999
inputs: ['tabIndex'],

src/material/chips/chip-listbox.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ export const MAT_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR: any = {
5959
@Component({
6060
selector: 'mat-chip-listbox',
6161
template: `
62-
<span class="mdc-evolution-chip-set__chips" role="presentation">
62+
<div class="mdc-evolution-chip-set__chips" role="presentation">
6363
<ng-content></ng-content>
64-
</span>
64+
</div>
6565
`,
6666
styleUrls: ['chip-set.css'],
6767
inputs: ['tabIndex'],

src/material/chips/chip-set.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ const _MatChipSetMixinBase = mixinTabIndex(MatChipSetBase);
4646
@Component({
4747
selector: 'mat-chip-set',
4848
template: `
49-
<span class="mdc-evolution-chip-set__chips" role="presentation">
49+
<div class="mdc-evolution-chip-set__chips" role="presentation">
5050
<ng-content></ng-content>
51-
</span>
51+
</div>
5252
`,
5353
styleUrls: ['chip-set.css'],
5454
host: {

0 commit comments

Comments
 (0)