Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add symbol provider for terminal accessible buffer #174079

Closed
meganrogge opened this issue Feb 10, 2023 · 10 comments · Fixed by #177110
Closed

Add symbol provider for terminal accessible buffer #174079

meganrogge opened this issue Feb 10, 2023 · 10 comments · Fixed by #177110
Assignees
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-release-notes Issue/pull request mentioned in release notes on-testplan terminal-accessibility Issues related to the terminal help widget, accessibility buffer, or navigation mode
Milestone

Comments

@meganrogge
Copy link
Contributor

meganrogge commented Feb 10, 2023

Right now, we present only the command, the exit code if non-zero, and the output.

Some questions:

  • is presenting ...exited with code # useful?
  • should we add the cwd
  • should we include the prompt

cc @jooyoungseo for any thoughts

@meganrogge meganrogge added under-discussion Issue is under discussion for relevance, priority, approach terminal-accessibility Issues related to the terminal help widget, accessibility buffer, or navigation mode labels Feb 10, 2023
@meganrogge meganrogge added this to the February 2023 milestone Feb 10, 2023
@jooyoungseo
Copy link

The recently introduced heading semantics in the accessible terminal buffer does not seem to live up to our expectation because the screen readers' vague support for "document" role landmark. In theory, "document" role would work like a web page and will auto-activate screen readers' virtual cursor (AKA, browse mode). Tagging each command with heading semantics, thus, would make sense. Unfortunately, most major screen readers do not seem to properly support "document" role, which introduces some side effects against heading semantics defined within the document role. For example, NVDA seems to behave like a document mode instead of browse mode against "document" role and it does not properly recognize heading semantics in the terminal buffer unless you explicitly switch to browse mode. JAWS is even worse... I did not have a chance to file a new issue regarding this, but I will demonstrate this when we meet soon.

@meganrogge
Copy link
Contributor Author

meganrogge commented Feb 10, 2023

Okay thank you for that insight. I recall you said the output container is very accessible. I will see what we do there.

@meganrogge
Copy link
Contributor Author

meganrogge commented Feb 10, 2023

explored using role: presentation and using the arrow keys to navigate line by line on this branch https://github.com/microsoft/vscode/tree/merogge/role-presentation

because that's what we do for the output view. works with VoiceOver, but not with NVDA.

@jooyoungseo
Copy link

@meganrogge -- The ideal model that I refered to previously was Ctrl+Shift+U (Tasks Output) and it has a textbox role.

@meganrogge
Copy link
Contributor Author

@Tyriar and I had a look at the output together and noticed that it is a monaco editor. We will see what the overhead is of inserting that in the terminal

@meganrogge
Copy link
Contributor Author

It looks like the monaco editor will work.

We can use this issue to track also the possibility of adding a language/symbol provider so that landmarks such as commands and output can be navigated to separately. We could also use the editor quick fixes to present our terminal quick fixes in an accessible manner.

@meganrogge meganrogge modified the milestones: February 2023, March 2023 Feb 17, 2023
@meganrogge meganrogge changed the title Consider improvements to the terminal accessible buffer add symbol provider to terminal accessible buffer Feb 17, 2023
@meganrogge meganrogge added feature-request Request for new features or functionality and removed on-testplan under-discussion Issue is under discussion for relevance, priority, approach labels Feb 17, 2023
@jooyoungseo
Copy link

@meganrogge Regarding your original questions on symbol provider, I would recommend making the integrated shell outcome as similar as possible to the non-integrated shell results by default. Users may feel confused if they see different styles between enabled and disabled integrated shells.

It would be even more ideal if you could add some settings for users to customize the buffer output by allowing them to toggle on and off for "cwd", "prompt", "command", "non-exit code."

My personal preference would look like the following:

{
  "display.cwd": false,
  "display.prompt": false,
  "display.command": treu,
  "display.non-exit-code": false
}

@meganrogge
Copy link
Contributor Author

Great idea 👍🏼

@meganrogge meganrogge changed the title add symbol provider to terminal accessible buffer Allow configuring the accessible buffer Feb 24, 2023
@meganrogge meganrogge changed the title Allow configuring the accessible buffer Add symbol provider for terminal accessible buffer Feb 27, 2023
@Tyriar
Copy link
Member

Tyriar commented Feb 27, 2023

I think we should present the entire buffer as is in a monaco instance (like a regular editor) and then use symbols to expose the command smarts if shell integration is enabled:

A quick pick could open when navigating 'symbols', for example ls at working directory exited with code 1

@meganrogge
Copy link
Contributor Author

I investigated and we'd need to use an EditorPane and either have our own OutlineProvider similar to notebooks or register a terminal language provider. Both seem like overkill and more complicated than what we need.

@VSCodeTriageBot VSCodeTriageBot added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Mar 15, 2023
@meganrogge meganrogge added the on-release-notes Issue/pull request mentioned in release notes label Mar 23, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Apr 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-release-notes Issue/pull request mentioned in release notes on-testplan terminal-accessibility Issues related to the terminal help widget, accessibility buffer, or navigation mode
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants