Skip to content

Unable to use keyboard to interact with editor gutter controls #13787

In progress

Description

@gtritchie

System details

RStudio Edition : Desktop or Server
RStudio Version : 2023.12 (must include changes from #13786)
OS Version      : 
R Version       : 

Steps to reproduce the problem

  • Start screen reader
  • With a build containing changes from keep Ace's enableKeyboardAccessibility flag in sync with IDE's screen reader mode #13786, turn on screen reader support (Help / Accessibility / Screen Reader Support).
  • 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)
  1. Shift+Tab to move to the gutter (you'll see a focus rectangle around it and hear an announcement)
  2. 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.

You can see this working on the Ace kitchen sink: https://ace.c9.io/build/kitchen-sink.html. Be sure "Keyboard Accessibility Mode" is checked.

  • I have read the guide for submitting good bug reports.
  • I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • If I am reporting an RStudio crash, I have included a diagnostics report.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

Activity

  1. added
    new
    on Oct 12, 2023
  2. removed
    new
    on Oct 13, 2023
  3. added this to the Chocolate Cosmos milestone on Oct 16, 2023
  4. removed their assignment
    on Feb 13, 2024
  5. gtritchie commented on Feb 13, 2024

    @gtritchie
    MemberAuthor

    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.

  6. kevinushey commented on Nov 30, 2026

    @kevinushey
    Collaborator

    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.

  7. self-assigned this
    on Nov 30, 2026
  8. gtritchie commented on Nov 30, 2026

    @gtritchie
    MemberAuthor

    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).

  9. gtritchie commented on Nov 30, 2026

    @gtritchie
    MemberAuthor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions