@vaadin/a11y-base 24.3.9 → 24.3.11
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 +3 -3
- package/src/keyboard-direction-mixin.js +1 -1
- package/src/list-mixin.js +10 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/a11y-base",
|
|
3
|
-
"version": "24.3.
|
|
3
|
+
"version": "24.3.11",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
34
34
|
"@polymer/polymer": "^3.0.0",
|
|
35
|
-
"@vaadin/component-base": "~24.3.
|
|
35
|
+
"@vaadin/component-base": "~24.3.11",
|
|
36
36
|
"lit": "^3.0.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"@vaadin/testing-helpers": "^0.6.0",
|
|
41
41
|
"sinon": "^13.0.2"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "890abeb0937416074456782aa90ed92c1bfe9cac"
|
|
44
44
|
}
|
package/src/list-mixin.js
CHANGED
|
@@ -8,6 +8,7 @@ import { Debouncer } from '@vaadin/component-base/src/debounce.js';
|
|
|
8
8
|
import { getNormalizedScrollLeft, setNormalizedScrollLeft } from '@vaadin/component-base/src/dir-utils.js';
|
|
9
9
|
import { getFlattenedElements } from '@vaadin/component-base/src/dom-utils.js';
|
|
10
10
|
import { SlotObserver } from '@vaadin/component-base/src/slot-observer.js';
|
|
11
|
+
import { isElementHidden } from './focus-utils.js';
|
|
11
12
|
import { KeyboardDirectionMixin } from './keyboard-direction-mixin.js';
|
|
12
13
|
|
|
13
14
|
/**
|
|
@@ -117,8 +118,15 @@ export const ListMixin = (superClass) =>
|
|
|
117
118
|
if (this._observer) {
|
|
118
119
|
this._observer.flush();
|
|
119
120
|
}
|
|
120
|
-
|
|
121
|
-
this.
|
|
121
|
+
|
|
122
|
+
const items = Array.isArray(this.items) ? this.items : [];
|
|
123
|
+
const idx = this._getAvailableIndex(items, 0, null, (item) => item.tabIndex === 0 && !isElementHidden(item));
|
|
124
|
+
if (idx >= 0) {
|
|
125
|
+
this._focus(idx);
|
|
126
|
+
} else {
|
|
127
|
+
// Call `KeyboardDirectionMixin` logic to focus first non-disabled item.
|
|
128
|
+
super.focus();
|
|
129
|
+
}
|
|
122
130
|
}
|
|
123
131
|
|
|
124
132
|
/** @protected */
|