]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Add aria expanded to settings button
authorChocobozzz <me@florianbigard.com>
Mon, 22 Nov 2021 13:25:13 +0000 (14:25 +0100)
committerChocobozzz <me@florianbigard.com>
Mon, 22 Nov 2021 13:25:26 +0000 (14:25 +0100)
client/src/assets/player/videojs-components/settings-menu-button.ts

index c9990af1ce26c0f140954ba1f466eee62c561793..75a5c6904fd58650d32dfac4843093c89b11bd54 100644 (file)
@@ -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()