@vaadin/a11y-base 24.7.0-alpha9 → 24.7.0-beta1
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 +5 -5
- package/src/focus-utils.js +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/a11y-base",
|
|
3
|
-
"version": "24.7.0-
|
|
3
|
+
"version": "24.7.0-beta1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
34
34
|
"@polymer/polymer": "^3.0.0",
|
|
35
|
-
"@vaadin/component-base": "24.7.0-
|
|
35
|
+
"@vaadin/component-base": "24.7.0-beta1",
|
|
36
36
|
"lit": "^3.0.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@vaadin/chai-plugins": "24.7.0-
|
|
40
|
-
"@vaadin/test-runner-commands": "24.7.0-
|
|
39
|
+
"@vaadin/chai-plugins": "24.7.0-beta1",
|
|
40
|
+
"@vaadin/test-runner-commands": "24.7.0-beta1",
|
|
41
41
|
"@vaadin/testing-helpers": "^1.1.0",
|
|
42
42
|
"sinon": "^18.0.0"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "4043c518ef9b915cde612d2907ddc9bd10e5af17"
|
|
45
45
|
}
|
package/src/focus-utils.js
CHANGED
|
@@ -145,6 +145,13 @@ function sortElementsByTabIndex(elements) {
|
|
|
145
145
|
* @return {boolean}
|
|
146
146
|
*/
|
|
147
147
|
export function isElementHidden(element) {
|
|
148
|
+
if (element.checkVisibility) {
|
|
149
|
+
return !element.checkVisibility({ visibilityProperty: true });
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// TODO: checkVisibility is supported only from Safari 17.4, so we still need to
|
|
153
|
+
// keep the custom implementation as a fallback for older versions until Vaadin 25:
|
|
154
|
+
|
|
148
155
|
// `offsetParent` is `null` when the element itself
|
|
149
156
|
// or one of its ancestors is hidden with `display: none`.
|
|
150
157
|
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent
|