@vaadin/a11y-base 25.2.12 → 25.2.14

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.2.12",
3
+ "version": "25.2.14",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -32,15 +32,15 @@
32
32
  ],
33
33
  "dependencies": {
34
34
  "@open-wc/dedupe-mixin": "^1.3.0",
35
- "@vaadin/component-base": "~25.2.12",
35
+ "@vaadin/component-base": "~25.2.14",
36
36
  "lit": "^3.0.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@vaadin/chai-plugins": "~25.2.12",
40
- "@vaadin/test-runner-commands": "~25.2.12",
39
+ "@vaadin/chai-plugins": "~25.2.14",
40
+ "@vaadin/test-runner-commands": "~25.2.14",
41
41
  "@vaadin/testing-helpers": "^2.0.0",
42
42
  "sinon": "^22.0.0"
43
43
  },
44
44
  "customElements": "custom-elements.json",
45
- "gitHead": "7261133c2bc1c781f5b00037d896bac5443a4e00"
45
+ "gitHead": "7f2566cacb4ca4f83c44fbcc79776b4a3aa0823e"
46
46
  }
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import { dedupeMixin } from '@open-wc/dedupe-mixin';
7
7
  import { FocusMixin } from './focus-mixin.js';
8
+ import { isElementFocused } from './focus-utils.js';
8
9
  import { TabindexMixin } from './tabindex-mixin.js';
9
10
 
10
11
  /**
@@ -81,6 +82,11 @@ const DelegateFocusMixinImplementation = (superclass) => {
81
82
  if (this.focusElement && !this.disabled) {
82
83
  this.focusElement.focus();
83
84
 
85
+ // Focus did not move, e.g. while hidden in a closed dialog
86
+ if (!isElementFocused(this.focusElement)) {
87
+ return;
88
+ }
89
+
84
90
  // Set focus-ring attribute on programmatic focus by default
85
91
  // unless explicitly disabled by `{ focusVisible: false }`.
86
92
  if (options?.focusVisible !== false) {