amelioration(a11y): permet les interactions clavier via les touches entrée et espace pour ouvrir et fermer le menu depliant quand le focus est sur le bouton
This commit is contained in:
parent
984ef67827
commit
ddc04a03a4
1 changed files with 7 additions and 0 deletions
|
@ -154,6 +154,13 @@ export class MenuButtonController extends ApplicationController {
|
|||
switch (event.key) {
|
||||
case ' ':
|
||||
case 'Enter':
|
||||
if (this.isOpen) {
|
||||
this.close();
|
||||
} else {
|
||||
this.open();
|
||||
}
|
||||
stopPropagation = true;
|
||||
break;
|
||||
case 'ArrowDown':
|
||||
case 'Down':
|
||||
this.open();
|
||||
|
|
Loading…
Reference in a new issue