@vaadin/a11y-base 25.0.0-beta1 → 25.0.0-beta2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/a11y-base",
|
|
3
|
-
"version": "25.0.0-
|
|
3
|
+
"version": "25.0.0-beta2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
34
|
-
"@vaadin/component-base": "25.0.0-
|
|
34
|
+
"@vaadin/component-base": "25.0.0-beta2",
|
|
35
35
|
"lit": "^3.0.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@vaadin/chai-plugins": "25.0.0-
|
|
39
|
-
"@vaadin/test-runner-commands": "25.0.0-
|
|
38
|
+
"@vaadin/chai-plugins": "25.0.0-beta2",
|
|
39
|
+
"@vaadin/test-runner-commands": "25.0.0-beta2",
|
|
40
40
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
41
41
|
"sinon": "^21.0.0"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "e078f8371ae266f05c7ca1ec25686cc489c83f24"
|
|
44
44
|
}
|
|
@@ -44,15 +44,23 @@ export const KeyboardDirectionMixin = (superclass) =>
|
|
|
44
44
|
* @override
|
|
45
45
|
*/
|
|
46
46
|
focus(options) {
|
|
47
|
-
const
|
|
48
|
-
if (
|
|
49
|
-
|
|
50
|
-
if (idx >= 0) {
|
|
51
|
-
this._focus(idx, options);
|
|
52
|
-
}
|
|
47
|
+
const idx = this._getFocusableIndex();
|
|
48
|
+
if (idx >= 0) {
|
|
49
|
+
this._focus(idx, options);
|
|
53
50
|
}
|
|
54
51
|
}
|
|
55
52
|
|
|
53
|
+
/**
|
|
54
|
+
* Get the index of a first focusable item, if any.
|
|
55
|
+
*
|
|
56
|
+
* @return {Element[]}
|
|
57
|
+
* @protected
|
|
58
|
+
*/
|
|
59
|
+
_getFocusableIndex() {
|
|
60
|
+
const items = this._getItems();
|
|
61
|
+
return Array.isArray(items) ? this._getAvailableIndex(items, 0, null, (item) => !isElementHidden(item)) : -1;
|
|
62
|
+
}
|
|
63
|
+
|
|
56
64
|
/**
|
|
57
65
|
* Get the list of items participating in keyboard navigation.
|
|
58
66
|
* By default, it treats all the light DOM children as items.
|