Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b207c87

Browse files
committed
add support for popovers
1 parent f5299d4 commit b207c87

File tree

6 files changed

+2718
-7995
lines changed

6 files changed

+2718
-7995
lines changed

examples/index.html

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<input name="robot" type="text" aria-labelledby="robots-label" autofocus />
4747
<!-- if a clear button is passed in, recommended to be *before* UL elements to avoid conflicting with their blur logic -->
4848
<button id="robot-clear">x</button>
49-
<ul id="items-popup"></ul>
49+
<ul popover id="items-popup"></ul>
5050
<!-- For built-in screen-reader announcements:
5151
- Note the ID is the same as the <ul> with "feedback" appended
5252
- Also note that aria attributes will be added programmatically if they aren't set correctly
@@ -64,7 +64,7 @@
6464
<input id="robot-a" name="robot-a" type="text" aria-labelledby="robots-a-label" autofocus />
6565
<!-- if a clear button is passed in, recommended to be *before* UL elements to avoid conflicting with their blur logic -->
6666
<button id="robot-a-clear">x</button>
67-
<ul id="items-a-popup"></ul>
67+
<ul popover id="items-a-popup"></ul>
6868
<!-- For built-in screen-reader announcements:
6969
- Note the ID is the same as the <ul> with "feedback" appended
7070
- Also note that aria attributes will be added programmatically if they aren't set correctly
@@ -79,7 +79,7 @@
7979
<label id="robots-2-label" for="robot-2">Robots (without autoselect on enter)</label>
8080
<auto-complete src="/demo" for="items-2-popup" aria-labelledby="robots-2-label">
8181
<input name="robot-2" type="text" aria-labelledby="robots-2-label" autofocus />
82-
<ul id="items-2-popup"></ul>
82+
<ul popover id="items-2-popup"></ul>
8383
<div id="items-2-popup-feedback" class="sr-only"></div>
8484
</auto-complete>
8585
<button type="submit">Save</button>
@@ -88,9 +88,15 @@
8888
<!-- example with a custom fetching result method -->
8989
<form>
9090
<label id="custom-fetching-robots-label" for="custom-fetching-robot">Custom Fetching Robots</label>
91-
<auto-complete id="custom-fetching-method" src="/demo" for="custom-fetching-items-popup" aria-labelledby="custom-fetching-robots-label" data-autoselect="true">
92-
<input name="custom-fetching-robot" type="text" aria-labelledby="custom-fetching-robots-label" autofocus>
93-
<ul id="custom-fetching-items-popup"></ul>
91+
<auto-complete
92+
id="custom-fetching-method"
93+
src="/demo"
94+
for="custom-fetching-items-popup"
95+
aria-labelledby="custom-fetching-robots-label"
96+
data-autoselect="true"
97+
>
98+
<input name="custom-fetching-robot" type="text" aria-labelledby="custom-fetching-robots-label" autofocus />
99+
<ul popover id="custom-fetching-items-popup"></ul>
94100
<div id="custom-fetching-items-popup-feedback" class="sr-only"></div>
95101
</auto-complete>
96102
<button type="submit">Save</button>
@@ -107,7 +113,7 @@
107113
<auto-complete src="/demo" for="fetch-on-empty-items-popup" aria-labelledby="fetch-on-empty-robots-label" fetch-on-empty>
108114
<input name="fetch-on-empty-robot" type="text" aria-labelledby="fetch-on-empty-robots-label" autofocus />
109115
<button id="fetch-on-empty-robot-clear">x</button>
110-
<ul id="fetch-on-empty-items-popup"></ul>
116+
<ul popover id="fetch-on-empty-items-popup"></ul>
111117
<div id="fetch-on-empty-items-popup-feedback" class="sr-only"></div>
112118
</auto-complete>
113119
<button type="submit">Save</button>

0 commit comments

Comments
 (0)