diff --git a/packages/ui/components/overlays/test/OverlayController.test.js b/packages/ui/components/overlays/test/OverlayController.test.js index 9c5c01cf4..ab6755fa3 100644 --- a/packages/ui/components/overlays/test/OverlayController.test.js +++ b/packages/ui/components/overlays/test/OverlayController.test.js @@ -1528,6 +1528,23 @@ describe('OverlayController', () => { expect(ctrl.invokerNode?.getAttribute('aria-expanded')).to.equal('false'); }); + it('synchronizes [aria-expanded] on invoker when the overlay is modal', async () => { + const invokerNode = /** @type {HTMLElement} */ ( + await fixture('
invoker
') + ); + const ctrl = new OverlayController({ + ...withLocalTestConfig(), + hasBackdrop: true, + handlesAccessibility: true, + invokerNode, + }); + expect(ctrl.invokerNode?.getAttribute('aria-expanded')).to.equal(null); + await ctrl.show(); + expect(ctrl.invokerNode?.getAttribute('aria-expanded')).to.equal(null); + await ctrl.hide(); + expect(ctrl.invokerNode?.getAttribute('aria-expanded')).to.equal(null); + }); + it('creates unique id for content', async () => { const ctrl = new OverlayController({ ...withLocalTestConfig(),