-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
Enhanced Accessibility Signals with Advanced User and Modality-Specific Delays #205320
Enhanced Accessibility Signals with Advanced User and Modality-Specific Delays #205320
Conversation
|
3917341
to
128ccb3
Compare
@microsoft-github-policy-service agree |
128ccb3
to
ebf3cb0
Compare
cc: @rperez030 I have made two additional commits since the original pull request. These updates introduce user-configurable settings for the delays and remove the previously used debouncing code, which has become redundant and indeed could interfere with the new delays, extending them beyond their intended duration. With these updates, I consider that the new feature is now complete. I have decided to retain the Please review these changes at your earliest convenience. I look forward to your feedback and suggestions. |
Thanks for the PR! Unfortunately, I'm not able to understand the PR description.
What do you mean with that?
This statement needs some convincing arguments... The code change might be good and justified, but I just don't understand the reasoning behind it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the description to reflect what this PR is about.
What problem does SignalModality
solve?
@hediet, Thanks for taking the time to review this PR, I've updated the description with a detailed explanation of the issues in accessibility signals that this PR intends to solve. I'm unsure if I need to follow a specific template for the description. I noticed a new issue that might suggest this, but navigating the pull request page with my screen reader this point isn't clear to me. |
d46f541
to
5515fc8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR description updated
Will look into this next week, this week we have testing! |
src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.ts
Show resolved
Hide resolved
Layering issue:
|
Thanks for working on this. It works well based on my testing 👏🏼 |
5515fc8
to
3647c89
Compare
I have changed the |
My apologies, I closed the PR by mistake 😳 |
|
@ramoncorominas I cannot thank you enough for all the work and time spent on this. You definitely took my ramblings about delays to the next level. I really like the modalities approach. @meganrogge this work well on Windows as far as I can tell. I don't have my environment properly setup to test on macOS, so I may wait until it can be merged to test over there. |
Thanks for testing on Windows @rperez030. I tested it on macOS 👍🏼 |
3647c89
to
6e547f5
Compare
IAccessbilitySignalOptions -> IAccessibilitySignalOptions isAnnouncmentEnabledCahce -> isAnnouncementEnabledCache
Introduce `SignalModality` enum type to specify desired modalities per call. This enables calling different modalities with varied timings, and allows modality separation based on conditions like triggers or settings. The change also provides flexibility for future enhancements and possibilities in modality handling.
…odalities We now iterate over each modality, making individual calls to playAccessibilitySignals for each one. This approach allows for more flexible and scalable management of different modalities in the future.
This update adds the feature of modality-specific delays for accessibility signals. Now, each signal modality can have its own distinct delay, enhancing the flexibility of signal handling. While this feature may render debouncing redundant, it is still retained for the sake of backward compatibility. A temporary test object has been incorporated to verify that different modalities are triggered at different times.
This update introduces a `BaseLineFeature` class that supports feature-specific delays and refactors the `LineFeature` classes accordingly. This enhancement improves user experience by allowing unique delays for different types of features. Prior to this, delays were modality-specific but not feature-specific. Now, each class has its own hardcoded delays. Future iterations will aim to make these delays user-configurable. Further enhancements will adjust delays based on whether the line has changed or if the user is navigating within the same line, likely reading the line character by character or word by word.
This update introduces distinct delays for line changes and inline navigation. The update aims to enhance user experience by adjusting the delay based on the user's navigation behavior. When the user navigates within the same line, likely reading content character by character or word by word, longer delays are applied to minimize interference with screen reader output. Conversely, when the user changes lines, possibly skimming through the program, shorter delays are implemented to provide timely feedback. This approach ensures a balance between providing necessary accessibility signals and maintaining a smooth reading experience.
This commit introduces user-configurable settings for all delay types, with separate levels for critical and informational features. To avoid an excessive number of settings, individual delays for each category are grouped as items within their corresponding setting. Additionally, a function has been added to the `LineFeature` class constructor to read these delay settings from user configuration. This function is registered to be called whenever a user modifies any of the delay values, effectively reloading the settings.
This commit eliminates the `debouncingPosition` observable and all code related to debouncing, which has become redundant and can inadvertently extend the new delays beyond their intended duration. While the related configuration setting is preserved for potential future use in controlling all delayed accessibility signals, it is not currently in use.
6e547f5
to
6cebc06
Compare
I had a more detailed review now. Over the years, the Before changing the code more, I'd suggest to describe this entire feature in a detailed way first (please without chat gpt). I also don't fully understand the |
An aria alert role tells a screen reader that changes in a particular container are relevant so that they can be announced via Braille or speech, what we today call announcements. I understand the voice modality to be specific about TTS. For example, someone could build an extension to support magnification users who are not screen reader users that makes voice announcements in certain situations depending on these settings. Someone who uses a screen reader may benefit from hearing certain events announced by a different voice in a process that is separate from the screen reader. Someone may build an extension that listens for haptic signals to transmit haptic feedback to a user via a wristband. Also, @hediet, I'm not saying this is the case, but some folks who have English as their second language, or who do not speak English at all but want to contribute may use Copilot or any translation tool to help with their writing, or actually use the Copilot feature to generate commit messages, for example. I suggest that we focus on the actual content, the accuracy of the explanation, the potential benefit of the contribution, and the quality of the code rather than the tools contributors use to get things done. |
That sounds interesting. How would that work technically? Currently, signals are not forwarded to extensions, so support for this would have to be implemented in VS Code core. A document that describes how these range/line-based "features" should work would be very helpful.
I agree and respect that, but the text below "Enhanced Solution Strategy" in the initial PR description is extremely difficult to read and to make sense of - and this is very typical for chat gpt generated text. The text above it however is very clear and precise (thanks for adding it!). |
Superseded by #210679. Given changed requirements of the feature and new insights, we decided to rewrite the line-feature based signals (now called text property signals). This cleans up the code significantly and gives a lot of flexibility with regards to delay times. Thanks for the idea of per-modality-delays! |
fixes #204257
Summary of the issue
The current accessibility signals implementation for "line features" (those that play while navigating code) has several issues that this PR aims to address:
accessibility.signals.debouncePositionChanges
' setting, it only introduces a short, non-configurable delay of 300 ms. This delay may be more or less useful for users who type quickly or are accustomed to reading content rapidly, but not for less advanced users or those who wish to navigate the content more slowly for better understanding or spell-checking. For instance, a variable named "user" containing a warning will be read character by character as "u warning s warning e warning r warning" unless the user moves very quickly to allow debouncing, making it difficult to comprehend the variable name. Additionally, a "warning" sound will play simultaneously, further complicating the speech synthesis understanding.Enhanced Solution Strategy
This pull request significantly enhances the accessibility signals feature in VS Code, offering a more intuitive and user-focused experience. The final implementation effectively manages various signal modalities, including audio and speech, each with unique delays. These delays are further refined based on user navigation patterns, such as skimming through lines versus reading content within each line. This dual-level customization significantly improves the flexibility and adaptability of signal handling.
Key developments in this feature include:
These changes collectively provide a more responsive and user-centric accessibility signals feature in VS Code, enhancing the overall user experience.
Testing the Feature
a) Skim through the program by moving quickly between lines.
b) Read the content of lines with features using the left/right arrow keys to navigate character by character (or word by word).
accessibility.signals.lineFeatureDelays.critical
andaccessibility.signals.lineFeatureDelays.informational
settings to modify the delays. Observe how these changes influence the user experience.Future work
The new methodology renders the
accessibility.signals.debouncePositionChanges
setting obsolete. Consequently, the debouncing code previously used inaccessibilitySignalLineFeatureContribution.ts
has been eliminated. This code was not only redundant but could also inadvertently prolong the new delays beyond their intended duration. While this setting is currently ineffective, it is being retained temporarily. It may serve as a universal switch for all future delay adjustments. If this approach is adopted, a renaming of the setting would be appropriate to reflect its broader role.