Repository navigation
Description
Feature: #46696
Michał Zegan (@webczat) José Vilmar Estácio de Souza (@jvesouza) Marco Zehe (@MarcoZehe) Isidor Nikolic (@isidorn) you've been active in terminal accessibility so I'd love your opinions here on how this should work in this feature.
How it works
Basically what it enables is extensions will be able to change the terminal process environment when it's launched by added to the start, end or replacing environment variables. The way the UI side of this works is there is a little indicator in the top-right corner of the terminal, that could have 2 different icons:
- An info icon for when the terminal has changes active due to extensions
- A warning icon for when an extension has changed or added how it changes the environment
When you hover these icons a hover will appear, an example of the text:
Extensions want to make the follow changes to the terminal's environment:
- Replace FOO's value with BAR
- Add /test/path to the end of PATH
The hover also has an action in the hover's status bar "Relaunch terminal" that allows a single click to "fix the problem".
Making it accessible
My ideas so far are:
- Change the textarea aria label from "Terminal 1" to "Terminal 1, an extension wants to change the environment, restart the terminal to get the updated environment". This seems like it could be annoying and it could also be confusing unless the message is kind of long.
- Should there be an alert when an extension makes changes? In the UI the indicator pops up which may come to the user's attention.
- Expose a command to show the hover much like the "Show Hover" command in the terminal? This could suffer from bad discoverability.
I've also been thinking about whether it's important to make the info indicator accessible or not, it's "good to know" information but I'm guessing most users won't care and will end up trying to hide it (which they can via a setting).
Activity
MarcoZehe commentedon Apr 18, 2020
I‘d say that this is an example where an alert is warranted when the terminal input is focused. This is, after all, something the user must be made aware of.
And for the details and the interaction, something similar to the Notification Toast comes to mind. The one that asks if an Accessibility Service is being used and Accessibility Mode should be kept on or turned off. A keystroke to open that could be added (if it doesn‘t exist yet), and a hint appended to the alert text that tells the user to press this keystroke to review the changes and relaunch the terminal.
jvesouza commentedon Apr 18, 2020
isidorn commentedon Apr 20, 2020
Thanks Daniel Imms (@Tyriar) for the ping.
Agree with Marco Zehe (@MarcoZehe) so
Hope this makes sense :)
Tyriar commentedon Apr 20, 2020
How about this for the label?
Then that command will trigger and focus the indicator's hover, allowing actioning with the "Relaunch action" at the bottom which will act the same as the editor's hover. Alternatively the user can just run the "Relaunch terminal" command but I don't call that out. Here's an example of what the hover looks like:
With the action
It'll be a new terminal so it will go back to normal.
Tyriar commentedon Apr 20, 2020
Note that the above does not make the "changes active" part of this accessible, however this is just good to know information that extensions have changed the environment. It's very likely that most people will have changes active in all their terminals so I imagine going with an explicit approach here would get annoying and maybe confusing if the label said something like:
The user can always run the
Show Environment Informationin this state if they know about it though.isidorn commentedon Apr 20, 2020
I think your suggestion makes sense. Though I would like to hear feedback from our users as well.
Also once we have a version which can be tried out I believe you will get more precise feedback.
Tyriar commentedon Apr 20, 2020
This is a little tricky since it's an extension only feature currently in proposed. Setting up https://github.com/microsoft/vscode-extension-samples/tree/master/terminal-sample and running the
Terminal API: Update environmentcommand is the main way to test it now.Tyriar commentedon Apr 20, 2020
Isidor Nikolic (@isidorn) are the actions in Show Hover accessible? I can't seem to tab to focus them, they're announced along with their keybindings, but I was expecting to be able to tab to them?
Tyriar commentedon Apr 20, 2020
Oh, it's because the actions are
atags without href or tabIndex set.Tyriar commentedon Apr 20, 2020
Show environment info + tab to focus the action, announces "Relaunch terminal button":
I'll make an issue for the editor because they are only accessible via click currently.
isidorn commentedon Apr 20, 2020
Daniel Imms (@Tyriar) great catch for editor hover actions.
Make environment variable info widget hover accessible
Tyriar commentedon Apr 21, 2020
Ok this will be in the next Insiders, it's a little hard to test but the behavior as you need to setup this extension. Here's what I went with:
textareaaria label changes to this when an extension wants to change the environment: "Terminal (number) environment is stale, run the 'Show Environment Information' command for more information"Some design decisions I made intentionally:
Thanks for all the input 🙂
chrisnorman7 commentedon Jun 2, 2020
Hi,
As an aside, is it possible that the label for the input field could be changed from "Terminal 1" for exaqmple, to the names we set for the terminals via the "rename terminal" action?
Only a small thing, but I feel like it would make more sense.
Thanks for reading.
Tyriar commentedon Jun 2, 2020
Chris Norman (@chrisnorman7) #99072
chrisnorman7 commentedon Jun 2, 2020