svelte-typeahead 4.4.0 → 4.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/lib/index.js +8 -8
- package/lib/index.mjs +8 -8
- package/package.json +1 -1
- package/src/Typeahead.svelte +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [4.4.1](https://github.com/metonym/svelte-typeahead/releases/tag/v4.4.1) - 2022-11-12
|
|
9
|
+
|
|
10
|
+
- replace `aria-owns` with `aria-controls` to resolve `a11y-role-has-required-aria-props` warning
|
|
11
|
+
|
|
8
12
|
## [4.4.0](https://github.com/metonym/svelte-typeahead/releases/tag/v4.4.0) - 2022-11-08
|
|
9
13
|
|
|
10
14
|
**Features**
|
package/lib/index.js
CHANGED
|
@@ -1139,7 +1139,7 @@
|
|
|
1139
1139
|
value: /*value*/ ctx[0]
|
|
1140
1140
|
});
|
|
1141
1141
|
|
|
1142
|
-
// (
|
|
1142
|
+
// (247:4) {#if showResults}
|
|
1143
1143
|
function create_if_block_1(ctx) {
|
|
1144
1144
|
let each_1_anchor;
|
|
1145
1145
|
let current;
|
|
@@ -1223,7 +1223,7 @@
|
|
|
1223
1223
|
};
|
|
1224
1224
|
}
|
|
1225
1225
|
|
|
1226
|
-
// (
|
|
1226
|
+
// (266:41)
|
|
1227
1227
|
function fallback_block(ctx) {
|
|
1228
1228
|
let html_tag;
|
|
1229
1229
|
let raw_value = /*result*/ ctx[47].string + "";
|
|
@@ -1249,7 +1249,7 @@
|
|
|
1249
1249
|
};
|
|
1250
1250
|
}
|
|
1251
1251
|
|
|
1252
|
-
// (
|
|
1252
|
+
// (248:6) {#each results as result, index}
|
|
1253
1253
|
function create_each_block(ctx) {
|
|
1254
1254
|
let li;
|
|
1255
1255
|
let t;
|
|
@@ -1357,7 +1357,7 @@
|
|
|
1357
1357
|
};
|
|
1358
1358
|
}
|
|
1359
1359
|
|
|
1360
|
-
// (
|
|
1360
|
+
// (272:4) {#if $$slots["no-results"] && !hideDropdown && value.length > 0 && results.length === 0}
|
|
1361
1361
|
function create_if_block(ctx) {
|
|
1362
1362
|
let div;
|
|
1363
1363
|
let current;
|
|
@@ -1422,7 +1422,7 @@
|
|
|
1422
1422
|
let t1;
|
|
1423
1423
|
let ul_aria_labelledby_value;
|
|
1424
1424
|
let ul_id_value;
|
|
1425
|
-
let
|
|
1425
|
+
let div_aria_controls_value;
|
|
1426
1426
|
let div_id_value;
|
|
1427
1427
|
let current;
|
|
1428
1428
|
let mounted;
|
|
@@ -1501,7 +1501,7 @@
|
|
|
1501
1501
|
attr(div, "data-svelte-typeahead", "");
|
|
1502
1502
|
attr(div, "role", "combobox");
|
|
1503
1503
|
attr(div, "aria-haspopup", "listbox");
|
|
1504
|
-
attr(div, "aria-
|
|
1504
|
+
attr(div, "aria-controls", div_aria_controls_value = "" + (/*id*/ ctx[2] + "-listbox"));
|
|
1505
1505
|
attr(div, "aria-expanded", /*showResults*/ ctx[7]);
|
|
1506
1506
|
attr(div, "id", div_id_value = "" + (/*id*/ ctx[2] + "-typeahead"));
|
|
1507
1507
|
attr(div, "class", "svelte-1t4elht");
|
|
@@ -1612,8 +1612,8 @@
|
|
|
1612
1612
|
attr(ul, "id", ul_id_value);
|
|
1613
1613
|
}
|
|
1614
1614
|
|
|
1615
|
-
if (!current || dirty[0] & /*id*/ 4 &&
|
|
1616
|
-
attr(div, "aria-
|
|
1615
|
+
if (!current || dirty[0] & /*id*/ 4 && div_aria_controls_value !== (div_aria_controls_value = "" + (/*id*/ ctx[2] + "-listbox"))) {
|
|
1616
|
+
attr(div, "aria-controls", div_aria_controls_value);
|
|
1617
1617
|
}
|
|
1618
1618
|
|
|
1619
1619
|
if (!current || dirty[0] & /*showResults*/ 128) {
|
package/lib/index.mjs
CHANGED
|
@@ -1133,7 +1133,7 @@ const get_default_slot_context = ctx => ({
|
|
|
1133
1133
|
value: /*value*/ ctx[0]
|
|
1134
1134
|
});
|
|
1135
1135
|
|
|
1136
|
-
// (
|
|
1136
|
+
// (247:4) {#if showResults}
|
|
1137
1137
|
function create_if_block_1(ctx) {
|
|
1138
1138
|
let each_1_anchor;
|
|
1139
1139
|
let current;
|
|
@@ -1217,7 +1217,7 @@ function create_if_block_1(ctx) {
|
|
|
1217
1217
|
};
|
|
1218
1218
|
}
|
|
1219
1219
|
|
|
1220
|
-
// (
|
|
1220
|
+
// (266:41)
|
|
1221
1221
|
function fallback_block(ctx) {
|
|
1222
1222
|
let html_tag;
|
|
1223
1223
|
let raw_value = /*result*/ ctx[47].string + "";
|
|
@@ -1243,7 +1243,7 @@ function fallback_block(ctx) {
|
|
|
1243
1243
|
};
|
|
1244
1244
|
}
|
|
1245
1245
|
|
|
1246
|
-
// (
|
|
1246
|
+
// (248:6) {#each results as result, index}
|
|
1247
1247
|
function create_each_block(ctx) {
|
|
1248
1248
|
let li;
|
|
1249
1249
|
let t;
|
|
@@ -1351,7 +1351,7 @@ function create_each_block(ctx) {
|
|
|
1351
1351
|
};
|
|
1352
1352
|
}
|
|
1353
1353
|
|
|
1354
|
-
// (
|
|
1354
|
+
// (272:4) {#if $$slots["no-results"] && !hideDropdown && value.length > 0 && results.length === 0}
|
|
1355
1355
|
function create_if_block(ctx) {
|
|
1356
1356
|
let div;
|
|
1357
1357
|
let current;
|
|
@@ -1416,7 +1416,7 @@ function create_fragment(ctx) {
|
|
|
1416
1416
|
let t1;
|
|
1417
1417
|
let ul_aria_labelledby_value;
|
|
1418
1418
|
let ul_id_value;
|
|
1419
|
-
let
|
|
1419
|
+
let div_aria_controls_value;
|
|
1420
1420
|
let div_id_value;
|
|
1421
1421
|
let current;
|
|
1422
1422
|
let mounted;
|
|
@@ -1495,7 +1495,7 @@ function create_fragment(ctx) {
|
|
|
1495
1495
|
attr(div, "data-svelte-typeahead", "");
|
|
1496
1496
|
attr(div, "role", "combobox");
|
|
1497
1497
|
attr(div, "aria-haspopup", "listbox");
|
|
1498
|
-
attr(div, "aria-
|
|
1498
|
+
attr(div, "aria-controls", div_aria_controls_value = "" + (/*id*/ ctx[2] + "-listbox"));
|
|
1499
1499
|
attr(div, "aria-expanded", /*showResults*/ ctx[7]);
|
|
1500
1500
|
attr(div, "id", div_id_value = "" + (/*id*/ ctx[2] + "-typeahead"));
|
|
1501
1501
|
attr(div, "class", "svelte-1t4elht");
|
|
@@ -1606,8 +1606,8 @@ function create_fragment(ctx) {
|
|
|
1606
1606
|
attr(ul, "id", ul_id_value);
|
|
1607
1607
|
}
|
|
1608
1608
|
|
|
1609
|
-
if (!current || dirty[0] & /*id*/ 4 &&
|
|
1610
|
-
attr(div, "aria-
|
|
1609
|
+
if (!current || dirty[0] & /*id*/ 4 && div_aria_controls_value !== (div_aria_controls_value = "" + (/*id*/ ctx[2] + "-listbox"))) {
|
|
1610
|
+
attr(div, "aria-controls", div_aria_controls_value);
|
|
1611
1611
|
}
|
|
1612
1612
|
|
|
1613
1613
|
if (!current || dirty[0] & /*showResults*/ 128) {
|
package/package.json
CHANGED
package/src/Typeahead.svelte
CHANGED
|
@@ -175,13 +175,12 @@
|
|
|
175
175
|
}}
|
|
176
176
|
/>
|
|
177
177
|
|
|
178
|
-
<!-- svelte-ignore a11y-role-has-required-aria-props -->
|
|
179
178
|
<div
|
|
180
179
|
data-svelte-typeahead
|
|
181
180
|
bind:this={comboboxRef}
|
|
182
181
|
role="combobox"
|
|
183
182
|
aria-haspopup="listbox"
|
|
184
|
-
aria-
|
|
183
|
+
aria-controls="{id}-listbox"
|
|
185
184
|
class:dropdown={results.length > 0}
|
|
186
185
|
aria-expanded={showResults}
|
|
187
186
|
id="{id}-typeahead"
|