-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Editor title being read out once suggestion is accepted #89098
Comments
@pawelurbanski tried this out again and the issue is as I have suspecte. The |
I’ve just pulled the changes from Master – there is no change in behavior, or I eed to merge locally a specific branch. I managed to confirm the following:
|
Clarification after further testing:
Possible logic:
The aria-label on the editor overwrites the defaults and it seems that it prevents the add-ons to screen readers overwrite its value as a result. It prevents the add-on to disable reading the name of the editor when getting the focus back to the textarea field. |
Great, thanks a lot for the feedback and ideas.
Also:
We also though of introducing a workaround that the suggest widget clears the editor aria label before the suggestion is accepted and sets it back afterwards. This is a hack workardoun and are open for better ideas on how to solve this issue. |
Here is the speech history output after switching between 2 editors with untitled files 1 and 2 respectively:
‘Untitled-2, editor group picker, picker’
‘Untitled-1, editor group picker, picker’
I used Ctrl+Tab to switch between opened files.
The group name could be presented as follows:
“file name” + “, group: “ + group_name
Note: Quotes above are for decoration of this pseudocode. We obviously do not want them to be read aloud. The word: ‘group’ is phonetically very short, so it is very easy to hear and does not slow down the flow.
I’m for the idea of not including the VSC name and version in the title. The only exception would be when in the insider or oss / dev build. But maybe I am going into very minor details.
I think that clearning the name/title before completion, or onCompletionStart just to use a bit of event-like language is not required.
1. The user is in some editor, and definitely knows the context.
2. The most annoying part is when you complete the item and get to hear the title.
But we need to think about the following case:
1. We cleared the name/title after completed item was inserted, so it is not read aloud.
2. The user changes focus, and brings back focus to the editor again.
3. How do we hangle the name/title since it is the focus event just like in case of completion, but in this case we want to get the name of the file in the editor.
|
|
2. So maybe lets call it: Edit group 1, 2 …5. Sounds equally short.
3. The case with muting the title on getting the focus back after completing the item is that you immediately get back to the flow. In other cases – the shorter the better – people know what they are working on.
4. When I was browsing the code early last year, the might have been a method or event related to current completion activity. Namely, if the language service should return the current item or provide another one, for example: after typing another character or deleting by using backspace for example. I will try to find this API.
From: Isidor Nikolic <notifications@github.com>
Sent: czwartek, 23 stycznia 2020 16:38
To: microsoft/vscode <vscode@noreply.github.com>
Cc: Pawel Urbanski <pawel@pawelurbanski.com>; Mention <mention@noreply.github.com>
Subject: Re: [microsoft/vscode] Editor title being read out once suggestion is accepted (#89098)
1. I do not get "picker" read out. Do you have some special setup? When I swithc between Untitled editors I get the following read out Untitled-2 editor, Editor Group 2 edit has auto complete multi line
2. We can update the group name to be just group. However group is a term which the Mac Voice Over uses and we got feedback from @ivanfetch<https://github.com/ivanfetch> that this can be confusing and ambigous
3. We will try to make the VS Code title shorter so Screen readers are not so chatty
4. We would handle the focus in such a way that the Suggest Widget would clear the Editor aria label and with a timeout set it back to the previous state. That way only the focus from the suggest would not read it out. It is a hack, but I have no better ideas how to solve this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#89098?email_source=notifications&email_token=AAWAEQAU54ZUVLN4BZ7U5PLQ7G2WPA5CNFSM4KKGICQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJXY2KA#issuecomment-577735976>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAWAEQEFNIGNC2POJKFO4Z3Q7G2WPANCNFSM4KKGICQQ>.
|
For 3) I have created this issue #89175 As for a code poitner for 4, I think we should simply here do our magic hack. |
TL DR: once a suggestion is accepted NVDA and VoiceOver reads the editor title. To put it in HTML screen reader terms: if element A has focus and has Created NVDA issue nvaccess/nvda#10887 |
Question or wild idea: Is the suggestions popup an accessibility child of the editor, or somewhere else in the accessibility hierarchy? If it were part of the editor's sub tree, e. g. via aria-owns on the editor pointing to the ID of the suggestions popup container. This would put it and all its children into the editor element's accessibility sub tree (not DOM sub tree). NVDA and some other AT have a habit of rereading a hierarchical chain of elements when focus changes. So if focus only changed from a child to a parent once aria-activedescendant is cleared, that might reduce verbosity. However, if you are already aria-owning the suggestions popup into the editor accessibility sub tree, then please ignore me. :-) |
@MarcoZehe great suggestion to use |
No, if it doesn't fix the issue, no need to include it. Sometimes it does make sense, but it is nothing that should be used just because one can. Only adds complexity which in this case isn't needed. |
@MarcoZehe ok, thanks for the idea anyways. |
As Marco said – it is the behavior due to the focus changes. In regular apps they are very infrequent, but in case of VS Code it is taking place very frequently.
There are 2 things going when it comes to verbosity:
1. The title being read,
2. The role of the control and its states,
Both take place due to the design of screen readers, which as I said is good in regular cases. This is something I fixed screen reader-side so to speak where I overwrite the name and role. Additionally I drop the states fo the control to silence them.
There is everything done correctly on the VS Code side. As for the screen reader side – this is the place where a simple add-on or script steps in – just like extensions for VS Code itself when we need them.
|
@isidorn I really dig the aria-owns idea. In NVDA, it should already help for braille actually. We could also consider making NVDA less verbose by default if focus moves from a child to a parent. I guess there is some stuff we can ignore in that case, such as states and label. |
Actually, here is some interesting info about aria-activedescendant that also mentions aria-owns and aria-controls. I think from this section, option 3 suboption 1 applies to VS Code. That means aria-controls should be implemented on the text area pointing at the suggestions list box. See also this documentation from the ARIA 1.2 best practices which explicitly states that aria-controls should be implemented correctly. it has a structure that is somehow similar to VS Code.
|
There are several parts to this question. First you'd need to find out if either the IAccessible2 or ATK standards already know of such a relation you ask for. If not, you'd need to file bugs against the appropriate standards bodies to implement these. Note, though, that I no longer work for Mozilla, and am not part of the ARIA working group any more, so I can only advise on how things are done, but am not in any position to help drive this forward any more than you are. |
We currently do not set neither |
@isidorn Unless I am misunderstanding, that comment suggests that |
@joanmarie yeah I misunderstood, sorry for the ping. I got it once I read the comment on the NVDA side. So the following should be done:
@hediet @alexdima @jrieken what do you think? Is this reasonable? We can also scale it down to the suggest widget, but I thought a more general content widget approach would work better. Gist of the issue we are trying to solve: on editor content widget close, screen reader should not re-read editor aria label and content. |
Ugh, I tried to write a prototype for NVDA based on the ARIA example, but it turns out to be harder than I thought. Aria-controls points to the suggestions list, but as soon as that list disappears, there is no way using IAccessible2 to get a reference to that list any more. To put it into steps:
Another approach is checking the controlled by relation on every focus, and if that applies, cache the controlled by until it gets focus again. I assume this can be pretty costly though and therefore I'm a bit reluctant to do this. |
@LeonarddeR thanks for providing the details. Let us know how that investigation continues. We are open to do the changes required on the VS Code side if this can improve the overall experience. |
Any update on this issue? |
found by @pawelurbanski
The issue I believe is that the focus moves back to the editor which makes ScreenReaders read out the editor aria label. I am not sure how to tackle this and am open to suggestions @pawelurbanski
Assigning to January so I look into fixing this week.
Can reproduce both with NVDA and VoiceOver on mac.
The text was updated successfully, but these errors were encountered: