@vaadin/dialog 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/dialog",
3
- "version": "25.0.0-alpha15",
3
+ "version": "25.0.0-alpha16",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,23 +36,23 @@
36
36
  ],
37
37
  "dependencies": {
38
38
  "@open-wc/dedupe-mixin": "^1.3.0",
39
- "@vaadin/component-base": "25.0.0-alpha15",
40
- "@vaadin/lit-renderer": "25.0.0-alpha15",
41
- "@vaadin/overlay": "25.0.0-alpha15",
42
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha15",
39
+ "@vaadin/component-base": "25.0.0-alpha16",
40
+ "@vaadin/lit-renderer": "25.0.0-alpha16",
41
+ "@vaadin/overlay": "25.0.0-alpha16",
42
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha16",
43
43
  "lit": "^3.0.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@vaadin/a11y-base": "25.0.0-alpha15",
47
- "@vaadin/chai-plugins": "25.0.0-alpha15",
48
- "@vaadin/test-runner-commands": "25.0.0-alpha15",
46
+ "@vaadin/a11y-base": "25.0.0-alpha16",
47
+ "@vaadin/chai-plugins": "25.0.0-alpha16",
48
+ "@vaadin/test-runner-commands": "25.0.0-alpha16",
49
49
  "@vaadin/testing-helpers": "^2.0.0",
50
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha15",
50
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha16",
51
51
  "sinon": "^18.0.0"
52
52
  },
53
53
  "web-types": [
54
54
  "web-types.json",
55
55
  "web-types.lit.json"
56
56
  ],
57
- "gitHead": "1ad98437e7600769bf66f870929feefbeef16edf"
57
+ "gitHead": "4b316158a4a4f702f032bc9940fc82f0faa840f4"
58
58
  }
@@ -105,6 +105,8 @@ export const DialogBaseMixin = (superClass) =>
105
105
  if (!this.hasAttribute('role')) {
106
106
  this.role = 'dialog';
107
107
  }
108
+
109
+ this.setAttribute('tabindex', '0');
108
110
  }
109
111
 
110
112
  /** @protected */
@@ -114,6 +116,14 @@ export const DialogBaseMixin = (superClass) =>
114
116
  if (props.has('overlayRole')) {
115
117
  this.role = this.overlayRole || 'dialog';
116
118
  }
119
+
120
+ if (props.has('modeless')) {
121
+ if (!this.modeless) {
122
+ this.setAttribute('aria-modal', 'true');
123
+ } else {
124
+ this.removeAttribute('aria-modal');
125
+ }
126
+ }
117
127
  }
118
128
 
119
129
  /** @private */
@@ -53,15 +53,6 @@ export const DialogOverlayMixin = (superClass) =>
53
53
  return this.owner;
54
54
  }
55
55
 
56
- /**
57
- * Override method from OverlayFocusMixin to use owner as modal root
58
- * @protected
59
- * @override
60
- */
61
- get _modalRoot() {
62
- return this.owner;
63
- }
64
-
65
56
  /** @protected */
66
57
  ready() {
67
58
  super.ready();
@@ -33,11 +33,20 @@ export class DialogOverlay extends DialogOverlayMixin(
33
33
  return dialogOverlayStyles;
34
34
  }
35
35
 
36
+ /**
37
+ * Override method from OverlayFocusMixin to use owner as focus trap root
38
+ * @protected
39
+ * @override
40
+ */
41
+ get _focusTrapRoot() {
42
+ return this.owner;
43
+ }
44
+
36
45
  /** @protected */
37
46
  render() {
38
47
  return html`
39
48
  <div id="backdrop" part="backdrop" ?hidden="${!this.withBackdrop}"></div>
40
- <div part="overlay" id="overlay" tabindex="0">
49
+ <div part="overlay" id="overlay">
41
50
  <section id="resizerContainer" class="resizer-container">
42
51
  <header part="header">
43
52
  <div part="title"><slot name="title"></slot></div>
@@ -101,13 +101,19 @@ class Dialog extends DialogSizeMixin(
101
101
  :host([opened]),
102
102
  :host([opening]),
103
103
  :host([closing]) {
104
- display: contents !important;
104
+ display: block !important;
105
+ position: absolute;
106
+ outline: none;
105
107
  }
106
108
 
107
109
  :host,
108
110
  :host([hidden]) {
109
111
  display: none !important;
110
112
  }
113
+
114
+ :host(:focus) ::part(overlay) {
115
+ outline: var(--vaadin-focus-ring-width) solid var(--vaadin-focus-ring-color);
116
+ }
111
117
  `;
112
118
  }
113
119
 
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/dialog",
4
- "version": "25.0.0-alpha15",
4
+ "version": "25.0.0-alpha16",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/dialog",
4
- "version": "25.0.0-alpha15",
4
+ "version": "25.0.0-alpha16",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {