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

Wrong message reported when toggling native selection in Word #16097

Closed
CyrilleB79 opened this issue Jan 26, 2024 · 6 comments
Closed

Wrong message reported when toggling native selection in Word #16097

CyrilleB79 opened this issue Jan 26, 2024 · 6 comments
Labels
bug/regression p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority quick fix triaged Has been triaged, issue is waiting for implementation.
Milestone

Comments

@CyrilleB79
Copy link
Collaborator

Steps to reproduce:

  • Open a document in MS Word
  • Enable browse mode with NVDA+space
  • Press NVDA+shift+F10

Actual behavior:

NVDA says "Application native selection mode not supported in this document"

Expected behavior:

NVDA should say "Application native selection mode cannot be disabled in this document" or "Application native selection mode cannot be disabled in this application".
Indeed, the native selection is always made in Word when selecting in Browse mode.
Same for Outlook of course.

NVDA logs, crash dumps and other attachments:

N/A

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

2024.1beta5

Windows version:

Windows 10 22H2 (AMD64) build 19045.3930

Name and version of other software in use when reproducing the issue:

Office 2016

Other information about your system:

N/A

Other questions

Does the issue still occur after restarting your computer?

Have you tried any other versions of NVDA? If so, please report their behaviors.

No

If NVDA add-ons are disabled, is your problem still occurring?

Not tested but should be the same

Does the issue still occur after you run the COM Registration Fixing Tool in NVDA's tools menu?

Not tested

@seanbudd
Copy link
Member

seanbudd commented Jan 29, 2024

Do you know if this is a recent regression in NVDA?

@seanbudd
Copy link
Member

seanbudd commented Jan 29, 2024

in just NVDA 2024.1 I mean - seems like a quick fix, but confirming if it should go on the 2024.1 milestone

@CyrilleB79
Copy link
Collaborator Author

Native selection feature and NVDA+shift+f10 shortcuts are new in NVDA 2024.1.

Having this in beta would be clearer to understand this feature while it is launched. But if for whatever reason beta is not suitable, that's not a big problem, because it's not a technical bug from the user's point of view, it's only a matter of communication.

@seanbudd seanbudd added this to the 2024.1 milestone Jan 29, 2024
@seanbudd seanbudd added p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority quick fix triaged Has been triaged, issue is waiting for implementation. bug/regression labels Jan 29, 2024
@CyrilleB79
Copy link
Collaborator Author

#16129 has solved this issue for word UIA, but not when using object model (still default on Windows 10). Cc @michaelDCurran

Thus, I reopen this issue until it is also fixed for Word legacy. Sorry.

@CyrilleB79 CyrilleB79 reopened this Feb 8, 2024
@michaelDCurran
Copy link
Member

michaelDCurran commented Feb 8, 2024 via email

@CyrilleB79
Copy link
Collaborator Author

I can look into this. But do we truly move the real selection in browse mode for Word object model? I can't remember. If so, then yes, the message needs to be fixed. Message ID: @.***>

When selecting while in browse mode in a Word / Outlook document, I can confirm you that the selection appears visually, no matter if we use UIA or legacy object model.

Adriani90 pushed a commit to Adriani90/nvda that referenced this issue Mar 13, 2024
Fixes nvaccess#16064
Fixes nvaccess#16097

Summary of the issue:
Native selection mode can be enabled in unsupported Gecko, such as Thunderbird 115.x nvaccess#16064: turning on native selection mode in thunderbird 115 would cause errors when moving with the arrow keys as IAccessibleTextSelectionContainer is unavailable.
Wrong message reported when toggling native selection in Word nvaccess#16097: NVDA is misleading in MS Word browse mode when it says that native selection mode is not supported when trying to toggle it on, as MS word Browse mode does move the caret / selection, thus it has always used native selection mode.. It is just you can't toggle it off.
Description of user facing changes
In firefox, If NVDA fails to update the native selection when turning on native selection mode, it is now left off, and the user is
notified that native selection mode is not supported. this stops errors when moving with the arrow keys in Thunderbird after turning on native selection mode.
NVDA no longer incorrectly alerts the user that native selection mode is not supported in Microsoft Word. Rather, the message state that it canot be turned off.
when copying text with control+c in Microsoft Word with Browse mode on, formatting is now also copied, fulfilling the expectation of a native selection mode.
Description of development approach
Gecko virtualBuffer's updateAppSelection method: if the selection is collapsed, don't try fetching information for the selection, instead just clear the app selection. This error was previously silently ignored.
In UIA Browse mode documents, _nativeAppSelectionMode is now set to True, as this correctly reflects that UIA browse mode documents move the native selection.
BrowseMode document's toggleNativeSelectionMode script:
Tailor the message reported if native selection mode is not supported (by looking at _nativeSelectionMode). If _nativeSelectionMode is True, then the message is changed to state it can't be turned off.
If updateappSelection fails when turning on native selection mode, log the error, turn it off, and alert the user that it is not supported.
In MS word, suppress the "copy" UIA notification, if in MS word Browse mode. Otherwise there would be double speaking along with the message in cursorManager's copyToclipboard script when doing a native copy.
Adriani90 pushed a commit to Adriani90/nvda that referenced this issue Mar 13, 2024
…ult a and cannot be turned off, so ensure the toggle message reflects this. (nvaccess#16151)

Follow up from nvaccess#16129
Fixes nvaccess#16097

Summary of the issue:
Selecting text in Browse mode in Microsoft Word moves the physical selection. Thus it is the equivalent to native selection mode. Pr nvaccess#16129 ensured that Browse mode in MS word with UI Automation took this into account and made the toggle message report that native selection mode could not be turned off. However this has not been done for MS Word object model, and NVDA states that native selection mode is unsupported.

Description of user facing changes
When trying to toggle native selection mode in Browse mode in MS Word when not using UI Automation, NvDA will correctly state that native selection mode cannot be turned off.
When copying text with control+c in browse mode in MS Word when not using UI Automation, formatting is now also copied.
Description of development approach
Set browse mode for MS Word object model's _nativeAppSelectionMode to True.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/regression p3 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority quick fix triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

No branches or pull requests

3 participants