@vaadin/a11y-base 25.3.0-rc1 → 25.3.1

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.3.0-rc1",
3
+ "version": "25.3.1",
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.3.0-rc1",
35
+ "@vaadin/component-base": "~25.3.1",
36
36
  "lit": "^3.0.0"
37
37
  },
38
38
  "devDependencies": {
39
- "@vaadin/chai-plugins": "25.3.0-rc1",
40
- "@vaadin/test-runner-commands": "25.3.0-rc1",
39
+ "@vaadin/chai-plugins": "~25.3.1",
40
+ "@vaadin/test-runner-commands": "~25.3.1",
41
41
  "@vaadin/testing-helpers": "^2.0.0",
42
42
  "sinon": "^22.0.0"
43
43
  },
44
44
  "customElements": "custom-elements.json",
45
- "gitHead": "d4809590b2f61bd607e376ab3dec84f4bfb059a7"
45
+ "gitHead": "a652d6071d7ad5add8465772f14f3efe633066a8"
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
  /**
@@ -82,6 +83,11 @@ const DelegateFocusMixinImplementation = (superclass) => {
82
83
  // Only forward the native option, `focusVisible` is handled below.
83
84
  this.focusElement.focus({ preventScroll: !!options?.preventScroll });
84
85
 
86
+ // Focus did not move, e.g. while hidden in a closed dialog
87
+ if (!isElementFocused(this.focusElement)) {
88
+ return;
89
+ }
90
+
85
91
  // Set focus-ring attribute on programmatic focus by default
86
92
  // unless explicitly disabled by `{ focusVisible: false }`.
87
93
  if (options?.focusVisible !== false) {