From 52cd58043ac144eeafb92fd962662420506283c1 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sat, 12 Nov 2022 23:39:05 +0000 Subject: js: Add keyboard navigation for menus Once the input focus is in the menu system (for instance by Shift+Tab from the puzzle), you can move left and right through the menu bar and up and down within each menu. Enter selects a menu item. The current menu item is tracked by giving it the input focus. --- emcclib.js | 1 + 1 file changed, 1 insertion(+) (limited to 'emcclib.js') diff --git a/emcclib.js b/emcclib.js index 47963bb..5c1d039 100644 --- a/emcclib.js +++ b/emcclib.js @@ -111,6 +111,7 @@ mergeInto(LibraryManager.library, { var tick = document.createElement("span"); tick.className = "tick"; label.appendChild(tick); + label.tabIndex = 0; label.appendChild(document.createTextNode(" " + name)); item.appendChild(label); var submenu = document.createElement("ul"); -- cgit v1.1