-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Support terminal link keyboard navigation #95570
Comments
Another idea: Announce to screen readers how many rows were travelled. |
Going to admit, I have no idea what exactly you are trying to do here :) Can you, or anyone else, tell me:
Thanks :) |
@zersiax sorry, you're too quick 😃 I'll post a better summary of the problem soon, followed by a proposal. |
Ok so here's the problem: Links in the terminal have never been accessible, this is a feature where hovering your mouse over web links or local links that we've detected (eg. In 1.45 this system has overgone a major overhaul and now features:
The problem is about how to make this keyboard and screen reader accessible. |
Ok ...so this is actually a difficult one :) Some ideas:
@isidorn , perhaps @MarcoZehe , thoughts? |
I was writing this up before I knew @zersiax posted, I'll read that now and follow up on it. Now on the solution: For keyboard accessibility I had the idea of there being a generic command to navigate the terminal buffer based on the link type, say {
"key": "ctrl+[",
"command": "workbench.action.terminal.previousLink",
"when": "terminalFocus",
"args": { "type": "web" }
} Triggering this would navigate up to the closest link detected by the weblink provider. Meaning you could run On the screen reader accessibility side, at the time the user presses ctrl+[, the terminal would create an You might be thinking that we also have navigation mode in the terminal and while it seems like it would be relatively easy on our side to inject the links there as well, I worry that it would be too spammy as almost everything in the terminal is a link now and it would make it difficult to both navigate to the link you're after while at the same time making it harder to read line output which is the main point of navigation mode. Perhaps this could work but just include web and file links in navigation mode? Something also to consider is that these links will eventually be extensible by extensions (#91290) so there will be more than just web and file links appearing. Some examples: git commits/branches linking to github, localhost links opening debug browsers. |
Ok it looks like my proposal mostly maps to @zersiax's second point.
I'm not sure browse mode will end up working as the terminal buffer is a virtual list and also because detecting links is an asynchronous action that could end up going to the extension host and having additional validation, meaning it could take a second in a pretty bad case for all we know.
I think I might have been misunderstood here, the word link isn't in the editor but clicking on it will open quick access or open the editor. Take this terminal output of running
There are no web or file links here as we don't attempt to match
|
Ok, given we can't really do anything on a per-line basis very easily at present, I think an idea to walk through the link, like proposed above by both me and @Tyriar is the best thin we can do here. |
I hadn't thought to use ctrl+space, I was thinking maybe tab instead? For this we need to keep in mind that eventually multiple actions will be possible, based on early discussions in the UX chat the hover will probably end up having the default action like "Follow link (ctrl + click)" and then in the hover's "status bar", a button like "Change default action".
Discoverability is always an issue for these sorts of things, the command to navigate to web links will be super powerful but I'm sure not that many people will end up finding it, this applies to all users not just those using a screen reader. I'll probably write up a doc page about it and hope bloggers/influencers pick up on it. We have this section in the docs which could be expanded https://code.visualstudio.com/docs/editor/accessibility#_terminal-accessibility, not sure what else we can do on the discoverability end. |
Folks, Being able to access these links using a screen reader would be really helpful. I see that this issue has been closed, but don't know whether this is implemented, won't be implemented or is being implemented at all. What can I do to first discover if this is being worked out or if this is stopped at all? As for the discussion, must screen readers would follow listings in terminal using the browse mode (JAWS) or navigation mode (NVDA), these implementations are similar, since we can arrow through the lines and read through. Making these elements clickable seems to be enough, because then screen readers would be able to send the enter key on them and click events would be generated. Thanks for the great work! |
@marlon-sousa this issue is currently assigned to Backlog, it is not closed. Which means we acknowledge the issue but no current plans to fix. @Tyriar can maybe provide more details if he has any plans to tackle this in the future |
@Tyriar hello, I'd like to try to solve this issue. I recognize that for a beginner on VSCode project this can be hard, but I'd like to try anyways and if that works may be submit a pr. Would you be available to provide me a basic mentoring, basically giving me typs about where in the code should I start looking at? |
@marlon-sousa yes this is a pretty involved task, but you could have a look if you're game. It's basically about creating Pointers to start looking into it:
|
Related: #69795 |
@zersiax @marlon-sousa give it a try in latest insiders and let us know how it behaves. Thanks! |
You can try it out by running the |
1st pass merged with option 1. |
Let me share here what I wrote in our chat already (so we have everything in one place): I think it should all be under one list. That is the upside of quickPick that it is good at filtering and dealing with large amounts if entries. |
@isidorn smart detection as in duplicate removal? |
@meganrogge I just tried this out. Works nicely. Some feedback which also address @Tyriar questions:
@jooyoungseo I know you are a heavy terminal user. Would love to hear your thoughts. To try it out, open terminal, have some text and links, |
The trouble is defining what gets ignored, how are we to say what is not a valid link as filtering out any of them is removing access to a feature available via the mouse (you can ctrl+click anything). Perhaps filtering out these high code point symbols/emoji only is the way to go? The input line can have valid links on it like folders/urls/files as well.
👍 |
Sounds like a good approach to me. |
I'd be inclined to agree although I don't quite know what these emoji/code points are for? As in ...what would happen if you were to click them? |
The same thing as if you were to select them via the new command: we open the Quick Pick and try to find a file with that name -> so not useful. |
@zersiax yeah nothing useful, unless you have a file whose name contains one of the symbols. |
I'd say filtering those out is a good strategy in that case |
I was interested in this feature and I dowloaded Code Insiders to take a look. In my case I'm interested in keyboard navigation of crash stack traces, such as: It would be great to have commands "terminal: open previous link" and "terminal: open next link". When there's no history or when a command has just been run in the terminal, "open previous link" would open the first link found from the bottom of the terminal, namely the one that is already selected by default here: From there, running "terminal: open previous link" over and over again would walk down the list of links as they appear in the above list; until, that is, some command occurs in the terminal, that would erase the history of link visitations. (And "terminal: open next link" walks back up the same list, but which is downward inside the terminal window.) |
Right now there is navigation mode which is similar to this but only with the text in the line. Where this gets really interesting is navigating types of links (eg. web links only, local files only, all links). Example mockup:
It could feature up, down, left, right as well as previous and next navigation.
The text was updated successfully, but these errors were encountered: