Skip to content

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

Closed

Description

CC Isidor Nikolic (@isidorn) and Megan Rogge (@meganrogge)

Current Issue

  1. Load NVDA or any screen reader.

  2. Launch VSCode.

  3. enable copilot extension.

  4. Create any ts or js file.

  5. Try to trigger copilot-powered inline suggestion (Alt+\).

  6. See (hear) if suggestion pop-up is automatically read: it's not unless you press Ctrl+K, Ctrl+I to explicitly move your focus to the tooltip area.

  • Notes: This is because "div.monaco-tokenized-source" does not have aria-live="assertive" to announce the dymanic content to screen reader.

  • Notes: copilot is just one of the examples. Any extensions or widgets that depend "div.monaco-tokenized-source" have the same issue.

Expected Behavior

The suggested dynamic content needs to be automatically announced to screen reader users.

  • Note: I am willing to fix this issue and test with my screen reader.

System Info

Version: 1.74.0-insider (system setup)
Commit: d0e44be
Date: 2022-11-25T08:00:08.922Z
Electron: 19.1.6
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.22621
Sandboxed: Yes

Activity

  1. isidorn commented on Nov 28, 2022

    @isidorn

    JooYoung Seo (@jooyoungseo) thanks a lot for opening this issue and for the PR.
    However I am not sure if this is the ideal experience. I worry that it might result in Screen Reader reading too much, due to inline completions popping up all the time.
    fyi Henning Dieterichs (@hediet) since we should think about inline completion accessibility improvements.

  2. jooyoungseo commented on Nov 28, 2022

    @jooyoungseo
    Author

    Isidor Nikolic (@isidorn) -- I understand your concern. However, adding aria-live to div.monaco-tokenized-source only reads new suggested token instead of the whole tooltip content. This means screen reader users do not necessarily hear redundant and verbose tooltip instructions and button names all the time. Without this feature, using inline suggestion is quite tedious for screen reader users. Because you need to manually press Ctrl+K, Ctrl+I each every time to identify the new content in tooltip.

    As far as I tested, this gave me a more seamless and accessible experience when using inline suggestions. However, I understand that I cannot represent other screen reader users.

    As a fair compromise, I suggest adding an option to VSCode settings to adjust the aria-live level between "on" and "off" so that users can customize the inline suggestion announcement level per their preference.

  3. added
    accessibility
    under-discussion
    on Nov 28, 2022
  4. meganrogge commented on Nov 28, 2022

    @meganrogge
    Collaborator

    I do not have copilot. Henning Dieterichs (@hediet) could you pls try out the PR with a screen reader?

  5. jooyoungseo commented on Dec 2, 2022

    @jooyoungseo
    Author

    I will close my PR because I receive too many GH action messages. However, this issue still needs attention and suggest keeping it open.

  6. hediet commented on Dec 2, 2022

    @hediet
    Member

    The idea was to use audio cues to indicate that inline suggestions are available.
    Then, Ctrl+K, Ctrl+I can be pressed to read the suggestion.

    The problem is that inline suggestions might be there 50% of the time you type something.

  7. meganrogge commented on Dec 2, 2022

    @meganrogge
    Collaborator

    I think it makes sense to let the user decide if the potential disruption is worth it and disable this by default.

  8. meganrogge commented on Feb 15, 2023

    @meganrogge
    Collaborator

    I explored reading the hint automatically using aria-live assertive. It was very disruptive because would suggest something with every keystroke. I also tried debouncing and the experience still was not great. You can try my branch merogge/ariaAlert to see what you think.

    Suggestion from JooYoung Seo (@jooyoungseo) :

    We can consider replacing the “Suggest List box” message with a specific audio cue like an inline hint.

  9. jooyoungseo commented on Feb 15, 2023

    @jooyoungseo
    Author

    Megan Rogge (@meganrogge) -- I have just tested your branch and this is exactly what I intended and proposed. You may find aria-live very disruptive; however, this is what sighted people see visually and it is the matter of getting used to. Advanced screen reader users have very sophisticated techniques. For example, screen readers have a typing echo setting to choose whether you will hear the typing feedback based on character/word/none/both. I would turn off the typing echo so that I can only hear the suggestion live event while typing. You can simply keep typing if you want to ignore what's suggested and you can hit tab/enter key to accept the suggestion. Some advanced users, including myself, would find this feature useful and I believe this can improve their productivity. That's why I am suggesting this feature as a user configuration. I would definitely turn this on because the auto-suggestion and copilot hint is immediately read aloud which saves me a lot of time!

  10. meganrogge commented on Feb 15, 2023

    @meganrogge
    Collaborator

    Great, thanks for testing. I think it makes a lot of sense to have a setting which enables this.

  11. removed this from the On Deck milestone on Feb 15, 2023
  12. 3 remaining items

  13. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Feb 21, 2023
  14. removed
    insiders-released
    on Mar 1, 2023
  15. meganrogge commented on Mar 1, 2023

    @meganrogge
    Collaborator

    Going to investigate adding a setting for this and not having a dialogue box open up.

    alert does not work on macOS in any of the contexts for me, but I'm going to test on Windows

  16. meganrogge commented on Apr 21, 2023

    @meganrogge
    Collaborator

    I have reached out to an apple contact about VoiceOver. This is fixed on Windows though

  17. meganrogge commented on May 26, 2023

    @meganrogge
    Collaborator

    This now works on all platforms. I had an issue with my VoiceOver configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

accessibilityinline-completionsunder-discussion

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions