|
39 | 39 | </head>
|
40 | 40 | <body>
|
41 | 41 | <form>
|
42 |
| - <label id="robots-label">Robots</label> |
| 42 | + <label id="robots-label" for="robot">Robots</label> |
43 | 43 | <!-- To enable auto-select (select first on Enter), use data-autoselect="true" -->
|
44 | 44 | <auto-complete src="/demo" for="items-popup" aria-labelledby="robots-label" data-autoselect="true">
|
45 | 45 | <input name="robot" type="text" aria-labelledby="robots-label" autofocus>
|
|
57 | 57 |
|
58 | 58 | <!-- example where clear button uses input id -->
|
59 | 59 | <form>
|
60 |
| - <label id="robots-a-label">Robots-a</label> |
| 60 | + <label id="robots-a-label" for="robot-a">Robots (using Input ID)</label> |
61 | 61 | <!-- To enable auto-select (select first on Enter), use data-autoselect="true" -->
|
62 |
| - <auto-complete src="/demo" for="items-popup" aria-labelledby="robots-a-label" data-autoselect="true"> |
63 |
| - <input id="robot-a" name="robot-a" type="search" aria-labelledby="robots-a-label" autofocus> |
| 62 | + <auto-complete src="/demo" for="items-a-popup" aria-labelledby="robots-a-label" data-autoselect="true"> |
| 63 | + <input id="robot-a" name="robot-a" type="text" aria-labelledby="robots-a-label" autofocus> |
64 | 64 | <!-- if a clear button is passed in, recommended to be *before* UL elements to avoid conflicting with their blur logic -->
|
65 | 65 | <button id="robot-a-clear">x</button>
|
66 | 66 | <ul id="items-a-popup" aria-labelledby="robots-a-label"></ul>
|
|
75 | 75 |
|
76 | 76 | <!-- example without autoselect -->
|
77 | 77 | <form>
|
78 |
| - <label id="robots-2-label">Robots 2</label> |
| 78 | + <label id="robots-2-label" for="robot-2">Robots (without autoselect on enter)</label> |
79 | 79 | <auto-complete src="/demo" for="items-2-popup" aria-labelledby="robots-2-label" >
|
80 | 80 | <input name="robot-2" type="text" aria-labelledby="robots-2-label" autofocus>
|
81 | 81 | <ul id="items-2-popup" aria-labelledby="robots-2-label"></ul>
|
|
0 commit comments