Add keyboard interactions and focus trapping to Navigation

This commit is contained in:
2018-04-29 10:30:32 +01:00
parent 387d6a770e
commit db70a6cb06
6 changed files with 147 additions and 45 deletions

View File

@@ -12,12 +12,14 @@ export default class Menu {
}
init() {
if (!this.state) return false;
this.container.setAttribute('aria-haspopup', true);
this.container.setAttribute('aria-expanded', false);
this.attachEvents();
setTimeout(() => {
this.showMenu();
}, 1000);
return true;
}
attachEvents() {