Skip to content

add setting for aria-live assertive alert for ghost text - #174606

Merged
Megan Rogge (meganrogge) merged 12 commits into
mainfrom
merogge/alert
Feb 21, 2023
Merged

Megan Rogge (meganrogge) merged 12 commits into
mainfrom
merogge/alert

Conversation

@meganrogge

Copy link
Copy Markdown
Collaborator

fixes #167348

JooYoung Seo (@jooyoungseo), since you last tested, I've:

  • removed the debounce of the function
  • added a setting editor.ariaAssertiveInlineSuggestion which is false by default
  • removed the text Suggestion: from the alert so that only the suggested text is read. There should be an audio cue played to indicate the suggestion shows up then you should receive the alert with the content it suggests.

Could you pls test and let us know if it's still what you expect?

@jooyoungseo

Copy link
Copy Markdown

Megan Rogge (@meganrogge) -- thanks for doing this! I don't hear any audio cues when suggestion is available. The aria-live works well though.

I configured the following:

    "editor.ariaAssertiveInlineSuggestion": true,
    "audioCues.debouncePositionChanges": true

What is audioCues.debouncePositionChanges exactly for? I don't see this audio in the audio help menu, either.

@meganrogge

Megan Rogge (meganrogge) commented Feb 16, 2023 •

Copy link
Copy Markdown
Collaborator Author

I don't hear any audio cues when suggestion is available.

What do you have audioCues.lineHasInlineSuggestion set to? I hear that get played every time I see an inline suggestion presented.

"audioCues.debouncePositionChanges": true

This is a new setting I added to fix some issues you reported with audio cue responsiveness.

The PR: #173334

You'll want to set "audioCues.debouncePositionChanges": false for more responsiveness. There were some ppl who reported issues related to hearing too many audio cues, which is why that is a setting and off by default.

Here were the issues that led us to have that setting:
#142121
#143727
#141444

@jooyoungseo

Copy link
Copy Markdown

Megan Rogge (@meganrogge) -- Thanks for your detailed explanation! I have already turned it on: { "audioCues.lineHasInlineSuggestion": "on"}

Isn't inline suggestion audio cues only for the inline hint such as copilot? this is not playing against normal auto-suggestion.

@meganrogge

Megan Rogge (meganrogge) commented Feb 16, 2023 •

Copy link
Copy Markdown
Collaborator Author

That is correct, it will only play when there's an inline hint such as copilot by design.

If you are hoping for an audio cue to be played when a collapsed ? suggestion is available, I'm not sure if there's an issue for that already, but we can make one

I edited my reply above with more context fyi 😄

@jooyoungseo

Copy link
Copy Markdown

Megan Rogge (@meganrogge)

removed the text Suggestion: from the alert so that only the suggested text is read.

Since we have taken this out, I think we need the audio cues to audibly indicate the suggestion popup.

@meganrogge

Copy link
Copy Markdown
Collaborator Author

When I test, here's what I see/hear:

  • inline suggestion appears, audio cue is played to indicate that
  • aria alert dialogue pops up with the content of the suggestion

I am not sure why you don't hear the audio cue getting played. When you run Help: List Audio Cues and go down to the inline suggestion one, does it play?

@meganrogge

Copy link
Copy Markdown
Collaborator Author

To be clear, the suggestions impacted by this PR are only the ones that come from copilot. So instead of the popup saying "Suggestion: text to insert", it will say "text to insert"

@jooyoungseo

Copy link
Copy Markdown

Megan Rogge (@meganrogge) -- Yes, the audio cue is played well in the help menu. But, no success with the auto suggestion. Please see if you can replicate #147230.

@meganrogge

Megan Rogge (meganrogge) commented Feb 16, 2023 •

Copy link
Copy Markdown
Collaborator Author

JooYoung Seo (@jooyoungseo) I now understand the problem. I can repro the issue you linked to

We have 2 kinds of suggestions: inline and ones coming from a widget.

This PR deals only with the inline suggestions.

I agree with you that we should play an audio cue for either of the cases. But we probably will want to have a separate sound because to interact with widget suggestions, you need to use arrow keys/ a different way of interacting

@jooyoungseo

Copy link
Copy Markdown

Megan Rogge (@meganrogge) -- I agree with your ideas using two different audio cues to indicate the suggestion types. The one that I wanted to keep consistent is the pair of audioCue-aria-live event for either of suggestions.

@meganrogge

Copy link
Copy Markdown
Collaborator Author

I am not sure I understand, but think that you're suggesting the other suggestion type - those coming from the widget, should also have aria-live assertive alert applied.

If so, I can look into that when adding the audio cue for that type of suggestion.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment

@meganrogge

Megan Rogge (meganrogge) commented Feb 17, 2023 •

Copy link
Copy Markdown
Collaborator Author

something I just noticed is the aria alert happens before the audio cue is played, which is not good.

@jooyoungseo

Copy link
Copy Markdown

Megan Rogge (@meganrogge) -- I hear you because I encountered the same issue when working on my own project. Could we make the audio cue more responsive and played earlier? We want to keep the aria-live as responsive as possible without any silent filler to unnecessarily wait for the audio cue trigger.

@meganrogge

Copy link
Copy Markdown
Collaborator Author

I have it working nicely now, but how I did that was a bit hacky. It's a tricky problem since the code is synchronous and needs to remain that way.

@hediet

Copy link
Copy Markdown
Member

Afaik the ghost text class has some methods to turn it into text, that is also used for the hover.

@hediet

Copy link
Copy Markdown
Member

This deprecates AudioCue.inlineSuggestion, right?

@meganrogge

Copy link
Copy Markdown
Collaborator Author

@hediet

Copy link
Copy Markdown
Member

I think now the audio cue for inline suggestions no longer debounces and doesn't trigger on change anymore. I.e. when you cycle between suggestions I think it plays the sound now every time.

@meganrogge

Copy link
Copy Markdown
Collaborator Author

Henning Dieterichs (@hediet) based on the user's testing, this wasn't effective #175105. should we revert it?

Megan Rogge (meganrogge) added a commit that referenced this pull request Feb 22, 2023
…75165)

Revert "add setting for aria-live assertive alert for ghost text (#174606)"

This reverts commit 5dc0609.
@hediet

Copy link
Copy Markdown
Member

Then we should revert I think!

@github-actions github-actions Bot locked and limited conversation to collaborators Apr 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Accessibility] div.monaco-tokenized-source requires aria-live="assertive"

4 participants