From ed0bec07a2e1f022e4eec10ee264ff0141e4d231 Mon Sep 17 00:00:00 2001 From: CoryDCode Date: Fri, 20 Jan 2017 15:02:50 -0800 Subject: [PATCH] Fixing combo boxes getting out-of-sync with NVDA. Combo boxes need to be special cased like text input. Also, Escape is a reserved button in NVDA, so I added Enter as a way to "submit and move up a level" in addition to escape, so these boxes can be edited while NVDA is on. --- accessible/tree.service.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/accessible/tree.service.js b/accessible/tree.service.js index 36248e013..c928919c8 100644 --- a/accessible/tree.service.js +++ b/accessible/tree.service.js @@ -452,9 +452,10 @@ blocklyApp.TreeService = ng.core.Class({ return; } - if (document.activeElement.tagName == 'INPUT') { - // For input fields, only Esc and Tab keystrokes are handled specially. - if (e.keyCode == 27 || e.keyCode == 9) { + if (document.activeElement.tagName == 'INPUT' || + document.activeElement.tagName == 'SELECT') { + // For input fields, Esc, Enter, and Tab keystrokes are handled specially. + if (e.keyCode == 9 || e.keyCode == 13 || e.keyCode == 27) { // Return the focus to the workspace tree containing the input field. document.getElementById(treeId).focus();