You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unable to use keyboard to interact with editor gutter controls #13787
Create a source file that has some collapsable regions, for example File / New File / C++ file.
Ctrl+1 to focus the editor
Press ESC to escape the editor (you'll see a focus rectangle around it and hear an announcement)
Shift+Tab to move to the gutter (you'll see a focus rectangle around it and hear an announcement)
As instructed press Enter to try and interact with the gutter
Describe the problem in detail
Nothing happens.
Describe the behavior you expected
Focus should go to one of the gutter controls (e.g. expand/collapse widget) and up/down arrows should allow moving between them and enter or spacebar should toggle them.
The cause: AceEditorWidget turns off Ace's gutter line highlight (setHighlightGutterLine(false)), and Ace's keyboard gutter handler assumes it is on. On Enter it reads gutterLayer.$cursorCell.row to find the row to start from; $cursorCell is only set while the highlight is on, so the handler throws TypeError: Cannot read properties of undefined (reading 'row') and focus stays on the gutter.
Stock Ace (1.43.3) does the same with enableKeyboardAccessibility: true and highlightGutterLine: false, and works with the highlight on, which is why the kitchen sink works.
Options: have the handler fall back to the cursor's row when there is no highlighted cell (a fix for Ace, which we could carry as an acesupport mixin in the meantime), or turn the gutter line highlight on while screen reader support is on.
turn the gutter line highlight on while screen reader support is on
Ideally, keyboard support wouldn't be tied to the screen-reader toggle.
Keyboard-only use and screen-reader use are very different scenarios (already inappropriately mixed together given I used screen reader mode to toggle Ace's keyboard flag).
It's fine to follow/extend this pattern for now, I'll reconsider it when I work on #5652 where I might be adding some keyboard-specific accessibility settings instead of lumping it all under screen reader.
Activity
gtritchie commentedon Feb 13, 2024
I won't have time to look into this for this release. It's not urgent but should definitely be done, so moving to next release.
kevinushey commentedon Nov 30, 2026
The cause:
AceEditorWidgetturns off Ace's gutter line highlight (setHighlightGutterLine(false)), and Ace's keyboard gutter handler assumes it is on. On Enter it readsgutterLayer.$cursorCell.rowto find the row to start from;$cursorCellis only set while the highlight is on, so the handler throwsTypeError: Cannot read properties of undefined (reading 'row')and focus stays on the gutter.Stock Ace (1.43.3) does the same with
enableKeyboardAccessibility: trueandhighlightGutterLine: false, and works with the highlight on, which is why the kitchen sink works.Options: have the handler fall back to the cursor's row when there is no highlighted cell (a fix for Ace, which we could carry as an acesupport mixin in the meantime), or turn the gutter line highlight on while screen reader support is on.
gtritchie commentedon Nov 30, 2026
Ideally, keyboard support wouldn't be tied to the screen-reader toggle.
Keyboard-only use and screen-reader use are very different scenarios (already inappropriately mixed together given I used screen reader mode to toggle Ace's keyboard flag).
gtritchie commentedon Nov 30, 2026
It's fine to follow/extend this pattern for now, I'll reconsider it when I work on #5652 where I might be adding some keyboard-specific accessibility settings instead of lumping it all under screen reader.