Add aria expanded to settings button

This commit is contained in:
Chocobozzz 2021-11-22 14:25:13 +01:00
parent e7542293d6
commit 4ef44b2b71
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 4 additions and 0 deletions

View 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()