@y14e/tabs 1.5.0 → 1.5.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/dist/index.cjs +16 -5
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +16 -5
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -183,6 +183,10 @@ function getFocusables(container = document.body, options = {}) {
|
|
|
183
183
|
);
|
|
184
184
|
include = void 0;
|
|
185
185
|
}
|
|
186
|
+
if (typeof skipVisibilityCheck !== "boolean") {
|
|
187
|
+
console.warn("Invalid skipVisibilityCheck option. Fallback: false.");
|
|
188
|
+
skipVisibilityCheck = false;
|
|
189
|
+
}
|
|
186
190
|
const elements = [];
|
|
187
191
|
if (composed || include) {
|
|
188
192
|
let traverse2 = function(node) {
|
|
@@ -382,6 +386,7 @@ function createRovingTabIndex(container, options = {}) {
|
|
|
382
386
|
direction,
|
|
383
387
|
navigationOnly = false,
|
|
384
388
|
selector,
|
|
389
|
+
skipVisibilityCheck = false,
|
|
385
390
|
typeahead = false,
|
|
386
391
|
wrap = false
|
|
387
392
|
} = options;
|
|
@@ -399,6 +404,10 @@ function createRovingTabIndex(container, options = {}) {
|
|
|
399
404
|
);
|
|
400
405
|
selector = void 0;
|
|
401
406
|
}
|
|
407
|
+
if (typeof skipVisibilityCheck !== "boolean") {
|
|
408
|
+
console.warn("Invalid skipVisibilityCheck option. Fallback: false.");
|
|
409
|
+
skipVisibilityCheck = false;
|
|
410
|
+
}
|
|
402
411
|
if (typeof typeahead !== "boolean") {
|
|
403
412
|
console.warn("Invalid typeahead option. Fallback: false.");
|
|
404
413
|
typeahead = false;
|
|
@@ -411,6 +420,7 @@ function createRovingTabIndex(container, options = {}) {
|
|
|
411
420
|
direction,
|
|
412
421
|
navigationOnly,
|
|
413
422
|
selector,
|
|
423
|
+
skipVisibilityCheck,
|
|
414
424
|
typeahead,
|
|
415
425
|
wrap
|
|
416
426
|
});
|
|
@@ -524,7 +534,7 @@ var RovingTabIndex = class {
|
|
|
524
534
|
...getFocusables(this.#container, {
|
|
525
535
|
composed: true,
|
|
526
536
|
filter: this.#selectorFilter,
|
|
527
|
-
skipVisibilityCheck:
|
|
537
|
+
skipVisibilityCheck: !!this.#options.skipVisibilityCheck
|
|
528
538
|
})
|
|
529
539
|
]);
|
|
530
540
|
for (const focusable of this.#focusables) {
|
|
@@ -591,7 +601,7 @@ var RovingTabIndex = class {
|
|
|
591
601
|
composed: true,
|
|
592
602
|
filter: this.#selectorFilter,
|
|
593
603
|
include: (element) => this.#focusables.has(element),
|
|
594
|
-
skipVisibilityCheck:
|
|
604
|
+
skipVisibilityCheck: !!this.#options.skipVisibilityCheck
|
|
595
605
|
});
|
|
596
606
|
}
|
|
597
607
|
};
|
|
@@ -959,6 +969,7 @@ var Tabs = class _Tabs {
|
|
|
959
969
|
createRovingTabIndex(list, {
|
|
960
970
|
direction: list.ariaOrientation === "undefined" ? void 0 : this.#settings.vertical ? "vertical" : "horizontal",
|
|
961
971
|
selector: this.#settings.selector.tab,
|
|
972
|
+
skipVisibilityCheck: true,
|
|
962
973
|
wrap: true
|
|
963
974
|
})
|
|
964
975
|
);
|
|
@@ -1129,7 +1140,7 @@ function isFocusable2(element) {
|
|
|
1129
1140
|
* Tabs
|
|
1130
1141
|
* WAI-ARIA compliant tabs pattern implementation in TypeScript.
|
|
1131
1142
|
*
|
|
1132
|
-
* @version 1.5.
|
|
1143
|
+
* @version 1.5.1
|
|
1133
1144
|
* @author Yusuke Kamiyamane
|
|
1134
1145
|
* @license MIT
|
|
1135
1146
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
|
@@ -1165,7 +1176,7 @@ function isFocusable2(element) {
|
|
|
1165
1176
|
* Lightweight roving tabindex utility with fully focus management.
|
|
1166
1177
|
* Designed for accessible menus, tabs, toolbars, and composite widgets.
|
|
1167
1178
|
*
|
|
1168
|
-
* @version 1.3.
|
|
1179
|
+
* @version 1.3.2
|
|
1169
1180
|
* @author Yusuke Kamiyamane
|
|
1170
1181
|
* @license MIT
|
|
1171
1182
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
|
@@ -1190,7 +1201,7 @@ function isFocusable2(element) {
|
|
|
1190
1201
|
* High-precision focus management utility with full composed tree support.
|
|
1191
1202
|
* Handles complex focus rules including tabindex ordering, radio groups, inert.
|
|
1192
1203
|
*
|
|
1193
|
-
* @version 4.2.
|
|
1204
|
+
* @version 4.2.1
|
|
1194
1205
|
* @author Yusuke Kamiyamane
|
|
1195
1206
|
* @license MIT
|
|
1196
1207
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -181,6 +181,10 @@ function getFocusables(container = document.body, options = {}) {
|
|
|
181
181
|
);
|
|
182
182
|
include = void 0;
|
|
183
183
|
}
|
|
184
|
+
if (typeof skipVisibilityCheck !== "boolean") {
|
|
185
|
+
console.warn("Invalid skipVisibilityCheck option. Fallback: false.");
|
|
186
|
+
skipVisibilityCheck = false;
|
|
187
|
+
}
|
|
184
188
|
const elements = [];
|
|
185
189
|
if (composed || include) {
|
|
186
190
|
let traverse2 = function(node) {
|
|
@@ -380,6 +384,7 @@ function createRovingTabIndex(container, options = {}) {
|
|
|
380
384
|
direction,
|
|
381
385
|
navigationOnly = false,
|
|
382
386
|
selector,
|
|
387
|
+
skipVisibilityCheck = false,
|
|
383
388
|
typeahead = false,
|
|
384
389
|
wrap = false
|
|
385
390
|
} = options;
|
|
@@ -397,6 +402,10 @@ function createRovingTabIndex(container, options = {}) {
|
|
|
397
402
|
);
|
|
398
403
|
selector = void 0;
|
|
399
404
|
}
|
|
405
|
+
if (typeof skipVisibilityCheck !== "boolean") {
|
|
406
|
+
console.warn("Invalid skipVisibilityCheck option. Fallback: false.");
|
|
407
|
+
skipVisibilityCheck = false;
|
|
408
|
+
}
|
|
400
409
|
if (typeof typeahead !== "boolean") {
|
|
401
410
|
console.warn("Invalid typeahead option. Fallback: false.");
|
|
402
411
|
typeahead = false;
|
|
@@ -409,6 +418,7 @@ function createRovingTabIndex(container, options = {}) {
|
|
|
409
418
|
direction,
|
|
410
419
|
navigationOnly,
|
|
411
420
|
selector,
|
|
421
|
+
skipVisibilityCheck,
|
|
412
422
|
typeahead,
|
|
413
423
|
wrap
|
|
414
424
|
});
|
|
@@ -522,7 +532,7 @@ var RovingTabIndex = class {
|
|
|
522
532
|
...getFocusables(this.#container, {
|
|
523
533
|
composed: true,
|
|
524
534
|
filter: this.#selectorFilter,
|
|
525
|
-
skipVisibilityCheck:
|
|
535
|
+
skipVisibilityCheck: !!this.#options.skipVisibilityCheck
|
|
526
536
|
})
|
|
527
537
|
]);
|
|
528
538
|
for (const focusable of this.#focusables) {
|
|
@@ -589,7 +599,7 @@ var RovingTabIndex = class {
|
|
|
589
599
|
composed: true,
|
|
590
600
|
filter: this.#selectorFilter,
|
|
591
601
|
include: (element) => this.#focusables.has(element),
|
|
592
|
-
skipVisibilityCheck:
|
|
602
|
+
skipVisibilityCheck: !!this.#options.skipVisibilityCheck
|
|
593
603
|
});
|
|
594
604
|
}
|
|
595
605
|
};
|
|
@@ -957,6 +967,7 @@ var Tabs = class _Tabs {
|
|
|
957
967
|
createRovingTabIndex(list, {
|
|
958
968
|
direction: list.ariaOrientation === "undefined" ? void 0 : this.#settings.vertical ? "vertical" : "horizontal",
|
|
959
969
|
selector: this.#settings.selector.tab,
|
|
970
|
+
skipVisibilityCheck: true,
|
|
960
971
|
wrap: true
|
|
961
972
|
})
|
|
962
973
|
);
|
|
@@ -1127,7 +1138,7 @@ function isFocusable2(element) {
|
|
|
1127
1138
|
* Tabs
|
|
1128
1139
|
* WAI-ARIA compliant tabs pattern implementation in TypeScript.
|
|
1129
1140
|
*
|
|
1130
|
-
* @version 1.5.
|
|
1141
|
+
* @version 1.5.1
|
|
1131
1142
|
* @author Yusuke Kamiyamane
|
|
1132
1143
|
* @license MIT
|
|
1133
1144
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
|
@@ -1163,7 +1174,7 @@ function isFocusable2(element) {
|
|
|
1163
1174
|
* Lightweight roving tabindex utility with fully focus management.
|
|
1164
1175
|
* Designed for accessible menus, tabs, toolbars, and composite widgets.
|
|
1165
1176
|
*
|
|
1166
|
-
* @version 1.3.
|
|
1177
|
+
* @version 1.3.2
|
|
1167
1178
|
* @author Yusuke Kamiyamane
|
|
1168
1179
|
* @license MIT
|
|
1169
1180
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
|
@@ -1188,7 +1199,7 @@ function isFocusable2(element) {
|
|
|
1188
1199
|
* High-precision focus management utility with full composed tree support.
|
|
1189
1200
|
* Handles complex focus rules including tabindex ordering, radio groups, inert.
|
|
1190
1201
|
*
|
|
1191
|
-
* @version 4.2.
|
|
1202
|
+
* @version 4.2.1
|
|
1192
1203
|
* @author Yusuke Kamiyamane
|
|
1193
1204
|
* @license MIT
|
|
1194
1205
|
* @copyright Copyright (c) Yusuke Kamiyamane
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@y14e/tabs",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "WAI-ARIA compliant tabs pattern implementation in TypeScript",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@y14e/attributes-utils": "^1.0.5",
|
|
46
46
|
"@y14e/button": "^1.0.0",
|
|
47
|
-
"@y14e/roving-tabindex": "^1.3.
|
|
47
|
+
"@y14e/roving-tabindex": "^1.3.2",
|
|
48
48
|
"bun-types": "latest",
|
|
49
49
|
"tsup": "^8.0.0",
|
|
50
50
|
"typescript": "^5.6.0",
|