@vaadin/overlay 25.0.0-alpha15 → 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/overlay",
3
- "version": "25.0.0-alpha15",
3
+ "version": "25.0.0-alpha16",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -33,17 +33,17 @@
33
33
  ],
34
34
  "dependencies": {
35
35
  "@open-wc/dedupe-mixin": "^1.3.0",
36
- "@vaadin/a11y-base": "25.0.0-alpha15",
37
- "@vaadin/component-base": "25.0.0-alpha15",
38
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha15",
36
+ "@vaadin/a11y-base": "25.0.0-alpha16",
37
+ "@vaadin/component-base": "25.0.0-alpha16",
38
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha16",
39
39
  "lit": "^3.0.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@vaadin/chai-plugins": "25.0.0-alpha15",
43
- "@vaadin/test-runner-commands": "25.0.0-alpha15",
42
+ "@vaadin/chai-plugins": "25.0.0-alpha16",
43
+ "@vaadin/test-runner-commands": "25.0.0-alpha16",
44
44
  "@vaadin/testing-helpers": "^2.0.0",
45
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha15",
45
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha16",
46
46
  "sinon": "^18.0.0"
47
47
  },
48
- "gitHead": "1ad98437e7600769bf66f870929feefbeef16edf"
48
+ "gitHead": "4b316158a4a4f702f032bc9940fc82f0faa840f4"
49
49
  }
@@ -3,7 +3,6 @@
3
3
  * Copyright (c) 2017 - 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 { AriaModalController } from '@vaadin/a11y-base/src/aria-modal-controller.js';
7
6
  import { FocusRestorationController } from '@vaadin/a11y-base/src/focus-restoration-controller.js';
8
7
  import { FocusTrapController } from '@vaadin/a11y-base/src/focus-trap-controller.js';
9
8
  import { getDeepActiveElement, isKeyboardActive } from '@vaadin/a11y-base/src/focus-utils.js';
@@ -48,7 +47,6 @@ export const OverlayFocusMixin = (superClass) =>
48
47
  constructor() {
49
48
  super();
50
49
 
51
- this.__ariaModalController = new AriaModalController(this, () => this._modalRoot);
52
50
  this.__focusTrapController = new FocusTrapController(this);
53
51
  this.__focusRestorationController = new FocusRestorationController();
54
52
  }
@@ -66,20 +64,10 @@ export const OverlayFocusMixin = (superClass) =>
66
64
  ready() {
67
65
  super.ready();
68
66
 
69
- this.addController(this.__ariaModalController);
70
67
  this.addController(this.__focusTrapController);
71
68
  this.addController(this.__focusRestorationController);
72
69
  }
73
70
 
74
- /**
75
- * Override to specify another element used as a modality root,
76
- * e.g. the overlay's owner element, rather than overlay itself.
77
- * @protected
78
- */
79
- get _modalRoot() {
80
- return this;
81
- }
82
-
83
71
  /**
84
72
  * Override to specify another element used as a focus trap root,
85
73
  * e.g. the overlay's owner element, rather than overlay part.
@@ -89,15 +77,6 @@ export const OverlayFocusMixin = (superClass) =>
89
77
  return this.$.overlay;
90
78
  }
91
79
 
92
- /**
93
- * Override not use a controller for setting `aria-hidden` on
94
- * elements outside the overlay, e.g. when using `aria-modal`.
95
- * @protected
96
- */
97
- _useAriaHidden() {
98
- return true;
99
- }
100
-
101
80
  /**
102
81
  * Release focus and restore focus after the overlay is closed.
103
82
  *
@@ -105,9 +84,6 @@ export const OverlayFocusMixin = (superClass) =>
105
84
  */
106
85
  _resetFocus() {
107
86
  if (this.focusTrap) {
108
- if (this._useAriaHidden) {
109
- this.__ariaModalController.close();
110
- }
111
87
  this.__focusTrapController.releaseFocus();
112
88
  }
113
89
 
@@ -135,9 +111,6 @@ export const OverlayFocusMixin = (superClass) =>
135
111
  */
136
112
  _trapFocus() {
137
113
  if (this.focusTrap) {
138
- if (this._useAriaHidden) {
139
- this.__ariaModalController.showModal();
140
- }
141
114
  this.__focusTrapController.trapFocus(this._focusTrapRoot);
142
115
  }
143
116
  }
@@ -156,6 +156,11 @@ export const OverlayMixin = (superClass) =>
156
156
  disconnectedCallback() {
157
157
  super.disconnectedCallback();
158
158
 
159
+ if (this.__scheduledOpen) {
160
+ cancelAnimationFrame(this.__scheduledOpen);
161
+ this.__scheduledOpen = null;
162
+ }
163
+
159
164
  /* c8 ignore next 3 */
160
165
  if (this._boundIosResizeListener) {
161
166
  window.removeEventListener('resize', this._boundIosResizeListener);
@@ -552,7 +557,7 @@ export const OverlayMixin = (superClass) =>
552
557
  }
553
558
 
554
559
  // Only close modeless overlay on Esc press when it contains focus
555
- if (!this._shouldAddGlobalListeners() && !event.composedPath().includes(this.$.overlay)) {
560
+ if (!this._shouldAddGlobalListeners() && !event.composedPath().includes(this._focusTrapRoot)) {
556
561
  return;
557
562
  }
558
563