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

Windows 11 clipboard history: NVDA no longer announces history items when closing clipboard history interface #17361

Merged
merged 4 commits into from
Nov 6, 2024

Conversation

josephsl
Copy link
Collaborator

@josephsl josephsl commented Nov 4, 2024

Link to issue number:

Closes #17308

Summary of the issue:

In Windows 11, NVDA announces clipboard history items when closing the interface while items are present.

Description of user facing changes

NVDA will no longer announce clipboard items when closing Windows 11 clipboard history with items present.

Description of development approach

Windows 11 input exprience interface fires UIA live region change event when closing clipboard history with items present. Therefore, veto this event at the object level (NVDA object init event) to prevent item announcement and to help gain focus event handler (no events should be pending).

Testing strategy:

Manual testing (implemented in an add-on):

  1. In Windows 11, copy several items to the clipboard, preferably text.
  2. OPen clipboard history (Widows+V).
  3. Close clipboard history WITHOUT clearing the list.

Expected: NVDA does not announce clipboard history items.

Known issues with pull request:

The approach should be revisited if Microsoft fixes this issue or clipboard history UI/event processing changes. Since clipboard may contain sensitive information, fixing from NVDA side is warranted for now.

Code Review Checklist:

  • Documentation:
    • Change log entry
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English
  • API is compatible with existing add-ons.
  • Security precautions taken.

Summary by CodeRabbit

Release Notes for NVDA 2024.1

  • New Features

    • Introduced support for the new HID Braille specification for enhanced Braille Display compatibility.
    • Added "on-demand" speech mode for more control over spoken feedback.
    • Implemented "Native Selection" mode for Mozilla Firefox, integrating text selection with Firefox's native capabilities.
    • Launched an Add-on Store for easy browsing, searching, and managing community add-ons.
    • Added support for Windows 10 on ARM64.
  • Bug Fixes

    • Various improvements made for braille support, Microsoft Office integration, and web browsing.

… history entries when closing the interface while entries are present. Re nvaccess#17308.

In recent Windows 11 releases, live region change event is fired when opening and closing clipboard history while items are present. This may give an impression that clipboard history interface is opening with items present. On the other hand, if sensitive information was copied to the clipboard and not removed from history, these items will be announced when the clipboard history interface closes. Threfore, veto UIA live region change event at the object level by detecting clipboard history data item elements (role = data item, parent = history item (tale row) or clipboard history actions list). Event must be vetoed at the object level (NVDA object init method) because live region change event is fired after NVDA handles system focus while clipboard history interface is closed and NVDA expects no pending events (live region change event contradicts this).
@josephsl josephsl requested a review from a team as a code owner November 4, 2024 12:58
@josephsl josephsl requested a review from seanbudd November 4, 2024 12:58
@josephsl
Copy link
Collaborator Author

josephsl commented Nov 4, 2024

@coderabbitai summary

Copy link
Contributor

coderabbitai bot commented Nov 4, 2024

Walkthrough

The changes introduce a new method event_NVDAObject_init in the AppModule class to address an issue with NVDA announcing clipboard history entries when closing the clipboard interface in Windows 11. The method prevents unnecessary announcements by modifying an attribute related to UIA live region events. Additionally, existing methods have been updated with comments for clarity regarding focus handling and event announcements.

Changes

File Path Change Summary
source/appModules/windowsinternal_composableshell_experiences_textinput_inputapp.py Added method event_NVDAObject_init in AppModule to prevent clipboard history announcements. Updated comments in event_UIA_elementSelected, event_nameChange, and event_gainFocus for clarity.
user_docs/en/changes.md Documented new features and changes for NVDA 2024.1, including new HID Braille support, on-demand speech mode, and updates to the Add-on Store.

Assessment against linked issues

Objective Addressed Explanation
NVDA does not announce clipboard history interface after closing it (#17308)

Possibly related PRs

Suggested labels

conceptApproved, merge-early

Suggested reviewers

  • seanbudd
  • LeonarddeR

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@seanbudd
Copy link
Member

seanbudd commented Nov 6, 2024

Thanks @josephsl

@seanbudd seanbudd merged commit f44f3ef into nvaccess:master Nov 6, 2024
2 of 4 checks passed
@github-actions github-actions bot added this to the 2025.1 milestone Nov 6, 2024
This was referenced Nov 11, 2024
@josephsl josephsl deleted the i17308 branch November 14, 2024 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants