fix dialog aria-expand attribute
This commit is contained in:
parent
54219c52ea
commit
1d128d4973
1 changed files with 17 additions and 0 deletions
|
|
@ -1528,6 +1528,23 @@ describe('OverlayController', () => {
|
||||||
expect(ctrl.invokerNode?.getAttribute('aria-expanded')).to.equal('false');
|
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('<div role="button">invoker</div>')
|
||||||
|
);
|
||||||
|
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 () => {
|
it('creates unique id for content', async () => {
|
||||||
const ctrl = new OverlayController({
|
const ctrl = new OverlayController({
|
||||||
...withLocalTestConfig(),
|
...withLocalTestConfig(),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue