Skip to content

Commit 0aad0fa

Browse files
committed
docs(material/chips): update chips docs based on aria-placeholder addition
Updates documentation on chips.md regarding proper placement of the input element as a sibiling of as opposed to being a child. Also adds an explanation of the new implementation of ariaPlaceholder on mat-chip input.
1 parent df7d0e5 commit 0aad0fa

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/material/chips/chips.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ The chips components support 3 user interaction patterns, each with its own cont
139139

140140
#### Text Entry
141141

142-
`<mat-chip-grid>` and `<mat-chip-row>` : These elements implement a grid accessibility pattern. Use them as part of a free form input that allows users to enter text to add chips.
142+
`<mat-chip-grid>` and `<mat-chip-row>` : These elements implement a grid accessibility pattern. Use them as part of a free form input that allows users to enter text to add chips. Note : be sure to have the input element be a sibling of mat-chip-grid to ensure accessibility of the input element by accessibility devices such as Voice Control. The input will have a default `aria-placeholder` value of "Enter input" if no `ariaPlaceholder` value or `placeholder` attribute value is applied. This is to provide a calculable name for accessibility controls.
143143

144144
```html
145145
<mat-form-field>
@@ -153,10 +153,11 @@ The chips components support 3 user interaction patterns, each with its own cont
153153
</button>
154154
</mat-chip-row>
155155
}
156-
<input [matChipInputFor]="myChipGrid"
157-
[matChipInputSeparatorKeyCodes]="separatorKeysCodes"
158-
(matChipInputTokenEnd)="add($event)" />
159156
</mat-chip-grid>
157+
<input [matChipInputFor]="myChipGrid"
158+
[matChipInputSeparatorKeyCodes]="separatorKeysCodes"
159+
(matChipInputTokenEnd)="add($event)"
160+
ariaPlaceholder="Add sandwich fillings..." />
160161
</mat-form-field>
161162
```
162163

0 commit comments

Comments
 (0)