@vaadin/app-layout 24.1.0 → 24.1.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 +10 -10
- package/src/vaadin-app-layout.js +9 -0
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/app-layout",
|
|
3
|
-
"version": "24.1.
|
|
3
|
+
"version": "24.1.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -36,22 +36,22 @@
|
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@polymer/polymer": "^3.0.0",
|
|
39
|
-
"@vaadin/a11y-base": "~24.1.
|
|
40
|
-
"@vaadin/button": "~24.1.
|
|
41
|
-
"@vaadin/component-base": "~24.1.
|
|
42
|
-
"@vaadin/vaadin-lumo-styles": "~24.1.
|
|
43
|
-
"@vaadin/vaadin-material-styles": "~24.1.
|
|
44
|
-
"@vaadin/vaadin-themable-mixin": "~24.1.
|
|
39
|
+
"@vaadin/a11y-base": "~24.1.1",
|
|
40
|
+
"@vaadin/button": "~24.1.1",
|
|
41
|
+
"@vaadin/component-base": "~24.1.1",
|
|
42
|
+
"@vaadin/vaadin-lumo-styles": "~24.1.1",
|
|
43
|
+
"@vaadin/vaadin-material-styles": "~24.1.1",
|
|
44
|
+
"@vaadin/vaadin-themable-mixin": "~24.1.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@esm-bundle/chai": "^4.3.4",
|
|
48
|
-
"@vaadin/tabs": "~24.1.
|
|
49
|
-
"@vaadin/testing-helpers": "^0.4.
|
|
48
|
+
"@vaadin/tabs": "~24.1.1",
|
|
49
|
+
"@vaadin/testing-helpers": "^0.4.2",
|
|
50
50
|
"sinon": "^13.0.2"
|
|
51
51
|
},
|
|
52
52
|
"web-types": [
|
|
53
53
|
"web-types.json",
|
|
54
54
|
"web-types.lit.json"
|
|
55
55
|
],
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "c3a3d904885bd37ebb07a84b09617a340b4fab7e"
|
|
57
57
|
}
|
package/src/vaadin-app-layout.js
CHANGED
|
@@ -8,6 +8,7 @@ import './detect-ios-navbar.js';
|
|
|
8
8
|
import { FlattenedNodesObserver } from '@polymer/polymer/lib/utils/flattened-nodes-observer.js';
|
|
9
9
|
import { afterNextRender, beforeNextRender } from '@polymer/polymer/lib/utils/render-status.js';
|
|
10
10
|
import { html, PolymerElement } from '@polymer/polymer/polymer-element.js';
|
|
11
|
+
import { AriaModalController } from '@vaadin/a11y-base/src/aria-modal-controller.js';
|
|
11
12
|
import { FocusTrapController } from '@vaadin/a11y-base/src/focus-trap-controller.js';
|
|
12
13
|
import { ControllerMixin } from '@vaadin/component-base/src/controller-mixin.js';
|
|
13
14
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
@@ -401,6 +402,11 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
|
|
|
401
402
|
this.__closeOverlayDrawerListener = this.__closeOverlayDrawer.bind(this);
|
|
402
403
|
this.__trapFocusInDrawer = this.__trapFocusInDrawer.bind(this);
|
|
403
404
|
this.__releaseFocusFromDrawer = this.__releaseFocusFromDrawer.bind(this);
|
|
405
|
+
|
|
406
|
+
// Hide all the elements except the drawer toggle and drawer content
|
|
407
|
+
this.__ariaModalController = new AriaModalController(this, () => [
|
|
408
|
+
...this.querySelectorAll('vaadin-drawer-toggle, [slot="drawer"]'),
|
|
409
|
+
]);
|
|
404
410
|
this.__focusTrapController = new FocusTrapController(this);
|
|
405
411
|
}
|
|
406
412
|
|
|
@@ -661,6 +667,8 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
|
|
|
661
667
|
}
|
|
662
668
|
|
|
663
669
|
this.$.drawer.setAttribute('tabindex', '0');
|
|
670
|
+
|
|
671
|
+
this.__ariaModalController.showModal();
|
|
664
672
|
this.__focusTrapController.trapFocus(this.$.drawer);
|
|
665
673
|
}
|
|
666
674
|
|
|
@@ -675,6 +683,7 @@ class AppLayout extends ElementMixin(ThemableMixin(ControllerMixin(PolymerElemen
|
|
|
675
683
|
return;
|
|
676
684
|
}
|
|
677
685
|
|
|
686
|
+
this.__ariaModalController.close();
|
|
678
687
|
this.__focusTrapController.releaseFocus();
|
|
679
688
|
this.$.drawer.removeAttribute('tabindex');
|
|
680
689
|
|
package/web-types.json
CHANGED