Fix item list row text not read when using non-contiguous kb selection

Closes #2830
This commit is contained in:
Adomas Venčkauskas 2022-10-03 15:20:38 +03:00
parent 5ef9a3116c
commit 0bbad7a2db
2 changed files with 3 additions and 2 deletions

View file

@ -751,6 +751,7 @@ class VirtualizedTable extends React.Component {
this.selection.pivot = index;
this.invalidateRow(previousFocused);
this.invalidateRow(index);
this.selection._updateTree(shouldDebounce);
}
// Normal selection
else if (!toggleSelection) {

View file

@ -988,7 +988,7 @@ var ItemTree = class ItemTree extends LibraryTree {
onItemContextMenu: (...args) => this.props.onContextMenu(...args),
role: 'treegrid',
role: 'tree',
label: Zotero.getString('pane.items.title'),
}
);
@ -2899,7 +2899,7 @@ var ItemTree = class ItemTree extends LibraryTree {
}
// Accessibility
div.setAttribute('role', 'row');
div.setAttribute('role', 'treeitem');
div.setAttribute('aria-level', this.getLevel(index) + 1);
if (!this.isContainerEmpty(index)) {
div.setAttribute('aria-expanded', this.isContainerOpen(index));