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

NVDA does not read some editable text fields correctly in Visual Studio Code (possibly affecting other applications) #17525

Open
Marc2p opened this issue Dec 14, 2024 · 5 comments
Labels
app/vs-code p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.

Comments

@Marc2p
Copy link

Marc2p commented Dec 14, 2024

Steps to reproduce:

  1. Install and open Visual Studio Code.
  2. Install Thunder Client extension.
  3. Press ctrl+shift+r or open the extension from the Active View Switcher.
  4. Press the new request button.
  5. Go to the request url text field.
  6. In focus mode, read by characters or try to delete typed text. NVDA will not say anything.

Actual behavior:

It is not possible to interact with the content in some editable text fields

Expected behavior:

Normal interaction should be possible (reading by characters, verbalizing written and deleted text, etc.)

NVDA logs, crash dumps and other attachments:

Developer info for navigator object:
name: 'Enter Request Url'
role: SECTION
processID: 14128
roleText: None
states: FOCUSABLE, MULTILINE, FOCUSED, EDITABLE
isFocusable: True
hasFocus: True
Python object: <NVDAObjects.Dynamic_EditorEditableTextWithAutoSelectDetectionEditorIa2WebIAccessible object at 0x04AF1370>
Python class mro: (<class 'NVDAObjects.Dynamic_EditorEditableTextWithAutoSelectDetectionEditorIa2WebIAccessible'>, <class 'NVDAObjects.IAccessible.chromium.Editor'>, <class 'NVDAObjects.behaviors.EditableTextWithAutoSelectDetection'>, <class 'NVDAObjects.IAccessible.ia2Web.Editor'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.behaviors.EditableText'>, <class 'NVDAObjects.behaviors.EditableTextWithSuggestions'>, <class 'NVDAObjects.behaviors.InputFieldWithSuggestions'>, <class 'NVDAObjects.behaviors.EditableTextBase'>, <class 'editableText.EditableText'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.DocumentWithTableNavigation'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <class 'garbageHandler.TrackedObject'>, <class 'object'>)
description: None
location: RectLTWH(left=480, top=112, width=568, height=43)
value: 'https://www.thunderclient.com/wel'
TextInfo: <class 'NVDAObjects.NVDAObjectTextInfo'>
appModule: AppModule(code, appName='code', processID=14128)
appModule.productName: 'Visual Studio Code'
appModule.productVersion: '1.96.0'
appModule.helperLocalBindingHandle: c_long(74516912)
appModule.appArchitecture: 'AMD64'
windowHandle: 1836326
windowClassName: 'Chrome_RenderWidgetHostHWND'
windowControlID: 483744
windowStyle: 1445986304
extendedWindowStyle: 32
windowThreadID: 6876
windowText: 'Chrome Legacy Window'
displayText: ''
IAccessibleObject: <POINTER(IAccessible2) ptr=0xa373da4 at 8f01ee0>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=1836326, objectID=-4, childID=-1459
IAccessible accName: 'Enter Request Url'
IAccessible accRole: ROLE_SYSTEM_GROUPING
IAccessible accState: STATE_SYSTEM_FOCUSED, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (1048580)
IAccessible accDescription: None
IAccessible accValue: 'https://www.thunderclient.com/wel'
IAccessible2 windowHandle: 1836326
IAccessible2 uniqueID: -1459
IAccessible2 role: IA2_ROLE_SECTION
IAccessible2 states: IA2_STATE_EDITABLE, IA2_STATE_MULTI_LINE, IA2_STATE_OPAQUE, IA2_STATE_SELECTABLE_TEXT (5640)
IAccessible2 attributes: 'display:block;tag:div;explicit-name:true;class:input-editable request-url;id:req-url;text-align:left;text-model:a1;'
IAccessible2 relations:

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

2024.4.1

Windows version:

Windows 11 23H2 (AMD64) build 22631.4602

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

Visual Studio Code Version: 1.96.0
Thunder Client extension version 2.32.10

Other information about your system:

Other questions

Does the issue still occur after restarting your computer?

Yes

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

Yes, with NVDA 2023.3 it works correctly

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

Yes

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

Yes

@Adriani90
Copy link
Collaborator

Cc: @michaelDCurran @jcsteh

@hwf1324
Copy link
Contributor

hwf1324 commented Dec 14, 2024

CC: @cary-rowen

This issue should be a regression caused by #16248.

While it can be fixed by the following, I'm not sure if there are any other roles whose edit controls are affected?

A wider range of fixes should be found.

diff --git a/source/appModules/code.py b/source/appModules/code.py
index facaeb60a..0bd50f4df 100644
--- a/source/appModules/code.py
+++ b/source/appModules/code.py
@@ -31,5 +31,8 @@ def event_NVDAObject_init(self, obj: NVDAObject):
 		# Once issue #15159 is fixed,
 		# The PR #16248 that introduced this code can be immediately reverted.
 		# (see issue #15159 for full description)
-		if obj.role != controlTypes.Role.EDITABLETEXT:
+		if obj.role not in (
+			controlTypes.Role.EDITABLETEXT,
+			controlTypes.Role.SECTION
+		):
 			obj.TextInfo = NVDAObjectTextInfo

@cary-rowen
Copy link
Contributor

Sorry for introducing the regression.
@hwf1324
Can we use controlTypes.State.EDITABLE in obj.states as a check condition?

@hwf1324
Copy link
Contributor

hwf1324 commented Dec 15, 2024

@cary-rowen Would you create a PR for this issue?

@cary-rowen
Copy link
Contributor

Yes, Will do.

@SaschaCowley SaschaCowley added p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority app/vs-code triaged Has been triaged, issue is waiting for implementation. labels Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app/vs-code p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority triaged Has been triaged, issue is waiting for implementation.
Projects
None yet
Development

No branches or pull requests

6 participants
@SaschaCowley @cary-rowen @Adriani90 @Marc2p @hwf1324 and others