@vaadin/a11y-base 25.0.0-alpha14 → 25.0.0-alpha16
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-alpha16",
|
|
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-alpha16",
|
|
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-alpha16",
|
|
39
|
+
"@vaadin/test-runner-commands": "25.0.0-alpha16",
|
|
40
40
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
41
41
|
"sinon": "^18.0.0"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "4b316158a4a4f702f032bc9940fc82f0faa840f4"
|
|
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
|
}
|