From 4ef44b2b711210d2fedaffe4dd23c286df664f6b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 22 Nov 2021 14:25:13 +0100 Subject: Add aria expanded to settings button --- client/src/assets/player/videojs-components/settings-menu-button.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'client/src/assets/player') diff --git a/client/src/assets/player/videojs-components/settings-menu-button.ts b/client/src/assets/player/videojs-components/settings-menu-button.ts index c9990af1c..75a5c6904 100644 --- a/client/src/assets/player/videojs-components/settings-menu-button.ts +++ b/client/src/assets/player/videojs-components/settings-menu-button.ts @@ -147,7 +147,9 @@ class SettingsButton extends Button { this.player().peertube().onMenuOpen(); (this.menu.el() as HTMLElement).style.opacity = '1' + this.dialog.show() + this.el().setAttribute('aria-expanded', 'true') this.setDialogSize(this.getComponentSize(this.menu)) @@ -159,6 +161,8 @@ class SettingsButton extends Button { this.player_.peertube().onMenuClosed() this.dialog.hide() + this.el().setAttribute('aria-expanded', 'false') + this.setDialogSize(this.getComponentSize(this.menu)); (this.menu.el() as HTMLElement).style.opacity = '1' this.resetChildren() -- cgit v1.2.3