Skip to content

Commit 9f70222

Browse files
committed
main - 09b25a1 fix(material/chips): adds default placeholder for chips input (#30452)
1 parent 666f128 commit 9f70222

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

docs-content/overviews/material/chips/chips.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ <h4 id="text-entry" class="docs-header-link">
158158
Text Entry
159159
</h4>
160160
<p><code>&lt;mat-chip-grid&gt;</code> and <code>&lt;mat-chip-row&gt;</code> : 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.</p>
161+
<p>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. It is also recommended to apply an appropriate <code>aria-label</code> to the input to optimize accessibility of the input.</p>
161162
<pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">mat-form-field</span>&gt;</span>
162163
<span class="hljs-tag">&lt;<span class="hljs-name">mat-chip-grid</span> #<span class="hljs-attr">myChipGrid</span> [(<span class="hljs-attr">ngModel</span>)]=<span class="hljs-string">&quot;mySelection&quot;</span>
163164
<span class="hljs-attr">aria-label</span>=<span class="hljs-string">&quot;enter sandwich fillings&quot;</span>&gt;</span>
@@ -169,10 +170,11 @@ <h4 id="text-entry" class="docs-header-link">
169170
<span class="hljs-tag">&lt;/<span class="hljs-name">button</span>&gt;</span>
170171
<span class="hljs-tag">&lt;/<span class="hljs-name">mat-chip-row</span>&gt;</span>
171172
}
172-
<span class="hljs-tag">&lt;<span class="hljs-name">input</span> [<span class="hljs-attr">matChipInputFor</span>]=<span class="hljs-string">&quot;myChipGrid&quot;</span>
173-
[<span class="hljs-attr">matChipInputSeparatorKeyCodes</span>]=<span class="hljs-string">&quot;separatorKeysCodes&quot;</span>
174-
(<span class="hljs-attr">matChipInputTokenEnd</span>)=<span class="hljs-string">&quot;add($event)&quot;</span> /&gt;</span>
175173
<span class="hljs-tag">&lt;/<span class="hljs-name">mat-chip-grid</span>&gt;</span>
174+
<span class="hljs-tag">&lt;<span class="hljs-name">input</span> [<span class="hljs-attr">matChipInputFor</span>]=<span class="hljs-string">&quot;myChipGrid&quot;</span>
175+
[<span class="hljs-attr">matChipInputSeparatorKeyCodes</span>]=<span class="hljs-string">&quot;separatorKeysCodes&quot;</span>
176+
(<span class="hljs-attr">matChipInputTokenEnd</span>)=<span class="hljs-string">&quot;add($event)&quot;</span>
177+
<span class="hljs-attr">aria-label</span>=<span class="hljs-string">&quot;Add sandwich fillings...&quot;</span> /&gt;</span>
176178
<span class="hljs-tag">&lt;/<span class="hljs-name">mat-form-field</span>&gt;</span>
177179
</code></pre>
178180

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular/components-examples",
3-
"version": "20.0.0-next.1+sha-43b0860",
3+
"version": "20.0.0-next.1+sha-09b25a1",
44
"description": "Angular Components Examples",
55
"private": true,
66
"repository": {
@@ -259,15 +259,15 @@
259259
},
260260
"homepage": "https://github.com/angular/components#readme",
261261
"peerDependencies": {
262-
"@angular/cdk": "20.0.0-next.1+sha-43b0860",
263-
"@angular/cdk-experimental": "20.0.0-next.1+sha-43b0860",
262+
"@angular/cdk": "20.0.0-next.1+sha-09b25a1",
263+
"@angular/cdk-experimental": "20.0.0-next.1+sha-09b25a1",
264264
"@angular/core": "^20.0.0-0 || ^20.1.0-0 || ^20.2.0-0 || ^20.3.0-0 || ^21.0.0-0",
265265
"@angular/common": "^20.0.0-0 || ^20.1.0-0 || ^20.2.0-0 || ^20.3.0-0 || ^21.0.0-0",
266-
"@angular/material": "20.0.0-next.1+sha-43b0860",
267-
"@angular/material-experimental": "20.0.0-next.1+sha-43b0860",
268-
"@angular/material-moment-adapter": "20.0.0-next.1+sha-43b0860",
269-
"@angular/material-luxon-adapter": "20.0.0-next.1+sha-43b0860",
270-
"@angular/material-date-fns-adapter": "20.0.0-next.1+sha-43b0860"
266+
"@angular/material": "20.0.0-next.1+sha-09b25a1",
267+
"@angular/material-experimental": "20.0.0-next.1+sha-09b25a1",
268+
"@angular/material-moment-adapter": "20.0.0-next.1+sha-09b25a1",
269+
"@angular/material-luxon-adapter": "20.0.0-next.1+sha-09b25a1",
270+
"@angular/material-date-fns-adapter": "20.0.0-next.1+sha-09b25a1"
271271
},
272272
"dependencies": {
273273
"tslib": "^2.3.0"

0 commit comments

Comments
 (0)