@vaadin/a11y-base 25.0.0-alpha15 → 25.0.0-alpha17
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-alpha17",
|
|
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-alpha17",
|
|
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-alpha17",
|
|
39
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha17",
|
|
40
40
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
41
|
-
"sinon": "^
|
|
41
|
+
"sinon": "^21.0.0"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "8264c71309907be99368b09414f0f8d7f591e0b9"
|
|
44
44
|
}
|
package/src/aria-hidden.js
CHANGED
|
@@ -115,7 +115,7 @@ const applyAttributeToOthers = (originalTarget, parentNode, markerName, controlA
|
|
|
115
115
|
targets.forEach(keep);
|
|
116
116
|
|
|
117
117
|
/**
|
|
118
|
-
* @param {?Node}
|
|
118
|
+
* @param {?Node} parent
|
|
119
119
|
*/
|
|
120
120
|
const deep = (parent) => {
|
|
121
121
|
if (!parent || elementsToStop.has(parent)) {
|
package/src/aria-id-reference.js
CHANGED
|
@@ -17,7 +17,7 @@ const attributeToTargets = new Map();
|
|
|
17
17
|
*
|
|
18
18
|
* @param {string} attr the attribute name used as key in the map
|
|
19
19
|
*
|
|
20
|
-
* @
|
|
20
|
+
* @return {WeakMap<HTMLElement, Set<string>>} a weak map with the stored values for the elements being controlled by the helper
|
|
21
21
|
*/
|
|
22
22
|
function getAttrMap(attr) {
|
|
23
23
|
if (!attributeToTargets.has(attr)) {
|
|
@@ -32,8 +32,6 @@ function getAttrMap(attr) {
|
|
|
32
32
|
*
|
|
33
33
|
* @param {HTMLElement} target
|
|
34
34
|
* @param {string} attr the attribute to be cleared
|
|
35
|
-
* @param {boolean} storeValue whether or not the current value of the attribute should be stored on the map
|
|
36
|
-
* @returns
|
|
37
35
|
*/
|
|
38
36
|
function cleanAriaIDReference(target, attr) {
|
|
39
37
|
if (!target) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
4
4
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
5
|
*/
|
|
6
|
-
import { getFocusableElements, isElementFocused } from './focus-utils.js';
|
|
6
|
+
import { getFocusableElements, isElementFocused, isKeyboardActive } from './focus-utils.js';
|
|
7
7
|
|
|
8
8
|
const instances = [];
|
|
9
9
|
|
|
@@ -87,7 +87,7 @@ export class FocusTrapController {
|
|
|
87
87
|
instances.push(this);
|
|
88
88
|
|
|
89
89
|
if (this.__focusedElementIndex === -1) {
|
|
90
|
-
this.__focusableElements[0].focus();
|
|
90
|
+
this.__focusableElements[0].focus({ focusVisible: isKeyboardActive() });
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
@@ -147,7 +147,7 @@ export class FocusTrapController {
|
|
|
147
147
|
const currentIndex = this.__focusedElementIndex;
|
|
148
148
|
const nextIndex = (focusableElements.length + currentIndex + step) % focusableElements.length;
|
|
149
149
|
const element = focusableElements[nextIndex];
|
|
150
|
-
element.focus();
|
|
150
|
+
element.focus({ focusVisible: true });
|
|
151
151
|
if (element.localName === 'input') {
|
|
152
152
|
element.select();
|
|
153
153
|
}
|
package/src/list-mixin.d.ts
CHANGED
|
@@ -36,15 +36,9 @@ export declare class ListMixinClass {
|
|
|
36
36
|
orientation: 'horizontal' | 'vertical';
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* A read-only list of items from which a selection can be made.
|
|
40
40
|
* It is populated from the elements passed to the light DOM,
|
|
41
41
|
* and updated dynamically when adding or removing items.
|
|
42
|
-
*
|
|
43
|
-
* The item elements must implement `Vaadin.ItemMixin`.
|
|
44
|
-
*
|
|
45
|
-
* Note: unlike `<vaadin-combo-box>`, this property is read-only,
|
|
46
|
-
* so if you want to provide items by iterating array of data,
|
|
47
|
-
* you have to use `dom-repeat` and place it to the light DOM.
|
|
48
42
|
*/
|
|
49
43
|
readonly items: Element[] | undefined;
|
|
50
44
|
|
package/src/list-mixin.js
CHANGED
|
@@ -56,15 +56,9 @@ export const ListMixin = (superClass) =>
|
|
|
56
56
|
},
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
* A read-only list of items from which a selection can be made.
|
|
60
60
|
* It is populated from the elements passed to the light DOM,
|
|
61
61
|
* and updated dynamically when adding or removing items.
|
|
62
|
-
*
|
|
63
|
-
* The item elements must implement `Vaadin.ItemMixin`.
|
|
64
|
-
*
|
|
65
|
-
* Note: unlike `<vaadin-combo-box>`, this property is read-only,
|
|
66
|
-
* so if you want to provide items by iterating array of data,
|
|
67
|
-
* you have to use `dom-repeat` and place it to the light DOM.
|
|
68
62
|
* @type {!Array<!Element> | undefined}
|
|
69
63
|
*/
|
|
70
64
|
items: {
|