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) {
|
switch (event.key) {
|
||||||
case ' ':
|
case ' ':
|
||||||
case 'Enter':
|
case 'Enter':
|
||||||
|
if (this.isOpen) {
|
||||||
|
this.close();
|
||||||
|
} else {
|
||||||
|
this.open();
|
||||||
|
}
|
||||||
|
stopPropagation = true;
|
||||||
|
break;
|
||||||
case 'ArrowDown':
|
case 'ArrowDown':
|
||||||
case 'Down':
|
case 'Down':
|
||||||
this.open();
|
this.open();
|
||||||
|
|
Loading…
Add table
Reference in a new issue