nvaccess / nvda

NVDA, the free and open source Screen Reader for Microsoft Windows
https://www.nvaccess.org/
Other
2.12k stars 637 forks source link

Input elements in tree, label and state issues #8575

Closed cleidigh closed 2 months ago

cleidigh commented 6 years ago

I am a collaborator with the Visual Studio code team. We have a new feature for configuration that uses a tree widget based on role=tree This is the first time we have input elements within the tree. There appeared to be some issues with both labels and indicating the input element value/selected characters/editable state. I have done quite a bit of research and both the spec and postings do not appear to explicitly state that input elements cannot be in a tree, looking at the documentation for grid and treegrid there is an implied aspect of this.

we want to have a hidden text label spoken before the input value/selected info if I used label by I can get a label read but afterward it reads the first number of characters of the text label, not the value. If I have the input box with role=treeitem and no label or labeledby, the input is read as editable and current value selected text is read. This would be expected for the input but I get no label.

I havethe log output at the end with focus on the input box with a labelby.

Is it not supported to have input items in a plain tree? am I missing attributes? ThanksInAdvance

Steps to reproduce:

implement list based tree with input elements such as input text box with role=treeitem use labeledby pointing to parent div with label

Actual behavior:

Label is read but input box is not identified as editable After label is read the value of the input box is not read but rather the number of characters in the value but of the label is read

Expected behavior:

Both label as well as input box value/selected text should be read.

System configuration:

Visual Studio code Electron 2.05 Chrome 61

NVDA Installed/portable/running from source:

installed normal

NVDA version:

2018.2.1

Windows version:

Windows 7 Professional

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

Visual Studio code insiders

Other information about your system:

Other questions:

Does the issue still occur after restarting your PC?

yes

Have you tried any other versions of NVDA?

no, searched issues did not find similar problem

INFO - __main__ (19:21:07.835):
Starting NVDA
INFO - core.main (19:21:08.423):
Config dir: C:\Users\Christopher Leidigh\AppData\Roaming\nvda
INFO - config.ConfigManager._loadConfig (19:21:08.423):
Loading config: C:\Users\Christopher Leidigh\AppData\Roaming\nvda\nvda.ini
INFO - core.main (19:21:08.566):
NVDA version 2018.2.1
INFO - core.main (19:21:08.566):
Using Windows version 6.1.7601 service pack 1 workstation
INFO - core.main (19:21:08.566):
Using Python version 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:22:17) [MSC v.1500 32 bit (Intel)]
INFO - core.main (19:21:08.566):
Using comtypes version 1.1.3
INFO - synthDrivers.espeak.SynthDriver.__init__ (19:21:09.621):
Using eSpeak NG version 1.49.1 dev
INFO - synthDriverHandler.setSynth (19:21:09.690):
Loaded synthDriver espeak
INFO - core.main (19:21:09.690):
Using wx version 3.0.2.0 msw (classic)
INFO - brailleInput.initialize (19:21:09.697):
Braille input initialized
INFO - braille.initialize (19:21:09.697):
Using liblouis version 3.5.0
INFO - braille.BrailleHandler.setDisplayByName (19:21:09.700):
Loaded braille display driver noBraille, current display has 0 cells.
WARNING - core.main (19:21:09.913):
Java Access Bridge not available
INFO - _UIAHandler.UIAHandler.MTAThreadFunc (19:21:09.921):
UIAutomation: IUIAutomation
INFO - core.main (19:21:12.020):
NVDA initialized
INFO - globalCommands.GlobalCommands.script_navigatorObject_devInfo (19:23:20.403):
Developer info for navigator object:
name: u'Files Auto Save Delay[ number selected ]10 Modified'
role: ROLE_TREEVIEWITEM
states: STATE_FOCUSABLE, STATE_SELECTABLE, STATE_FOCUSED, STATE_SELECTED, STATE_EDITABLE
isFocusable: True
hasFocus: True
Python object: <NVDAObjects.Dynamic_EditableTextWithAutoSelectDetectionOutlineItemEditorIa2WebIAccessible object at 0x05195D10>
Python class mro: (<class 'NVDAObjects.Dynamic_EditableTextWithAutoSelectDetectionOutlineItemEditorIa2WebIAccessible'>, <class 'NVDAObjects.behaviors.EditableTextWithAutoSelectDetection'>, <class 'NVDAObjects.behaviors.EditableText'>, <class 'editableText.EditableText'>, <class 'NVDAObjects.IAccessible.OutlineItem'>, <class 'NVDAObjects.IAccessible.ia2Web.Editor'>, <class 'NVDAObjects.IAccessible.ia2Web.Ia2Web'>, <class 'NVDAObjects.IAccessible.IAccessible'>, <class 'NVDAObjects.window.Window'>, <class 'NVDAObjects.NVDAObject'>, <class 'documentBase.DocumentWithTableNavigation'>, <class 'documentBase.TextContainerObject'>, <class 'baseObject.ScriptableObject'>, <class 'baseObject.AutoPropertyObject'>, <type 'object'>)
description: None
location: (859, 562, 297, 38)
value: None
appModule: <'appModuleHandler' (appName u'code - oss', process ID 8008) at address 5027510>
appModule.productName: u'Code - OSS'
appModule.productVersion: u'1.26.0'
TextInfo: <class 'NVDAObjects.IAccessible.ia2TextMozilla.MozillaCompoundTextInfo'>
windowHandle: 23332736L
windowClassName: u'Chrome_RenderWidgetHostHWND'
windowControlID: 123957280
windowStyle: 1445986304
windowThreadID: 6772
windowText: u'Chrome Legacy Window'
displayText: u''
IAccessibleObject: <POINTER(IAccessible2) ptr=0x8257dfc at 51e08f0>
IAccessibleChildID: 0
IAccessible event parameters: windowHandle=23332736, objectID=-4, childID=-426
IAccessible accName: u'Files Auto Save Delay[ number selected ]10 Modified'
IAccessible accRole: ROLE_SYSTEM_OUTLINEITEM
IAccessible accState: STATE_SYSTEM_SELECTABLE, STATE_SYSTEM_SELECTED, STATE_SYSTEM_FOCUSED, STATE_SYSTEM_FOCUSABLE, STATE_SYSTEM_VALID (3145734)
IAccessible accDescription: None
IAccessible accValue: u'10'
IAccessible2 windowHandle: 23332736
IAccessible2 uniqueID: -426
IAccessible2 role: ROLE_SYSTEM_OUTLINEITEM
IAccessible2 states: IA2_STATE_OPAQUE, IA2_STATE_EDITABLE (1032)
IAccessible2 attributes: u'display:inline-block;tag:input;xml-roles:treeitem;level:1;setsize:1;posinset:1;explicit-name:true;class:input;id:Files_Auto_Save_Delayitem;'

from the screenshot you can see the first two characters of the label 'Fi' are read as selected

image

Adriani90 commented 5 years ago

cc: @pawelurbanski maybe you could raise a PR agains NVDA for this. Is this actually included in your addon for Visual Studio Code already? cc: @francipvb, @feerrenrut

pawelurbanski commented 5 years ago

The add-on I created does not interact with a treeview. It works well when it comes to the features it corresponds to.

NVDA’s navigator info recognizes VS Code’s treeview as a treeview, it gets focus and so on, but for some reason its labels are not read, and it is impossible to expand / collapse the folders or other objects…

Adriani90 commented 4 years ago

is there any improvements to this behavior? cc: @MarcoZehe

Adriani90 commented 1 year ago

@leonardder, @rob-aph or @isidorn is this issue fixed in VS Code with NVDA 2023.2 RC?

seanbudd commented 2 months ago

Closing as we haven't heard anything from the reporters in years