From 0bbad7a2dbbf3a592726f0ecd9ccb761ede5334d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Mon, 3 Oct 2022 15:20:38 +0300 Subject: [PATCH] Fix item list row text not read when using non-contiguous kb selection Closes #2830 --- chrome/content/zotero/components/virtualized-table.jsx | 1 + chrome/content/zotero/itemTree.jsx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/components/virtualized-table.jsx b/chrome/content/zotero/components/virtualized-table.jsx index 9023e82aa3..7d710eb7af 100644 --- a/chrome/content/zotero/components/virtualized-table.jsx +++ b/chrome/content/zotero/components/virtualized-table.jsx @@ -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) { diff --git a/chrome/content/zotero/itemTree.jsx b/chrome/content/zotero/itemTree.jsx index f446c594cc..af01c7b164 100644 --- a/chrome/content/zotero/itemTree.jsx +++ b/chrome/content/zotero/itemTree.jsx @@ -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));