List/Tree: Add option to use role=form, explore others (support input elements, single 'level') #57315
Labels
accessibility
Keyboard, mouse, ARIA, vision, screen readers (non-specific) issues
feature-request
Request for new features or functionality
list-widget
List widget issues
*out-of-scope
Posted issue is not in scope of VS Code
tree-widget
Tree widget issues
Milestone
The tree and list widgets use aria role=tree which has two issues:
are not multilevel trees, screen readers always present them as such levels branches et cetera
Some specification references site a tree has read-only.
It it appears readers attempt to do their best, but for example these input elements
are not interpreted in the accessibility tree correctly with Electron 2.x and NVDA and voiceover
While Electron 3 beta with updated chromium does do better (see @joaomoreno comments on buttons) , also according to my experiments it is still not clear it is valid ARIA structure to have editable elements in a tree.
Debug Output:
NVDA initialized
INFO - globalCommands.GlobalCommands.script_navigatorObject_devInfo (15:36:12.450):
Developer info for navigator object:
name: u'Files Auto Save Delay, Setting'
role: ROLE_TREEVIEWITEM
states: STATE_SELECTABLE, STATE_FOCUSED
IAccessible accRole: ROLE_SYSTEM_OUTLINEITEM
IAccessible accState: STATE_SYSTEM_SELECTABLE, STATE_SYSTEM_FOCUSED, STATE_SYSTEM_VALID (2097156)
Input under form: (normal system editable state)
NVDA initialized
INFO - globalCommands.GlobalCommands.script_navigatorObject_devInfo (15:32:36.880):
Developer info for navigator object:
name: u'Files Auto Save Delay, Setting'
role: ROLE_EDITABLETEXT
states: STATE_FOCUSABLE, STATE_EDITABLE, STATE_FOCUSED
IAccessible2 role: ROLE_SYSTEM_TEXT
IAccessible2 states: IA2_STATE_SELECTABLE_TEXT, IA2_STATE_OPAQUE, IA2_STATE_EDITABLE, IA2_STATE_SINGLE_LINE (13320)
For the settings editor to work correctly with the screen reader I had to users
role=form and set the individual elements roles in certain cases. Experimentally
I also suppressed the aria attributes for trees level, position et cetera.
Proposal:
Subsequently I think we should explore options for treegrid, grid and listbox
Related:
#57274 - lists with one levels
#53923 - aria-selected for list
#52682 - labeling on buttons in tree
#54836 - labeling within tree
#52390 - button roles within tree
The text was updated successfully, but these errors were encountered: