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

Make terminal accessibility buffer read only #172006

Closed
meganrogge opened this issue Jan 23, 2023 · 14 comments · Fixed by #172067
Closed

Make terminal accessibility buffer read only #172006

meganrogge opened this issue Jan 23, 2023 · 14 comments · Fixed by #172067
Assignees
Labels
accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues insiders-released Patch has been released in VS Code Insiders upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Milestone

Comments

@meganrogge
Copy link
Contributor

Terminal a11y buffer is not read-only.
Since this is contenteditable textbox, unintended delete key can mess up the output content. I confirmed that delete key works inside the buffer.

It would be even nicer if this buffer could be marked up with readonly to prevent users from accidentally deleting their output content.

#171914 (comment)

@meganrogge meganrogge self-assigned this Jan 23, 2023
@meganrogge meganrogge added the accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues label Jan 23, 2023
@meganrogge meganrogge added this to the January 2023 milestone Jan 23, 2023
@meganrogge
Copy link
Contributor Author

@jooyoungseo, did you notice that when you toggle the mode it comes back as the original? so while it seems like editing of the buffer is possible, it's not actually making any changes.

@jooyoungseo
Copy link

@meganrogge -- You are correct. If you press tab and come back to the buffer via Shift+Tab, it comes back to the original content. However, the content is editable when it gets focused.

@meganrogge
Copy link
Contributor Author

Not sure if it's possible to change this, but will investigate

@meganrogge
Copy link
Contributor Author

Looks like this is easy to do - just disabling contentEditable and setting readOnly

@meganrogge meganrogge added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Jan 23, 2023
meganrogge added a commit that referenced this issue Jan 23, 2023
@VSCodeTriageBot VSCodeTriageBot added the unreleased Patch has not yet been released in VS Code Insiders label Jan 24, 2023
@jooyoungseo
Copy link

@meganrogge -- To give you prompt testing results, I have just built the latest main branch on my end (this issue will also be found tomorrow once insider is released). I have found the following inadvertent regression (tested with NVDA and JAWS on Windows):

  1. terminal a11y buffer is not readable via standard arrow keys.

  2. Terminal input -> terminal a11y buffer: only requires one Shift+Tab. However, from terminal a11y back to terminal input requires two tab key press.

Note that aria-live is now working!

@meganrogge
Copy link
Contributor Author

@jooyoungseo I have already caught that regression, you can build based on this PR to see that I've fixed it 😄 #172276

@meganrogge
Copy link
Contributor Author

meganrogge commented Jan 24, 2023

i'll investigate:

Terminal input -> terminal a11y buffer: only requires one Shift+Tab. However, from terminal a11y back to terminal input requires two tab key press.

when I investigate #172200

@pawin35
Copy link

pawin35 commented Jan 26, 2023

@meganrogge As of today's insider build (Commit: 07d6f5b), it appears that the accessibility buffer can still be modified accidentally. Additionally, if the buffer has been altered, tabbing to the shell and then shift-tabbing back does not restore the buffer to its previous state, as it did in previous versions. Furthermore, if the buffer has been modified, subsequent command output will not be reflected in the buffer.

@meganrogge
Copy link
Contributor Author

it appears that the accessibility buffer can still be modified accidentally

@pawin35 see #172276 (comment) for why we didn't go with readonly. the actual buffer is never modified - the text area element is. focusing the terminal buffer via mouse click for example and shift+tabbing again will restore the contents to what they were before.

@pawin35
Copy link

pawin35 commented Jan 27, 2023

@meganrogge Is there a way to reset the state of the buffer without using the mouse? As of the version on the main branch, I am unable to reset the buffer by tabbing and shift-tabbing back to it.

@meganrogge
Copy link
Contributor Author

Just hitting tab works for me @pawin35

@pawin35
Copy link

pawin35 commented Jan 27, 2023

@jooyoungseo Can you get the buffer to reset after tabbing into it after modifying the buffer?
I cannot get the buffer to reset with the NVDA on Windows 11; not sure weather there is something wrong on my ends.

@jooyoungseo
Copy link

@pawin35 -- I can reproduce your issue. Please file a separate issue and provide minimal reproducible steps so that @meganrogge can fully replicate this issue.

@pawin35
Copy link

pawin35 commented Jan 29, 2023

@meganrogge @jooyoungseo I have created the issue at #172714.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues insiders-released Patch has been released in VS Code Insiders upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants